aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-01 12:57:46 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-01 12:57:57 +0100
commit38f49f09d7d83eb993d8a229751c01aafcde7544 (patch)
tree55103884ce47876f5507ab21641e2b73fd8ed244
parentef4a3c35c0525e1974fc8ca223e67438e7964d11 (diff)
downloadpaludis-38f49f09d7d83eb993d8a229751c01aafcde7544.tar.gz
paludis-38f49f09d7d83eb993d8a229751c01aafcde7544.tar.xz
Clarify param names
-rw-r--r--paludis/resolver/decider.cc7
-rw-r--r--paludis/resolver/decider.hh3
-rw-r--r--paludis/resolver/resolver_functions.hh7
-rw-r--r--paludis/resolver/resolver_test.cc5
-rw-r--r--paludis/resolver/resolver_test.hh3
-rw-r--r--src/clients/cave/resolve_common.cc14
6 files changed, 17 insertions, 22 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index eab4493..09db9a2 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1498,12 +1498,11 @@ Decider::_get_resolvents_for(
}
const DestinationTypes
-Decider::_get_destination_types_for(
+Decider::_get_destination_types_for_error(
const PackageDepSpec & spec,
- const std::shared_ptr<const PackageID> & id,
const std::shared_ptr<const Reason> & reason) const
{
- return _imp->fns.get_destination_types_for_fn()(spec, id, reason);
+ return _imp->fns.get_destination_types_for_error_fn()(spec, reason);
}
const std::shared_ptr<const Resolvents>
@@ -1514,7 +1513,7 @@ Decider::_get_error_resolvents_for(
Context context("When finding slots for '" + stringify(spec) + "', which can't be found the normal way:");
std::shared_ptr<Resolvents> result(std::make_shared<Resolvents>());
- DestinationTypes destination_types(_get_destination_types_for(spec, make_null_shared_ptr(), reason));
+ DestinationTypes destination_types(_get_destination_types_for_error(spec, reason));
for (EnumIterator<DestinationType> t, t_end(last_dt) ; t != t_end ; ++t)
if (destination_types[*t])
result->push_back(Resolvent(spec, true, *t));
diff --git a/paludis/resolver/decider.hh b/paludis/resolver/decider.hh
index 9031e7b..17a2d82 100644
--- a/paludis/resolver/decider.hh
+++ b/paludis/resolver/decider.hh
@@ -66,9 +66,8 @@ namespace paludis
const PackageDepSpec & spec,
const std::shared_ptr<const Reason> & reason) const;
- const DestinationTypes _get_destination_types_for(
+ const DestinationTypes _get_destination_types_for_error(
const PackageDepSpec & spec,
- const std::shared_ptr<const PackageID> &,
const std::shared_ptr<const Reason> &) const;
const std::shared_ptr<const Resolvents> _get_error_resolvents_for(
diff --git a/paludis/resolver/resolver_functions.hh b/paludis/resolver/resolver_functions.hh
index f8a0fe2..5993efa 100644
--- a/paludis/resolver/resolver_functions.hh
+++ b/paludis/resolver/resolver_functions.hh
@@ -54,7 +54,7 @@ namespace paludis
typedef Name<struct get_constraints_for_dependent_fn_name> get_constraints_for_dependent_fn;
typedef Name<struct get_constraints_for_purge_fn_name> get_constraints_for_purge_fn;
typedef Name<struct get_constraints_for_via_binary_fn_name> get_constraints_for_via_binary_fn;
- typedef Name<struct get_destination_types_for_fn_name> get_destination_types_for_fn;
+ typedef Name<struct get_destination_types_for_error_fn_name> get_destination_types_for_error_fn;
typedef Name<struct get_initial_constraints_for_fn_name> get_initial_constraints_for_fn;
typedef Name<struct get_resolvents_for_fn_name> get_resolvents_for_fn;
typedef Name<struct get_use_existing_nothing_fn_name> get_use_existing_nothing_fn;
@@ -111,9 +111,8 @@ namespace paludis
typedef std::function<DestinationTypes (
const PackageDepSpec &,
- const std::shared_ptr<const PackageID> &,
const std::shared_ptr<const Reason> &
- )> GetDestinationTypesForFunction;
+ )> GetDestinationTypesForErrorFunction;
typedef std::function<std::shared_ptr<Constraints> (
const Resolvent &
@@ -172,7 +171,7 @@ namespace paludis
NamedValue<n::get_constraints_for_dependent_fn, GetConstraintsForDependentFunction> get_constraints_for_dependent_fn;
NamedValue<n::get_constraints_for_purge_fn, GetConstraintsForPurgeFunction> get_constraints_for_purge_fn;
NamedValue<n::get_constraints_for_via_binary_fn, GetConstraintsForViaBinaryFunction> get_constraints_for_via_binary_fn;
- NamedValue<n::get_destination_types_for_fn, GetDestinationTypesForFunction> get_destination_types_for_fn;
+ NamedValue<n::get_destination_types_for_error_fn, GetDestinationTypesForErrorFunction> get_destination_types_for_error_fn;
NamedValue<n::get_initial_constraints_for_fn, GetInitialConstraintsFunction> get_initial_constraints_for_fn;
NamedValue<n::get_resolvents_for_fn, GetResolventsForFunction> get_resolvents_for_fn;
NamedValue<n::get_use_existing_nothing_fn, GetUseExistingNothingFunction> get_use_existing_nothing_fn;
diff --git a/paludis/resolver/resolver_test.cc b/paludis/resolver/resolver_test.cc
index bc83b52..53cd7ef 100644
--- a/paludis/resolver/resolver_test.cc
+++ b/paludis/resolver/resolver_test.cc
@@ -141,8 +141,7 @@ paludis::resolver::resolver_test::make_unmaskable_filter_fn(
}
DestinationTypes
-paludis::resolver::resolver_test::get_destination_types_for_fn(const PackageDepSpec &,
- const std::shared_ptr<const PackageID> &,
+paludis::resolver::resolver_test::get_destination_types_for_error_fn(const PackageDepSpec &,
const std::shared_ptr<const Reason> &)
{
return DestinationTypes() + dt_install_to_slash;
@@ -404,7 +403,7 @@ ResolverTestCase::get_resolver_functions(InitialConstraints & initial_constraint
n::get_constraints_for_dependent_fn() = &get_constraints_for_dependent_fn,
n::get_constraints_for_purge_fn() = &get_constraints_for_purge_fn,
n::get_constraints_for_via_binary_fn() = &get_constraints_for_via_binary_fn,
- n::get_destination_types_for_fn() = &get_destination_types_for_fn,
+ n::get_destination_types_for_error_fn() = &get_destination_types_for_error_fn,
n::get_initial_constraints_for_fn() =
std::bind(&initial_constraints_for_fn, std::ref(initial_constraints),
std::placeholders::_1),
diff --git a/paludis/resolver/resolver_test.hh b/paludis/resolver/resolver_test.hh
index ec6af11..6ae71fb 100644
--- a/paludis/resolver/resolver_test.hh
+++ b/paludis/resolver/resolver_test.hh
@@ -108,8 +108,7 @@ namespace paludis
Filter make_unmaskable_filter_fn(
const std::shared_ptr<const Resolution> &);
- DestinationTypes get_destination_types_for_fn(const PackageDepSpec &,
- const std::shared_ptr<const PackageID> &,
+ DestinationTypes get_destination_types_for_error_fn(const PackageDepSpec &,
const std::shared_ptr<const Reason> &);
bool allowed_to_remove_fn(
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index b55bf0d..8697ed2 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -173,7 +173,7 @@ namespace
{
const Environment * const env;
const ResolveCommandLineResolutionOptions & resolution_options;
- const std::shared_ptr<const PackageID> package_id;
+ const std::shared_ptr<const PackageID> package_id_unless_error;
DestinationTypesFinder(
const Environment * const e,
@@ -181,7 +181,7 @@ namespace
const std::shared_ptr<const PackageID> & i) :
env(e),
resolution_options(c),
- package_id(i)
+ package_id_unless_error(i)
{
}
@@ -234,7 +234,7 @@ namespace
binary_if_possible = true;
}
- if (binary_if_possible && package_id && can_make_binary_for(package_id))
+ if (binary_if_possible && package_id_unless_error && can_make_binary_for(package_id_unless_error))
extras += dt_create_binary;
}
#endif
@@ -262,10 +262,10 @@ namespace
const Environment * const env,
const ResolveCommandLineResolutionOptions & resolution_options,
const PackageDepSpec &,
- const std::shared_ptr<const PackageID> & id,
+ const std::shared_ptr<const PackageID> & id_unless_error,
const std::shared_ptr<const Reason> & reason)
{
- DestinationTypesFinder f(env, resolution_options, id);
+ DestinationTypesFinder f(env, resolution_options, id_unless_error);
return reason->accept_returning<DestinationTypes>(f);
}
@@ -1908,8 +1908,8 @@ paludis::cave::resolve_common(
env.get(), std::cref(purge_specs), _1, _2, _3),
n::get_constraints_for_via_binary_fn() = std::bind(&get_constraints_for_via_binary_fn,
env.get(), _1, _2),
- n::get_destination_types_for_fn() = std::bind(&get_destination_types_for_fn,
- env.get(), std::cref(resolution_options), _1, _2, _3),
+ n::get_destination_types_for_error_fn() = std::bind(&get_destination_types_for_fn,
+ env.get(), std::cref(resolution_options), _1, make_null_shared_ptr(), _2),
n::get_initial_constraints_for_fn() = std::bind(&initial_constraints_for_fn,
env.get(), std::cref(resolution_options), std::cref(without),
std::cref(initial_constraints), binary_destinations, _1),