aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-15 17:15:16 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-15 17:15:16 +0100
commit74d92ca6f2ffd4d5bb5ef168061f58e25bf639ea (patch)
tree194b7cb28fb55c23488aa9c135a78804e1726174
parent73c674541d16225ed1c371c2c3b0df626351a97f (diff)
downloadpaludis-74d92ca6f2ffd4d5bb5ef168061f58e25bf639ea.tar.gz
paludis-74d92ca6f2ffd4d5bb5ef168061f58e25bf639ea.tar.xz
Tweak
-rw-r--r--paludis/resolver/get_resolvents_for_helper.cc12
-rw-r--r--paludis/resolver/get_resolvents_for_helper.hh2
-rw-r--r--paludis/resolver/resolver_functions.hh2
3 files changed, 8 insertions, 8 deletions
diff --git a/paludis/resolver/get_resolvents_for_helper.cc b/paludis/resolver/get_resolvents_for_helper.cc
index c11bc87..06a88fc 100644
--- a/paludis/resolver/get_resolvents_for_helper.cc
+++ b/paludis/resolver/get_resolvents_for_helper.cc
@@ -261,7 +261,7 @@ namespace
}
}
-std::pair<std::shared_ptr<Resolvents>, bool>
+std::pair<std::shared_ptr<const Resolvents>, bool>
GetResolventsForHelper::operator() (
const PackageDepSpec & spec,
const std::shared_ptr<const PackageID> & from_id,
@@ -270,6 +270,11 @@ GetResolventsForHelper::operator() (
{
Context context("When determining resolvents for '" + stringify(spec) + "':");
+ auto target(is_target(reason));
+ auto want_installed(target ? _imp->want_installed_slots_for_targets : _imp->want_installed_slots_otherwise);
+ auto want_best(target ? _imp->want_best_slot_for_targets : _imp->want_best_slot_otherwise);
+ auto fallback(target ? _imp->fallback_to_other_slots_for_targets : _imp->fallback_to_other_slots_otherwise);
+
auto result_ids(std::make_shared<PackageIDSequence>());
std::shared_ptr<const PackageID> best;
@@ -288,11 +293,6 @@ GetResolventsForHelper::operator() (
Filter(filter::InstalledNotAtRoot(_imp->env->system_root_key()->parse_value())) :
Filter(filter::InstalledAtRoot(_imp->env->system_root_key()->parse_value()))))]);
- auto target(is_target(reason));
- auto want_installed(target ? _imp->want_installed_slots_for_targets : _imp->want_installed_slots_otherwise);
- auto want_best(target ? _imp->want_best_slot_for_targets : _imp->want_best_slot_otherwise);
- auto fallback(target ? _imp->fallback_to_other_slots_for_targets : _imp->fallback_to_other_slots_otherwise);
-
if (! best)
std::copy(installed_ids->begin(), installed_ids->end(), result_ids->back_inserter());
else if (want_best && fallback && ! want_installed)
diff --git a/paludis/resolver/get_resolvents_for_helper.hh b/paludis/resolver/get_resolvents_for_helper.hh
index 07ef036..2c6c578 100644
--- a/paludis/resolver/get_resolvents_for_helper.hh
+++ b/paludis/resolver/get_resolvents_for_helper.hh
@@ -57,7 +57,7 @@ namespace paludis
void set_slots(const bool best, const bool installed, const bool fallback);
void set_target_slots(const bool best, const bool installed, const bool fallback);
- std::pair<std::shared_ptr<Resolvents>, bool> operator() (
+ std::pair<std::shared_ptr<const Resolvents>, bool> operator() (
const PackageDepSpec &,
const std::shared_ptr<const PackageID> & from_id,
const std::shared_ptr<const SlotName> &,
diff --git a/paludis/resolver/resolver_functions.hh b/paludis/resolver/resolver_functions.hh
index 3ccf50e..75a61b7 100644
--- a/paludis/resolver/resolver_functions.hh
+++ b/paludis/resolver/resolver_functions.hh
@@ -141,7 +141,7 @@ namespace paludis
const Resolvent &
)> GetInitialConstraintsForFunction;
- typedef std::function<std::pair<std::shared_ptr<Resolvents>, bool> (
+ typedef std::function<std::pair<std::shared_ptr<const Resolvents>, bool> (
const PackageDepSpec &,
const std::shared_ptr<const PackageID> &,
const std::shared_ptr<const SlotName> &,