aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-03 18:18:52 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-03 18:18:52 +0000
commitc90b93fa743f498a07e9620229a9050ffecf6d00 (patch)
tree937cbaaa5b078d2c9480472613893953ea9fa1b1
parentab60feb3a2491cda657f6f0228adf66b35367c8c (diff)
downloadpaludis-c90b93fa743f498a07e9620229a9050ffecf6d00.tar.gz
paludis-c90b93fa743f498a07e9620229a9050ffecf6d00.tar.xz
Clean up ctors a bit
-rw-r--r--paludis/resolver/decider.cc10
-rw-r--r--paludis/resolver/resolvent.cc7
-rw-r--r--paludis/resolver/resolvent.hh2
3 files changed, 12 insertions, 7 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index eda0b99..f7d2c12 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1527,7 +1527,15 @@ Decider::_get_error_resolvents_for(
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));
+ {
+ Resolvent resolvent(spec, make_named_values<SlotNameOrNull>(
+ n::name_or_null() = make_null_shared_ptr(),
+ n::null_means_unknown() = true
+ ),
+ *t);
+
+ result->push_back(resolvent);
+ }
return result;
}
diff --git a/paludis/resolver/resolvent.cc b/paludis/resolver/resolvent.cc
index 2a9586d..1ed9426 100644
--- a/paludis/resolver/resolvent.cc
+++ b/paludis/resolver/resolvent.cc
@@ -93,14 +93,11 @@ Resolvent::Resolvent(
Resolvent::Resolvent(
const PackageDepSpec & spec,
- const bool b,
+ const SlotNameOrNull & s,
const DestinationType t) :
destination_type(n::destination_type() = t),
package(n::package() = *spec.package_ptr()),
- slot(make_named_values<SlotNameOrNull>(
- n::name_or_null() = make_null_shared_ptr(),
- n::null_means_unknown() = b
- ))
+ slot(s)
{
}
diff --git a/paludis/resolver/resolvent.hh b/paludis/resolver/resolvent.hh
index da86f1c..4ab1b6e 100644
--- a/paludis/resolver/resolvent.hh
+++ b/paludis/resolver/resolvent.hh
@@ -54,8 +54,8 @@ namespace paludis
Resolvent(const QualifiedPackageName &, const SlotName &, const DestinationType);
Resolvent(const QualifiedPackageName &, const SlotNameOrNull &, const DestinationType);
- Resolvent(const PackageDepSpec &, const bool, const DestinationType);
Resolvent(const PackageDepSpec &, const SlotName &, const DestinationType);
+ Resolvent(const PackageDepSpec &, const SlotNameOrNull &, const DestinationType);
Resolvent(const std::shared_ptr<const PackageID> &, const DestinationType);