aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2015-04-04 17:19:49 -0700
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2015-04-19 14:22:51 -0700
commitdbdd5f4b1afb5ad0556dd93e3ab8fd15978d4eb5 (patch)
treef80b7a5ca1358e8765676e4871b26927bc23472d
parentcaf42043361d1e08ca5fa280b64c4542543239ac (diff)
downloadpaludis-dbdd5f4b1afb5ad0556dd93e3ab8fd15978d4eb5.tar.gz
paludis-dbdd5f4b1afb5ad0556dd93e3ab8fd15978d4eb5.tar.xz
resolver: use a few temporary variables
Use a few temporary variables to make it easier to read.
-rw-r--r--paludis/resolver/find_replacing_helper.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/paludis/resolver/find_replacing_helper.cc b/paludis/resolver/find_replacing_helper.cc
index 5b9a365..dafe3b6 100644
--- a/paludis/resolver/find_replacing_helper.cc
+++ b/paludis/resolver/find_replacing_helper.cc
@@ -79,11 +79,17 @@ FindReplacingHelper::operator() (
if (repo->installed_root_key())
{
+ const auto & dest_root = repo->installed_root_key()->parse_value();
+
for (auto r(_imp->env->begin_repositories()), r_end(_imp->env->end_repositories()) ;
r != r_end ; ++r)
- if ((*r)->installed_root_key() &&
- (*r)->installed_root_key()->parse_value() == repo->installed_root_key()->parse_value())
- repos.insert((*r)->name());
+ {
+ const auto repository = *r;
+
+ if (repository->installed_root_key() &&
+ repository->installed_root_key()->parse_value() == dest_root)
+ repos.insert(repository->name());
+ }
}
else
repos.insert(repo->name());