diff options
author | 2013-05-16 20:18:39 +0100 | |
---|---|---|
committer | 2013-05-22 23:19:27 +0100 | |
commit | 0174215ed434594d9288e38575a3aa41e2b10842 (patch) | |
tree | 6037c4c58a100e5a0cbca30ac7f3d911d8d57032 /paludis | |
parent | 78d9a9bf0758140e0e8c03c5e8d3288f74efbb51 (diff) | |
download | paludis-0174215ed434594d9288e38575a3aa41e2b10842.tar.gz paludis-0174215ed434594d9288e38575a3aa41e2b10842.tar.xz |
Use nullptr
Diffstat (limited to 'paludis')
127 files changed, 720 insertions, 903 deletions
diff --git a/paludis/changed_choices.cc b/paludis/changed_choices.cc index 9a0b17228..31421484f 100644 --- a/paludis/changed_choices.cc +++ b/paludis/changed_choices.cc @@ -66,10 +66,10 @@ ChangedChoices::add_additional_requirements_to(PartiallyMadePackageDepSpec & spe { if (o->second) spec.additional_requirement(parse_elike_use_requirement("" + stringify(o->first) + "(-)", - { euro_allow_default_values }, make_null_shared_ptr())); + { euro_allow_default_values }, nullptr)); else spec.additional_requirement(parse_elike_use_requirement("-" + stringify(o->first) + "(-)", - { euro_allow_default_values }, make_null_shared_ptr())); + { euro_allow_default_values }, nullptr)); } } diff --git a/paludis/contents.cc b/paludis/contents.cc index 0d2c154e8..b53a755be 100644 --- a/paludis/contents.cc +++ b/paludis/contents.cc @@ -18,7 +18,6 @@ */ #include <paludis/contents.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/util/wrapped_forward_iterator-impl.hh> #include <paludis/literal_metadata_key.hh> @@ -72,7 +71,7 @@ namespace paludis Imp(const std::string & part) : part_key(part.empty() - ? make_null_shared_ptr() + ? nullptr : std::make_shared<LiteralMetadataValueKey<std::string>>("part", "part", mkt_normal, part)) { } @@ -118,7 +117,7 @@ namespace paludis Imp(const std::string & target, const std::string & part) : target_key(std::make_shared<LiteralMetadataValueKey<std::string>>("target", "target", mkt_normal, target)), part_key(part.empty() - ? make_null_shared_ptr() + ? nullptr : std::make_shared<LiteralMetadataValueKey<std::string>>("part", "part", mkt_normal, part)) { } diff --git a/paludis/elike_choices.cc b/paludis/elike_choices.cc index 805963c1a..86a538f17 100644 --- a/paludis/elike_choices.cc +++ b/paludis/elike_choices.cc @@ -25,7 +25,6 @@ #include <paludis/util/destringify.hh> #include <paludis/util/log.hh> #include <paludis/util/singleton-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/enum_iterator.hh> #include <paludis/util/map.hh> #include <set> @@ -179,7 +178,7 @@ ELikeOptionalTestsChoiceValue::parameter() const const std::shared_ptr<const PermittedChoiceValueParameterValues> ELikeOptionalTestsChoiceValue::permitted_parameter_values() const { - return make_null_shared_ptr(); + return nullptr; } bool @@ -259,7 +258,7 @@ ELikeRecommendedTestsChoiceValue::parameter() const const std::shared_ptr<const PermittedChoiceValueParameterValues> ELikeRecommendedTestsChoiceValue::permitted_parameter_values() const { - return make_null_shared_ptr(); + return nullptr; } bool @@ -357,7 +356,7 @@ ELikeExpensiveTestsChoiceValue::parameter() const const std::shared_ptr<const PermittedChoiceValueParameterValues> ELikeExpensiveTestsChoiceValue::permitted_parameter_values() const { - return make_null_shared_ptr(); + return nullptr; } bool @@ -537,7 +536,7 @@ ELikeTraceChoiceValue::parameter() const const std::shared_ptr<const PermittedChoiceValueParameterValues> ELikeTraceChoiceValue::permitted_parameter_values() const { - return make_null_shared_ptr(); + return nullptr; } bool @@ -948,6 +947,6 @@ ELikeDwarfCompressionChoiceValue::parameter() const const std::shared_ptr<const PermittedChoiceValueParameterValues> ELikeDwarfCompressionChoiceValue::permitted_parameter_values() const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/elike_package_dep_spec.cc b/paludis/elike_package_dep_spec.cc index 7240dfd06..cb708434c 100644 --- a/paludis/elike_package_dep_spec.cc +++ b/paludis/elike_package_dep_spec.cc @@ -23,7 +23,6 @@ #include <paludis/util/options.hh> #include <paludis/util/log.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/version_operator.hh> #include <paludis/version_spec.hh> @@ -411,12 +410,12 @@ paludis::elike_remove_trailing_slot_if_exists(std::string & s, PartiallyMadePack if (options[epdso_allow_subslot_deps] && std::string::npos != p) { /* c/p:s/u */ - result.slot_requirement(std::make_shared<ELikeSlotExactFullRequirement>(std::make_pair(SlotName(text.substr(0, p)), SlotName(text.substr(p + 1))), make_null_shared_ptr())); + result.slot_requirement(std::make_shared<ELikeSlotExactFullRequirement>(std::make_pair(SlotName(text.substr(0, p)), SlotName(text.substr(p + 1))), nullptr)); } else { /* c/p:s */ - result.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(SlotName(text), make_null_shared_ptr())); + result.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(SlotName(text), nullptr)); } } } @@ -602,6 +601,6 @@ PackageDepSpec paludis::parse_elike_package_dep_spec(const std::string & ss, const ELikePackageDepSpecOptions & options, const VersionSpecOptions & version_options) { - return partial_parse_elike_package_dep_spec(ss, options, version_options, make_null_shared_ptr()); + return partial_parse_elike_package_dep_spec(ss, options, version_options, nullptr); } diff --git a/paludis/elike_slot_requirement.cc b/paludis/elike_slot_requirement.cc index d5b9aa319..60d1c8822 100644 --- a/paludis/elike_slot_requirement.cc +++ b/paludis/elike_slot_requirement.cc @@ -19,7 +19,6 @@ #include <paludis/elike_slot_requirement.hh> #include <paludis/util/stringify.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/visitor_cast.hh> using namespace paludis; @@ -92,7 +91,7 @@ ELikeSlotAnyUnlockedRequirement::as_string() const const std::shared_ptr<const SlotRequirement> ELikeSlotAnyUnlockedRequirement::maybe_original_requirement_if_rewritten() const { - return make_null_shared_ptr(); + return nullptr; } const std::string @@ -104,7 +103,7 @@ ELikeSlotAnyAtAllLockedRequirement::as_string() const const std::shared_ptr<const SlotRequirement> ELikeSlotAnyAtAllLockedRequirement::maybe_original_requirement_if_rewritten() const { - return make_null_shared_ptr(); + return nullptr; } ELikeSlotAnyPartialLockedRequirement::ELikeSlotAnyPartialLockedRequirement(const SlotName & s) : @@ -121,7 +120,7 @@ ELikeSlotAnyPartialLockedRequirement::as_string() const const std::shared_ptr<const SlotRequirement> ELikeSlotAnyPartialLockedRequirement::maybe_original_requirement_if_rewritten() const { - return make_null_shared_ptr(); + return nullptr; } const SlotName @@ -144,7 +143,7 @@ ELikeSlotUnknownRewrittenRequirement::as_string() const const std::shared_ptr<const SlotRequirement> ELikeSlotUnknownRewrittenRequirement::maybe_original_requirement_if_rewritten() const { - return make_null_shared_ptr(); + return nullptr; } const SlotName diff --git a/paludis/elike_use_requirement_TEST.cc b/paludis/elike_use_requirement_TEST.cc index a0cde68b3..f48df8878 100644 --- a/paludis/elike_use_requirement_TEST.cc +++ b/paludis/elike_use_requirement_TEST.cc @@ -30,7 +30,6 @@ #include <paludis/util/tokeniser.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <list> @@ -59,7 +58,7 @@ namespace std::shared_ptr<const AdditionalPackageDepSpecRequirement> parse_elike_use_requirement_no_accumulate( const std::string & s, const ELikeUseRequirementOptions & o) { - return parse_elike_use_requirement(s, o, make_null_shared_ptr()); + return parse_elike_use_requirement(s, o, nullptr); } } @@ -77,26 +76,26 @@ TEST(ELikeUseRequirements, Simple) std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1( parse_elike_use_requirement_no_accumulate("enabled", { euro_strict_parsing })); EXPECT_EQ("[enabled]", req1->as_raw_string()); - EXPECT_EQ("Flag 'enabled' enabled", req1->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' enabled", req1->as_human_string(nullptr)); + EXPECT_TRUE(req1->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2( parse_elike_use_requirement_no_accumulate("disabled", { euro_strict_parsing })); EXPECT_EQ("[disabled]", req2->as_raw_string()); - EXPECT_EQ("Flag 'disabled' enabled", req2->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'disabled' enabled", req2->as_human_string(nullptr)); + EXPECT_TRUE(! req2->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3( parse_elike_use_requirement_no_accumulate("-enabled", { euro_strict_parsing })); EXPECT_EQ("[-enabled]", req3->as_raw_string()); - EXPECT_EQ("Flag 'enabled' disabled", req3->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' disabled", req3->as_human_string(nullptr)); + EXPECT_TRUE(! req3->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4( parse_elike_use_requirement_no_accumulate("-disabled", { euro_strict_parsing })); EXPECT_EQ("[-disabled]", req4->as_raw_string()); - EXPECT_EQ("Flag 'disabled' disabled", req4->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'disabled' disabled", req4->as_human_string(nullptr)); + EXPECT_TRUE(req4->requirement_met(&env, 0, id, nullptr, 0).first); } TEST(ELikeUseRequirements, Portage) @@ -113,26 +112,26 @@ TEST(ELikeUseRequirements, Portage) std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1( parse_elike_use_requirement_no_accumulate("enabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[enabled]", req1->as_raw_string()); - EXPECT_EQ("Flag 'enabled' enabled", req1->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' enabled", req1->as_human_string(nullptr)); + EXPECT_TRUE(req1->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2( parse_elike_use_requirement_no_accumulate("disabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[disabled]", req2->as_raw_string()); - EXPECT_EQ("Flag 'disabled' enabled", req2->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'disabled' enabled", req2->as_human_string(nullptr)); + EXPECT_TRUE(! req2->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3( parse_elike_use_requirement_no_accumulate("-enabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[-enabled]", req3->as_raw_string()); - EXPECT_EQ("Flag 'enabled' disabled", req3->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' disabled", req3->as_human_string(nullptr)); + EXPECT_TRUE(! req3->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4( parse_elike_use_requirement_no_accumulate("-disabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[-disabled]", req4->as_raw_string()); - EXPECT_EQ("Flag 'disabled' disabled", req4->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'disabled' disabled", req4->as_human_string(nullptr)); + EXPECT_TRUE(req4->requirement_met(&env, 0, id, nullptr, 0).first); } TEST(ELikeUseRequirements, Multiple) @@ -149,32 +148,32 @@ TEST(ELikeUseRequirements, Multiple) std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1( parse_elike_use_requirement_no_accumulate("enabled,-disabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[enabled,-disabled]", req1->as_raw_string()); - EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' disabled", req1->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' disabled", req1->as_human_string(nullptr)); + EXPECT_TRUE(req1->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2( parse_elike_use_requirement_no_accumulate("enabled,disabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[enabled,disabled]", req2->as_raw_string()); - EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' enabled", req2->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' enabled", req2->as_human_string(nullptr)); + EXPECT_TRUE(! req2->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3( parse_elike_use_requirement_no_accumulate("-enabled,-disabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[-enabled,-disabled]", req3->as_raw_string()); - EXPECT_EQ("Flag 'enabled' disabled; Flag 'disabled' disabled", req3->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' disabled; Flag 'disabled' disabled", req3->as_human_string(nullptr)); + EXPECT_TRUE(! req3->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4( parse_elike_use_requirement_no_accumulate("enabled,-disabled,-enabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[enabled,-disabled,-enabled]", req4->as_raw_string()); - EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' disabled; Flag 'enabled' disabled", req4->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' disabled; Flag 'enabled' disabled", req4->as_human_string(nullptr)); + EXPECT_TRUE(! req4->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req5( parse_elike_use_requirement_no_accumulate("enabled,-disabled,enabled", { euro_portage_syntax, euro_strict_parsing })); EXPECT_EQ("[enabled,-disabled,enabled]", req5->as_raw_string()); - EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' disabled; Flag 'enabled' enabled", req5->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req5->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'enabled' enabled; Flag 'disabled' disabled; Flag 'enabled' enabled", req5->as_human_string(nullptr)); + EXPECT_TRUE(req5->requirement_met(&env, 0, id, nullptr, 0).first); } TEST(ELikeUseRequirements, Complex) @@ -815,26 +814,26 @@ TEST(ELikeUseRequirements, Defaults) std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1( parse_elike_use_requirement_no_accumulate("missing(+)", { euro_allow_default_values, euro_strict_parsing })); EXPECT_EQ("[missing(+)]", req1->as_raw_string()); - EXPECT_EQ("Flag 'missing' enabled, assuming enabled if missing", req1->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'missing' enabled, assuming enabled if missing", req1->as_human_string(nullptr)); + EXPECT_TRUE(req1->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2( parse_elike_use_requirement_no_accumulate("missing(-)", { euro_allow_default_values, euro_strict_parsing })); EXPECT_EQ("[missing(-)]", req2->as_raw_string()); - EXPECT_EQ("Flag 'missing' enabled, assuming disabled if missing", req2->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'missing' enabled, assuming disabled if missing", req2->as_human_string(nullptr)); + EXPECT_TRUE(! req2->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3( parse_elike_use_requirement_no_accumulate("-missing(+)", { euro_allow_default_values, euro_strict_parsing })); EXPECT_EQ("[-missing(+)]", req3->as_raw_string()); - EXPECT_EQ("Flag 'missing' disabled, assuming enabled if missing", req3->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'missing' disabled, assuming enabled if missing", req3->as_human_string(nullptr)); + EXPECT_TRUE(! req3->requirement_met(&env, 0, id, nullptr, 0).first); std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4( parse_elike_use_requirement_no_accumulate("-missing(-)", { euro_allow_default_values, euro_strict_parsing })); EXPECT_EQ("[-missing(-)]", req4->as_raw_string()); - EXPECT_EQ("Flag 'missing' disabled, assuming disabled if missing", req4->as_human_string(make_null_shared_ptr())); - EXPECT_TRUE(req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first); + EXPECT_EQ("Flag 'missing' disabled, assuming disabled if missing", req4->as_human_string(nullptr)); + EXPECT_TRUE(req4->requirement_met(&env, 0, id, nullptr, 0).first); } TEST(ELikeUseRequirements, PrefixStar) diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc index 8ddcbf5ac..c035867fd 100644 --- a/paludis/environment_implementation.cc +++ b/paludis/environment_implementation.cc @@ -39,7 +39,6 @@ #include <paludis/util/wrapped_forward_iterator-impl.hh> #include <paludis/util/wrapped_output_iterator.hh> #include <paludis/util/pimp-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/env_var_names.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/join.hh> @@ -279,7 +278,7 @@ EnvironmentImplementation::set(const SetName & s) const if (_imp->sets.end() != i) return i->second.first(); else - return make_null_shared_ptr(); + return nullptr; } void @@ -544,7 +543,7 @@ EnvironmentImplementation::fetch_unique_qualified_package_name(const PackageName std::set<std::pair<CategoryNamePart, RepositoryName>, CategoryRepositoryNamePairComparator> checked; std::shared_ptr<const PackageIDSequence> pkgs((*this)[selection::AllVersionsUnsorted( - generator::Matches(make_package_dep_spec({ }).package_name_part(p), make_null_shared_ptr(), { }) | f)]); + generator::Matches(make_package_dep_spec({ }).package_name_part(p), nullptr, { }) | f)]); for (IndirectIterator<PackageIDSequence::ConstIterator> it(pkgs->begin()), it_end(pkgs->end()); it_end != it; ++it) diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc index bf99ed348..2b8c786f6 100644 --- a/paludis/environments/paludis/keywords_conf.cc +++ b/paludis/environments/paludis/keywords_conf.cc @@ -36,7 +36,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/set.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <list> #include <map> #include <mutex> @@ -122,7 +121,7 @@ KeywordsConf::add(const FSPath & filename) catch (const GotASetNotAPackageDepSpec &) { NamedSetMap::iterator i(_imp->set.insert(std::make_pair(SetName(tokens.at(0)), std::make_pair( - make_null_shared_ptr(), KeywordsList()))).first); + nullptr, KeywordsList()))).first); for (std::vector<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ; t != t_end ; ++t) @@ -149,7 +148,7 @@ KeywordsConf::query(const std::shared_ptr<const KeywordNameSet> & k, const std:: for (PDSToKeywordsList::const_iterator j(i->second.begin()), j_end(i->second.end()) ; j != j_end ; ++j) { - if (! match_package(*_imp->env, *j->first, e, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *j->first, e, nullptr, { })) continue; for (KeywordsList::const_iterator l(j->second.begin()), l_end(j->second.end()) ; @@ -215,7 +214,7 @@ KeywordsConf::query(const std::shared_ptr<const KeywordNameSet> & k, const std:: for (PDSToKeywordsList::const_iterator j(_imp->unqualified.begin()), j_end(_imp->unqualified.end()) ; j != j_end ; ++j) { - if (! match_package(*_imp->env, *j->first, e, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *j->first, e, nullptr, { })) continue; for (KeywordsList::const_iterator l(j->second.begin()), l_end(j->second.end()) ; diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc index be975ff83..7da32f1d2 100644 --- a/paludis/environments/paludis/licenses_conf.cc +++ b/paludis/environments/paludis/licenses_conf.cc @@ -35,7 +35,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/iterator_funcs.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/set.hh> #include <list> #include <map> @@ -126,7 +125,7 @@ LicensesConf::add(const FSPath & filename) catch (const GotASetNotAPackageDepSpec &) { NamedSetMap::iterator i(_imp->set.insert(std::make_pair(SetName(tokens.at(0)), std::make_pair( - make_null_shared_ptr(), LicensesList()))).first); + nullptr, LicensesList()))).first); for (std::vector<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ; t != t_end ; ++t) @@ -200,7 +199,7 @@ LicensesConf::query(const std::string & t, const std::shared_ptr<const PackageID for (PDSToLicensesList::const_iterator j(i->second.begin()), j_end(i->second.end()) ; j != j_end ; ++j) { - if (! match_package(*_imp->env, *j->first, e, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *j->first, e, nullptr, { })) continue; for (LicensesList::const_iterator l(j->second.begin()), l_end(j->second.end()) ; @@ -265,7 +264,7 @@ LicensesConf::query(const std::string & t, const std::shared_ptr<const PackageID for (PDSToLicensesList::const_iterator j(_imp->unqualified.begin()), j_end(_imp->unqualified.end()) ; j != j_end ; ++j) { - if (! match_package(*_imp->env, *j->first, e, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *j->first, e, nullptr, { })) continue; for (LicensesList::const_iterator l(j->second.begin()), l_end(j->second.end()) ; diff --git a/paludis/environments/paludis/output_conf.cc b/paludis/environments/paludis/output_conf.cc index 888cb0370..a53b73cff 100644 --- a/paludis/environments/paludis/output_conf.cc +++ b/paludis/environments/paludis/output_conf.cc @@ -37,7 +37,6 @@ #include <paludis/util/visitor_cast.hh> #include <paludis/util/map.hh> #include <paludis/util/simple_parser.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/user_dep_spec.hh> #include <paludis/create_output_manager_info.hh> @@ -202,7 +201,7 @@ namespace return false; if (rule.matches_requirement() && ! match_package(*env, *rule.matches_requirement(), - i.package_id(), make_null_shared_ptr(), { })) + i.package_id(), nullptr, { })) return false; if (! rule.ignore_unfetched_requirement().is_indeterminate()) @@ -395,7 +394,7 @@ OutputConf::add(const FSPath & filename, const FSPath & root) n::action_requirement() = "*", n::ignore_unfetched_requirement() = Tribool(indeterminate), n::manager() = "unset", - n::matches_requirement() = make_null_shared_ptr(), + n::matches_requirement() = nullptr, n::name_requirement() = "*", n::output_exclusivity_requirement() = static_cast<OutputExclusivity>(-1), n::type_requirement() = "*" diff --git a/paludis/environments/paludis/package_mask_conf.cc b/paludis/environments/paludis/package_mask_conf.cc index ae82223d5..6a6e01ac5 100644 --- a/paludis/environments/paludis/package_mask_conf.cc +++ b/paludis/environments/paludis/package_mask_conf.cc @@ -35,7 +35,6 @@ #include <paludis/util/pimp-impl.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <algorithm> #include <functional> #include <list> @@ -109,7 +108,7 @@ PackageMaskConf::add(const FSPath & filename) } catch (const GotASetNotAPackageDepSpec &) { - _imp->sets.push_back(std::make_pair(SetName(spec), std::make_pair(make_null_shared_ptr(), reasons))); + _imp->sets.push_back(std::make_pair(SetName(spec), std::make_pair(nullptr, reasons))); } } } @@ -121,7 +120,7 @@ PackageMaskConf::query(const std::shared_ptr<const PackageID> & e, const std::st for (auto i(_imp->masks.begin()), i_end(_imp->masks.end()) ; i != i_end ; ++i) - if (match_package(*_imp->env, *i->first, e, make_null_shared_ptr(), MatchPackageOptions())) + if (match_package(*_imp->env, *i->first, e, nullptr, MatchPackageOptions())) { if (r.empty()) { diff --git a/paludis/environments/paludis/paludis_environment_TEST.cc b/paludis/environments/paludis/paludis_environment_TEST.cc index 7421ba780..88ae44367 100644 --- a/paludis/environments/paludis/paludis_environment_TEST.cc +++ b/paludis/environments/paludis/paludis_environment_TEST.cc @@ -24,7 +24,6 @@ #include <paludis/util/set.hh> #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/options.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/util/join.hh> @@ -61,10 +60,10 @@ TEST(PaludisEnvironment, Use) std::shared_ptr<Environment> env(std::make_shared<PaludisEnvironment>("")); const std::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - env.get(), { })), make_null_shared_ptr(), { }))]->begin()); + env.get(), { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> three(*(*env)[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3", - env.get(), { })), make_null_shared_ptr(), { }))]->begin()); + env.get(), { })), nullptr, { }))]->begin()); EXPECT_TRUE(get_use("foo", one)); EXPECT_TRUE(! get_use("foofoo", one)); @@ -90,7 +89,7 @@ TEST(PaludisEnvironment, KnownUse) const std::shared_ptr<const PackageID> id1(*(*env)[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - env.get(), { })), make_null_shared_ptr(), { }))]->begin()); + env.get(), { })), nullptr, { }))]->begin()); std::shared_ptr<const Choice> foo_cards; auto choices(id1->choices_key()->parse_value()); for (Choices::ConstIterator c(choices->begin()), c_end(choices->end()) ; @@ -112,10 +111,10 @@ TEST(PaludisEnvironment, UseMinusStar) const std::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - env.get(), { })), make_null_shared_ptr(), { }))]->begin()); + env.get(), { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> three(*(*env)[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3", - env.get(), { })), make_null_shared_ptr(), { }))]->begin()); + env.get(), { })), nullptr, { }))]->begin()); EXPECT_TRUE(get_use("foo", one)); EXPECT_TRUE(! get_use("foofoo", one)); @@ -140,10 +139,10 @@ TEST(PaludisEnvironment, UseMinusPartialStar) const std::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - env.get(), { })), make_null_shared_ptr(), { }))]->begin()); + env.get(), { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> three(*(*env)[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3", - env.get(), { })), make_null_shared_ptr(), { }))]->begin()); + env.get(), { })), nullptr, { }))]->begin()); EXPECT_TRUE(get_use("foo", one)); EXPECT_TRUE(! get_use("foofoo", one)); diff --git a/paludis/environments/paludis/suggestions_conf.cc b/paludis/environments/paludis/suggestions_conf.cc index 66304ffc8..bedf4046a 100644 --- a/paludis/environments/paludis/suggestions_conf.cc +++ b/paludis/environments/paludis/suggestions_conf.cc @@ -29,7 +29,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/iterator_funcs.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/environment.hh> #include <paludis/name.hh> #include <paludis/dep_spec.hh> @@ -164,7 +163,7 @@ SuggestionsConf::add(const FSPath & filename) catch (const GotASetNotAPackageDepSpec &) { NamedSetMap::iterator i(_imp->set.insert(std::make_pair(SetName(tokens.at(0)), std::make_pair( - make_null_shared_ptr(), ValuesList()))).first); + nullptr, ValuesList()))).first); for (std::vector<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ; t != t_end ; ++t) @@ -194,7 +193,7 @@ SuggestionsConf::interest_in_suggestion( for (PDSToValuesList::const_iterator j(i->second.begin()), j_end(i->second.end()) ; j != j_end ; ++j) { - if (! match_package(*_imp->env, *j->first, from_id, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *j->first, from_id, nullptr, { })) continue; for (ValuesList::const_iterator l(j->second.begin()), l_end(j->second.end()) ; @@ -269,7 +268,7 @@ SuggestionsConf::interest_in_suggestion( for (PDSToValuesList::const_iterator j(_imp->unqualified.begin()), j_end(_imp->unqualified.end()) ; j != j_end ; ++j) { - if (! match_package(*_imp->env, *j->first, from_id, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *j->first, from_id, nullptr, { })) continue; for (ValuesList::const_iterator l(j->second.begin()), l_end(j->second.end()) ; diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc index e02721568..71fc907c7 100644 --- a/paludis/environments/portage/portage_environment.cc +++ b/paludis/environments/portage/portage_environment.cc @@ -40,7 +40,6 @@ #include <paludis/util/fs_stat.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/fs_error.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/env_var_names.hh> #include <paludis/util/join.hh> #include <paludis/util/upper_lower.hh> @@ -583,7 +582,7 @@ PortageEnvironment::want_choice_enabled( for (PackageUse::const_iterator i(_imp->package_use.begin()), i_end(_imp->package_use.end()) ; i != i_end ; ++i) { - if (! match_package(*this, *i->first, id, make_null_shared_ptr(), { })) + if (! match_package(*this, *i->first, id, nullptr, { })) continue; if (i->second == stringify(f)) @@ -627,7 +626,7 @@ PortageEnvironment::accept_keywords(const std::shared_ptr <const KeywordNameSet> for (PackageKeywords::const_iterator it(_imp->package_keywords.begin()), it_end(_imp->package_keywords.end()); it_end != it; ++it) { - if (! match_package(*this, *it->first, d, make_null_shared_ptr(), { })) + if (! match_package(*this, *it->first, d, nullptr, { })) continue; if ("-*" == it->second) @@ -662,7 +661,7 @@ PortageEnvironment::unmasked_by_user(const std::shared_ptr<const PackageID> & e, { for (PackageUnmask::const_iterator i(_imp->package_unmask.begin()), i_end(_imp->package_unmask.end()) ; i != i_end ; ++i) - if (match_package(*this, **i, e, make_null_shared_ptr(), { })) + if (match_package(*this, **i, e, nullptr, { })) return true; return false; @@ -687,7 +686,7 @@ PortageEnvironment::known_choice_value_names(const std::shared_ptr<const Package for (PackageUse::const_iterator i(_imp->package_use.begin()), i_end(_imp->package_use.end()) ; i != i_end ; ++i) { - if (! match_package(*this, *i->first, id, make_null_shared_ptr(), { })) + if (! match_package(*this, *i->first, id, nullptr, { })) continue; if (0 == i->second.compare(0, prefix_lower.length(), prefix_lower, 0, prefix_lower.length())) @@ -836,7 +835,7 @@ PortageEnvironment::mask_for_user(const std::shared_ptr<const PackageID> & d, co { for (PackageMask::const_iterator i(_imp->package_mask.begin()), i_end(_imp->package_mask.end()) ; i != i_end ; ++i) - if (match_package(*this, **i, d, make_null_shared_ptr(), { })) + if (match_package(*this, **i, d, nullptr, { })) return std::make_shared<UserConfigMask>(o); return std::shared_ptr<const Mask>(); diff --git a/paludis/environments/portage/portage_environment_TEST.cc b/paludis/environments/portage/portage_environment_TEST.cc index 03db3e867..41bbc83df 100644 --- a/paludis/environments/portage/portage_environment_TEST.cc +++ b/paludis/environments/portage/portage_environment_TEST.cc @@ -25,7 +25,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/options.hh> #include <paludis/util/safe_ifstream.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/package_id.hh> #include <paludis/dep_spec.hh> @@ -80,11 +79,11 @@ TEST(PortageEnvironment, QueryUse) const std::shared_ptr<const PackageID> idx(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(get_use("one", env, idx)); EXPECT_TRUE(get_use("two", env, idx)); @@ -110,7 +109,7 @@ TEST(PortageEnvironment, KnownUseFlagNames) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); std::shared_ptr<const Choice> foo_cards; auto choices(id1->choices_key()->parse_value()); for (Choices::ConstIterator c(choices->begin()), c_end(choices->end()) ; @@ -129,7 +128,7 @@ TEST(PortageEnvironment, AcceptKeywords) const std::shared_ptr<const PackageID> idx(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(accept_keyword(env, KeywordName("arch"), idx)); EXPECT_TRUE(accept_keyword(env, KeywordName("other_arch"), idx)); @@ -137,7 +136,7 @@ TEST(PortageEnvironment, AcceptKeywords) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(accept_keyword(env, KeywordName("arch"), id1)); EXPECT_TRUE(accept_keyword(env, KeywordName("other_arch"), id1)); @@ -145,7 +144,7 @@ TEST(PortageEnvironment, AcceptKeywords) const std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(accept_keyword(env, KeywordName("other_arch"), id2)); EXPECT_TRUE(accept_keyword(env, KeywordName("arch"), id2)); @@ -153,7 +152,7 @@ TEST(PortageEnvironment, AcceptKeywords) const std::shared_ptr<const PackageID> id3(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-three-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(! accept_keyword(env, KeywordName("other_arch"), id3)); EXPECT_TRUE(! accept_keyword(env, KeywordName("arch"), id3)); @@ -161,14 +160,14 @@ TEST(PortageEnvironment, AcceptKeywords) const std::shared_ptr<const PackageID> id4(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-four-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(accept_keyword(env, KeywordName("fred"), id4)); std::shared_ptr<const KeywordNameSet> empty(std::make_shared<KeywordNameSet>()); EXPECT_TRUE(env.accept_keywords(empty, id4)); const std::shared_ptr<const PackageID> id5(*env[selection::RequireExactlyOne( generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-five-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(accept_keyword(env, KeywordName("~foo"), id5)); EXPECT_TRUE(! accept_keyword(env, KeywordName("foo"), id5)); } diff --git a/paludis/filter_TEST.cc b/paludis/filter_TEST.cc index 306519852..531f92665 100644 --- a/paludis/filter_TEST.cc +++ b/paludis/filter_TEST.cc @@ -33,7 +33,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/join.hh> #include <paludis/util/stringify.hh> @@ -100,7 +99,7 @@ TEST_P(FilterTestCaseBase, Works) std::shared_ptr<const PackageIDSequence> got_none(env[selection::AllVersionsSorted( generator::Matches(parse_user_package_dep_spec("not/exist", &env, - { }), make_null_shared_ptr(), { }) | *info.filter)]); + { }), nullptr, { }) | *info.filter)]); ASSERT_TRUE(bool(got_none)); EXPECT_EQ("", join(indirect_iterator(got_none->begin()), indirect_iterator(got_none->end()), ", ")); } @@ -147,21 +146,21 @@ INSTANTIATE_TEST_CASE_P(FilterTest, FilterTestCaseBase, testing::Values( "cat/c-3:0::repo2") }, TestInfo{ std::make_shared<filter::Matches>(envless_parse_package_dep_spec_for_tests( - "cat/a"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + "cat/a"), nullptr, MatchPackageOptions()), std::string( "cat/a-1:0::inst_repo1, " "cat/a-1:0::repo1, " "cat/a-1:0::repo2, " "cat/a-2:0::repo2") }, TestInfo{ std::make_shared<filter::Matches>(envless_parse_package_dep_spec_for_tests( - "*/a"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + "*/a"), nullptr, MatchPackageOptions()), std::string( "cat/a-1:0::inst_repo1, " "cat/a-1:0::repo1, " "cat/a-1:0::repo2, " "cat/a-2:0::repo2") }, TestInfo{ std::make_shared<filter::Matches>(envless_parse_package_dep_spec_for_tests( - "cat/*"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + "cat/*"), nullptr, MatchPackageOptions()), std::string( "cat/a-1:0::inst_repo1, " "cat/a-1:0::repo1, " "cat/a-1:0::repo2, " @@ -170,7 +169,7 @@ INSTANTIATE_TEST_CASE_P(FilterTest, FilterTestCaseBase, testing::Values( "cat/c-3:0::repo2" ) }, TestInfo{ std::make_shared<filter::Matches>(envless_parse_package_dep_spec_for_tests( - ">=*/*-2"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + ">=*/*-2"), nullptr, MatchPackageOptions()), std::string( "cat/a-2:0::repo2, " "cat/b-2:0::repo1, " "cat/c-3:0::repo2" ) } diff --git a/paludis/fs_merger.cc b/paludis/fs_merger.cc index db2cbf69f..e08a05a65 100644 --- a/paludis/fs_merger.cc +++ b/paludis/fs_merger.cc @@ -29,7 +29,6 @@ #include <paludis/util/set.hh> #include <paludis/util/timestamp.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/fs_error.hh> diff --git a/paludis/fs_merger_TEST.cc b/paludis/fs_merger_TEST.cc index adc0c7b7e..5b63ca3d3 100644 --- a/paludis/fs_merger_TEST.cc +++ b/paludis/fs_merger_TEST.cc @@ -28,7 +28,6 @@ #include <paludis/util/safe_ifstream.hh> #include <paludis/util/set.hh> #include <paludis/util/timestamp.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/fs_path.hh> @@ -171,11 +170,11 @@ namespace n::get_new_ids_or_minus_one() = &get_new_ids_or_minus_one, n::image() = image_dir, n::install_under() = FSPath("/"), - n::maybe_output_manager() = make_null_shared_ptr(), + n::maybe_output_manager() = nullptr, n::merged_entries() = std::make_shared<FSPathSet>(), n::no_chown() = true, n::options() = MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs, - n::parts() = make_null_shared_ptr(), + n::parts() = nullptr, n::permit_destination() = std::bind(return_literal_function(true)), n::root() = root_dir.realpath() )) @@ -195,11 +194,11 @@ namespace n::get_new_ids_or_minus_one() = &get_new_ids_or_minus_one, n::image() = image_dir, n::install_under() = FSPath("/"), - n::maybe_output_manager() = make_null_shared_ptr(), + n::maybe_output_manager() = nullptr, n::merged_entries() = std::make_shared<FSPathSet>(), n::no_chown() = true, n::options() = o, - n::parts() = make_null_shared_ptr(), + n::parts() = nullptr, n::permit_destination() = std::bind(return_literal_function(true)), n::root() = root_dir.realpath() )) diff --git a/paludis/generator_TEST.cc b/paludis/generator_TEST.cc index 033c1f7b4..f141db4d3 100644 --- a/paludis/generator_TEST.cc +++ b/paludis/generator_TEST.cc @@ -33,7 +33,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/join.hh> #include <gtest/gtest.h> @@ -118,21 +117,21 @@ INSTANTIATE_TEST_CASE_P(GeneratorTest, GeneratorTestCaseBase, testing::Values( "cat/c-3:0::repo2" ) }, TestInfo{ std::make_shared<generator::Matches>( - envless_parse_package_dep_spec_for_tests("cat/a"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + envless_parse_package_dep_spec_for_tests("cat/a"), nullptr, MatchPackageOptions()), std::string( "cat/a-1:0::inst_repo1, " "cat/a-1:0::repo1, " "cat/a-1:0::repo2, " "cat/a-2:0::repo2") }, TestInfo{ std::make_shared<generator::Matches>( - envless_parse_package_dep_spec_for_tests("*/a"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + envless_parse_package_dep_spec_for_tests("*/a"), nullptr, MatchPackageOptions()), std::string( "cat/a-1:0::inst_repo1, " "cat/a-1:0::repo1, " "cat/a-1:0::repo2, " "cat/a-2:0::repo2") }, TestInfo{ std::make_shared<generator::Matches>( - envless_parse_package_dep_spec_for_tests("cat/*"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + envless_parse_package_dep_spec_for_tests("cat/*"), nullptr, MatchPackageOptions()), std::string( "cat/a-1:0::inst_repo1, " "cat/a-1:0::repo1, " "cat/a-1:0::repo2, " @@ -141,7 +140,7 @@ INSTANTIATE_TEST_CASE_P(GeneratorTest, GeneratorTestCaseBase, testing::Values( "cat/c-3:0::repo2") }, TestInfo{ std::make_shared<generator::Matches>( - envless_parse_package_dep_spec_for_tests(">=*/*-2"), make_null_shared_ptr(), MatchPackageOptions()), std::string( + envless_parse_package_dep_spec_for_tests(">=*/*-2"), nullptr, MatchPackageOptions()), std::string( "cat/a-2:0::repo2, " "cat/b-2:0::repo1, " "cat/c-3:0::repo2") }, @@ -174,8 +173,8 @@ INSTANTIATE_TEST_CASE_P(GeneratorTest, GeneratorTestCaseBase, testing::Values( "") }, TestInfo{ std::make_shared<generator::Intersection>( - generator::Matches(envless_parse_package_dep_spec_for_tests("*/a"), make_null_shared_ptr(), MatchPackageOptions()), - generator::Matches(envless_parse_package_dep_spec_for_tests("cat/*"), make_null_shared_ptr(), MatchPackageOptions()) + generator::Matches(envless_parse_package_dep_spec_for_tests("*/a"), nullptr, MatchPackageOptions()), + generator::Matches(envless_parse_package_dep_spec_for_tests("cat/*"), nullptr, MatchPackageOptions()) ), std::string( "cat/a-1:0::inst_repo1, " "cat/a-1:0::repo1, " diff --git a/paludis/hooker_TEST.cc b/paludis/hooker_TEST.cc index f11889976..32b5c56c1 100644 --- a/paludis/hooker_TEST.cc +++ b/paludis/hooker_TEST.cc @@ -24,7 +24,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/safe_ifstream.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <iterator> @@ -43,23 +42,23 @@ TEST(Hooker, Works) hooker.add_dir(FSPath("hooker_TEST_dir/"), false); #ifdef ENABLE_PYTHON_HOOKS result = hooker.perform_hook(Hook("py_hook"), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); #endif result = hooker.perform_hook(Hook("simple_hook"), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(3, result.max_exit_status()); EXPECT_EQ("", result.output()); result = hooker.perform_hook(Hook("fancy_hook"), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(5, result.max_exit_status()); EXPECT_EQ("", result.output()); result = hooker.perform_hook(Hook("so_hook"), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(6, result.max_exit_status()); EXPECT_EQ("", result.output()); result = hooker.perform_hook(Hook("several_hooks"), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(7, result.max_exit_status()); EXPECT_EQ("", result.output()); @@ -74,7 +73,7 @@ TEST(Hooker, Ordering) hooker.add_dir(FSPath("hooker_TEST_dir/"), false); HookResult result(hooker.perform_hook(Hook("ordering"), - make_null_shared_ptr())); + nullptr)); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("", result.output()); @@ -98,7 +97,7 @@ TEST(Hooker, BadHooks) hooker.add_dir(FSPath("hooker_TEST_dir/"), false); HookResult result(hooker.perform_hook(Hook("bad_hooks"), - make_null_shared_ptr())); + nullptr)); EXPECT_EQ(123, result.max_exit_status()); EXPECT_EQ("", result.output()); @@ -117,7 +116,7 @@ TEST(Hooker, Cycles) hooker.add_dir(FSPath("hooker_TEST_dir/"), false); HookResult result(hooker.perform_hook(Hook("cycles"), - make_null_shared_ptr())); + nullptr)); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("", result.output()); @@ -139,51 +138,51 @@ TEST(Hooker, Output) result = hooker.perform_hook(Hook("simple_hook_output") .grab_output(Hook::AllowedOutputValues()("foo")), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("foo", result.output()); result = hooker.perform_hook(Hook("fancy_hook_output") .grab_output(Hook::AllowedOutputValues()("foo")), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("foo", result.output()); result = hooker.perform_hook(Hook("so_hook_output") .grab_output(Hook::AllowedOutputValues()("foo")), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("foo", result.output()); #ifdef ENABLE_PYTHON_HOOKS result = hooker.perform_hook(Hook("py_hook_output") .grab_output(Hook::AllowedOutputValues()("foo")), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("foo", result.output()); #endif result = hooker.perform_hook(Hook("several_hooks_output") .grab_output(Hook::AllowedOutputValues()), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("one", result.output()); result = hooker.perform_hook(Hook("several_hooks_output") .grab_output(Hook::AllowedOutputValues()("one")), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("one", result.output()); result = hooker.perform_hook(Hook("several_hooks_output") .grab_output(Hook::AllowedOutputValues()("two")("three")), - make_null_shared_ptr()); + nullptr); EXPECT_EQ(0, result.max_exit_status()); EXPECT_EQ("two", result.output()); result = hooker.perform_hook(Hook("several_hooks_output") .grab_output(Hook::AllowedOutputValues()("blah")), - make_null_shared_ptr()); + nullptr); EXPECT_EQ("", result.output()); EXPECT_EQ(0, result.max_exit_status()); @@ -205,7 +204,7 @@ TEST(Hooker, BadOutput) HookResult result(hooker.perform_hook(Hook("several_hooks_output_bad") .grab_output(Hook::AllowedOutputValues()), - make_null_shared_ptr())); + nullptr)); EXPECT_EQ("two", result.output()); EXPECT_EQ(99, result.max_exit_status()); diff --git a/paludis/match_package.cc b/paludis/match_package.cc index 8e1167b1c..e7ecbb4c4 100644 --- a/paludis/match_package.cc +++ b/paludis/match_package.cc @@ -36,7 +36,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/sequence.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <functional> @@ -259,6 +258,6 @@ paludis::match_package_in_set( target.top()->accept(f); return indirect_iterator(f.end()) != std::find_if( indirect_iterator(f.begin()), indirect_iterator(f.end()), - std::bind(&match_package, std::cref(env), _1, std::cref(id), make_null_shared_ptr(), std::cref(options))); + std::bind(&match_package, std::cref(env), _1, std::cref(id), nullptr, std::cref(options))); } diff --git a/paludis/merger.cc b/paludis/merger.cc index 3b9cb5499..3a404aad5 100644 --- a/paludis/merger.cc +++ b/paludis/merger.cc @@ -23,7 +23,6 @@ #include <paludis/util/log.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/util/timestamp.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/fs_stat.hh> #include <paludis/selinux/security_context.hh> diff --git a/paludis/paludislike_options_conf.cc b/paludis/paludislike_options_conf.cc index 589032f52..1e96408ff 100644 --- a/paludis/paludislike_options_conf.cc +++ b/paludis/paludislike_options_conf.cc @@ -32,7 +32,6 @@ #include <paludis/util/set.hh> #include <paludis/util/active_object_ptr.hh> #include <paludis/util/deferred_construction_ptr.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/choice.hh> #include <paludis/dep_spec.hh> #include <paludis/name.hh> @@ -427,7 +426,7 @@ namespace { if (maybe_id) { - if (! match_package(*env, i->spec(), maybe_id, make_null_shared_ptr(), { })) + if (! match_package(*env, i->spec(), maybe_id, nullptr, { })) continue; } else @@ -454,7 +453,7 @@ namespace { if (maybe_id) { - if (! match_package(*env, i->spec(), maybe_id, make_null_shared_ptr(), { })) + if (! match_package(*env, i->spec(), maybe_id, nullptr, { })) continue; } else diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc index ff985c19c..dd94cd1e6 100644 --- a/paludis/repositories/accounts/accounts_id.cc +++ b/paludis/repositories/accounts/accounts_id.cc @@ -29,7 +29,6 @@ #include <paludis/util/tokeniser.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/wrapped_output_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/return_literal_function.hh> #include <paludis/output_manager.hh> @@ -108,7 +107,7 @@ namespace paludis fs_location_key(std::make_shared<LiteralMetadataValueKey<FSPath>>("location", "Location", mkt_internal, l)), from_repositories_key(f), behaviours_key(AccountsIDBehaviours::get_instance()->behaviours_key), - mask(m ? std::make_shared<AccountsInstalledMask>() : make_null_shared_ptr()), + mask(m ? std::make_shared<AccountsInstalledMask>() : nullptr), is_user(u), has_file_keys(false), has_metadata_keys(false) @@ -313,7 +312,7 @@ AccountsID::uniquely_identifying_spec() const const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > AccountsID::keywords_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > @@ -333,7 +332,7 @@ AccountsID::run_dependencies_key() const const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > AccountsID::post_dependencies_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > @@ -346,13 +345,13 @@ AccountsID::dependencies_key() const const std::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > AccountsID::fetches_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > AccountsID::homepage_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<std::string> > @@ -370,13 +369,13 @@ AccountsID::short_description_key() const const std::shared_ptr<const MetadataValueKey<std::string> > AccountsID::long_description_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataTimeKey> AccountsID::installed_time_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > @@ -400,13 +399,13 @@ AccountsID::behaviours_key() const const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > AccountsID::choices_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<Slot> > AccountsID::slot_key() const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const Set<std::string> > @@ -479,7 +478,7 @@ AccountsID::perform_action(Action & action) const n::options() = MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs, n::output_manager() = output_manager, n::package_id() = shared_from_this(), - n::parts() = make_null_shared_ptr(), + n::parts() = nullptr, n::perform_uninstall() = install_action->options.perform_uninstall(), n::permit_destination() = std::bind(return_literal_function(true)), n::replacing() = install_action->options.replacing(), @@ -542,7 +541,7 @@ AccountsID::perform_action(Action & action) const n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = std::bind(&this_output_manager, output_manager, std::placeholders::_1), - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = install_action->options.want_phase() )); install_action->options.perform_uninstall()(*i, uo); @@ -555,6 +554,6 @@ AccountsID::perform_action(Action & action) const const std::shared_ptr<const Contents> AccountsID::contents() const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc index ea00958cc..91aeff753 100644 --- a/paludis/repositories/accounts/accounts_repository.cc +++ b/paludis/repositories/accounts/accounts_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009, 2010, 2011 Ciaran McCreesh + * Copyright (c) 2009, 2010, 2011, 2013 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -29,7 +29,6 @@ #include <paludis/util/deferred_construction_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/util/log.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/action.hh> #include <paludis/package_id.hh> @@ -247,7 +246,7 @@ AccountsRepository::format_key() const const std::shared_ptr<const MetadataValueKey<FSPath> > AccountsRepository::location_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<FSPath> > @@ -259,7 +258,7 @@ AccountsRepository::installed_root_key() const const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > AccountsRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } void @@ -444,7 +443,7 @@ AccountsRepository::sync( const std::shared_ptr<const Set<std::string> > AccountsRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc index f0babf6fb..4bba75464 100644 --- a/paludis/repositories/accounts/installed_accounts_id.cc +++ b/paludis/repositories/accounts/installed_accounts_id.cc @@ -28,7 +28,6 @@ #include <paludis/util/tokeniser.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/log.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/name.hh> #include <paludis/version_spec.hh> @@ -229,13 +228,13 @@ InstalledAccountsID::uniquely_identifying_spec() const const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > InstalledAccountsID::keywords_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > InstalledAccountsID::build_dependencies_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > @@ -248,7 +247,7 @@ InstalledAccountsID::run_dependencies_key() const const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > InstalledAccountsID::post_dependencies_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > @@ -261,43 +260,43 @@ InstalledAccountsID::dependencies_key() const const std::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > InstalledAccountsID::fetches_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > InstalledAccountsID::homepage_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<std::string> > InstalledAccountsID::short_description_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<std::string> > InstalledAccountsID::long_description_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataTimeKey> InstalledAccountsID::installed_time_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > InstalledAccountsID::from_repositories_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<FSPath> > InstalledAccountsID::fs_location_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > @@ -309,13 +308,13 @@ InstalledAccountsID::behaviours_key() const const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > InstalledAccountsID::choices_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<Slot> > InstalledAccountsID::slot_key() const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const Set<std::string> > @@ -351,6 +350,6 @@ InstalledAccountsID::perform_action(Action & action) const const std::shared_ptr<const Contents> InstalledAccountsID::contents() const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc index 66650eeaa..140f4dfbc 100644 --- a/paludis/repositories/e/dep_parser.cc +++ b/paludis/repositories/e/dep_parser.cc @@ -32,7 +32,6 @@ #include <paludis/util/return_literal_function.hh> #include <paludis/util/log.hh> #include <paludis/util/visitor_cast.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/elike_dep_parser.hh> #include <paludis/elike_conditional_dep_spec.hh> diff --git a/paludis/repositories/e/do_fetch_action.cc b/paludis/repositories/e/do_fetch_action.cc index ae47d70f3..6e5dd94c7 100644 --- a/paludis/repositories/e/do_fetch_action.cc +++ b/paludis/repositories/e/do_fetch_action.cc @@ -36,7 +36,6 @@ #include <paludis/util/wrapped_output_iterator.hh> #include <paludis/util/stringify.hh> #include <paludis/util/join.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec_flattener.hh> #include <paludis/metadata_key.hh> @@ -195,8 +194,8 @@ paludis::erepository::do_fetch_action( n::maybe_output_manager() = output_manager, n::package_builddir() = package_builddir, n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (params.master_repositories() && ! params.master_repositories()->empty()) ? (*params.master_repositories()->begin())->params().location() @@ -245,8 +244,8 @@ paludis::erepository::do_fetch_action( n::maybe_output_manager() = output_manager, n::package_builddir() = repo->params().builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-nofetch"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (repo->params().master_repositories() && ! repo->params().master_repositories()->empty()) ? (*repo->params().master_repositories()->begin())->params().location() : repo->params().location(), n::root() = "/", diff --git a/paludis/repositories/e/do_info_action.cc b/paludis/repositories/e/do_info_action.cc index ed02f7aa8..117a261d5 100644 --- a/paludis/repositories/e/do_info_action.cc +++ b/paludis/repositories/e/do_info_action.cc @@ -28,7 +28,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/stringify.hh> #include <paludis/util/join.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec_flattener.hh> #include <paludis/action.hh> @@ -104,8 +103,8 @@ paludis::erepository::do_info_action( n::maybe_output_manager() = output_manager, n::package_builddir() = params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (params.master_repositories() && ! params.master_repositories()->empty()) ? (*params.master_repositories()->begin())->params().location() diff --git a/paludis/repositories/e/do_install_action.cc b/paludis/repositories/e/do_install_action.cc index f1a3afb0f..7dfe759dc 100644 --- a/paludis/repositories/e/do_install_action.cc +++ b/paludis/repositories/e/do_install_action.cc @@ -38,7 +38,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/log.hh> #include <paludis/util/join.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/return_literal_function.hh> #include <paludis/util/tokeniser.hh> @@ -507,7 +506,7 @@ paludis::erepository::do_install_action( std::placeholders::_1), n::is_overwrite() = false, n::make_output_manager() = std::bind(&this_output_manager, output_manager, std::placeholders::_1), - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = install_action.options.want_phase() )); install_action.options.perform_uninstall()(*i, uo); diff --git a/paludis/repositories/e/do_pretend_action.cc b/paludis/repositories/e/do_pretend_action.cc index 6806e1f72..60cd04953 100644 --- a/paludis/repositories/e/do_pretend_action.cc +++ b/paludis/repositories/e/do_pretend_action.cc @@ -31,7 +31,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/stringify.hh> #include <paludis/util/join.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec_flattener.hh> #include <paludis/metadata_key.hh> @@ -121,8 +120,8 @@ paludis::erepository::do_pretend_action( n::maybe_output_manager() = output_manager, n::package_builddir() = params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-bad_options"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (params.master_repositories() && ! params.master_repositories()->empty()) ? (*params.master_repositories()->begin())->params().location() : params.location(), @@ -187,8 +186,8 @@ paludis::erepository::do_pretend_action( n::maybe_output_manager() = output_manager, n::package_builddir() = params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-bad_options"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (params.master_repositories() && ! params.master_repositories()->empty()) ? (*params.master_repositories()->begin())->params().location() @@ -252,8 +251,8 @@ paludis::erepository::do_pretend_action( n::maybe_output_manager() = output_manager, n::package_builddir() = params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-pretend"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (params.master_repositories() && ! params.master_repositories()->empty()) ? (*params.master_repositories()->begin())->params().location() diff --git a/paludis/repositories/e/e_choice_value.cc b/paludis/repositories/e/e_choice_value.cc index e381ac3ce..342e10daf 100644 --- a/paludis/repositories/e/e_choice_value.cc +++ b/paludis/repositories/e/e_choice_value.cc @@ -19,7 +19,6 @@ #include <paludis/repositories/e/e_choice_value.hh> #include <paludis/repositories/e/use_desc.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/pool-impl.hh> @@ -107,7 +106,7 @@ EChoiceValue::parameter() const const std::shared_ptr<const PermittedChoiceValueParameterValues> EChoiceValue::permitted_parameter_values() const { - return make_null_shared_ptr(); + return nullptr; } bool diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc index 2632c1951..a94e1bdec 100644 --- a/paludis/repositories/e/e_installed_repository.cc +++ b/paludis/repositories/e/e_installed_repository.cc @@ -41,7 +41,6 @@ #include <paludis/util/fs_stat.hh> #include <paludis/util/join.hh> #include <paludis/util/is_file_with_extension.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/action.hh> #include <paludis/package_id.hh> @@ -266,8 +265,8 @@ EInstalledRepository::perform_config( n::maybe_output_manager() = output_manager, n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-config"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = ver_dir, n::root() = stringify(_imp->params.root()), n::sandbox() = phase->option("sandbox"), @@ -375,8 +374,8 @@ EInstalledRepository::perform_info( n::maybe_output_manager() = output_manager, n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = ver_dir, n::root() = stringify(_imp->params.root()), n::sandbox() = phase->option("sandbox"), @@ -417,6 +416,6 @@ EInstalledRepository::sync(const std::string &, const std::string &, const std:: const std::shared_ptr<const Set<std::string> > EInstalledRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc index 8a2f9fd02..a66dcbd26 100644 --- a/paludis/repositories/e/e_installed_repository_id.cc +++ b/paludis/repositories/e/e_installed_repository_id.cc @@ -36,7 +36,6 @@ #include <paludis/util/safe_ifstream.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/return_literal_function.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/strip.hh> @@ -515,10 +514,10 @@ EInstalledRepositoryID::need_keys_added() const if (_imp->eapi->supported()) _imp->keys->choices = std::make_shared<EChoicesKey>(_imp->environment, shared_from_this(), "PALUDIS_CHOICES", _imp->eapi->supported()->ebuild_environment_variables()->description_choices(), - mkt_normal, make_null_shared_ptr(), std::bind(return_literal_function(make_null_shared_ptr()))); + mkt_normal, nullptr, std::bind(return_literal_function(nullptr))); else _imp->keys->choices = std::make_shared<EChoicesKey>(_imp->environment, shared_from_this(), "PALUDIS_CHOICES", "Choices", mkt_normal, - make_null_shared_ptr(), std::bind(return_literal_function(make_null_shared_ptr()))); + nullptr, std::bind(return_literal_function(nullptr))); add_metadata_key(_imp->keys->choices); @@ -763,7 +762,7 @@ EInstalledRepositoryID::license_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > EInstalledRepositoryID::behaviours_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc index ba0e2a7ed..63a914169 100644 --- a/paludis/repositories/e/e_repository.cc +++ b/paludis/repositories/e/e_repository.cc @@ -79,7 +79,6 @@ #include <paludis/util/join.hh> #include <paludis/util/log.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/make_shared_copy.hh> #include <paludis/util/map.hh> #include <paludis/util/options.hh> @@ -1745,11 +1744,11 @@ ERepository::get_environment_variable( n::environment() = _imp->params.environment(), n::exlibsdirs() = exlibsdirs, n::files_dir() = layout()->package_directory(id->name()) / "files", - n::maybe_output_manager() = make_null_shared_ptr(), + n::maybe_output_manager() = nullptr, n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-variable"), n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), @@ -1776,7 +1775,7 @@ namespace i != i_end ; ++i) if ((*i)->version() == v) return *i; - return make_null_shared_ptr(); + return nullptr; } } diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc index 3de7415a4..b450ff58e 100644 --- a/paludis/repositories/e/e_repository_TEST.cc +++ b/paludis/repositories/e/e_repository_TEST.cc @@ -34,7 +34,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> #include <paludis/util/fs_stat.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -408,7 +407,7 @@ TEST(ERepository, MetadataUncached) { const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); EXPECT_TRUE(id1->end_metadata() != id1->find_metadata("EAPI")); EXPECT_TRUE(visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI"))); @@ -427,7 +426,7 @@ TEST(ERepository, MetadataUncached) const std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-2", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(id2->end_metadata() != id2->find_metadata("EAPI")); ASSERT_TRUE(bool(id2->short_description_key())); @@ -443,7 +442,7 @@ TEST(ERepository, MetadataUncached) const std::shared_ptr<const PackageID> id3(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-3", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(id3->end_metadata() != id3->find_metadata("EAPI")); ASSERT_TRUE(bool(id3->short_description_key())); @@ -471,7 +470,7 @@ TEST(ERepository, MetadataUnparsable) { const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(id1->end_metadata() != id1->find_metadata("EAPI")); EXPECT_EQ("UNKNOWN", std::static_pointer_cast<const erepository::ERepositoryID>(id1)->eapi()->name()); @@ -513,13 +512,13 @@ TEST_F(ERepositoryQueryUseTest, QueryUse) { const std::shared_ptr<const PackageID> p1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> p2(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-two/pkg-two-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> p4(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-2", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); test_choice(p1, "flag1", true, true, false); test_choice(p1, "flag2", false, false, true); @@ -589,19 +588,19 @@ TEST_F(ERepositoryQueryUseTest, UseStableMaskForce) { const std::shared_ptr<const PackageID> stable1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/stable-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> stable1r1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/stable-1-r1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> stable2(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/stable-2", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> unstable1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/unstable-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); const std::shared_ptr<const PackageID> missing1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/missing-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); test_choice(stable1, "notstmask", false, false, false); test_choice(stable1, "notpkgstmask", false, false, false); @@ -795,29 +794,29 @@ TEST(ERepository, Masks) EXPECT_TRUE((*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-1::test-repo-18", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE((*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-2::test-repo-18", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE(! (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-3::test-repo-18", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE(! (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-4::test-repo-18", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE((*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-1::test-repo-19", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE(! (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-2::test-repo-19", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE((*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-3::test-repo-19", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE(! (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=category/package-4::test-repo-19", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); } TEST(ERepository, ProfileMasks) @@ -837,13 +836,13 @@ TEST(ERepository, ProfileMasks) { EXPECT_TRUE((*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/masked-0", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE(! (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); EXPECT_TRUE(! (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/not_masked-0", - &env, { })), make_null_shared_ptr(), { }))]->begin())->masked()); + &env, { })), nullptr, { }))]->begin())->masked()); } } @@ -928,7 +927,7 @@ TEST(ERepository, Fetch) { const std::shared_ptr<const PackageID> no_files_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/no-files", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(no_files_id)); ASSERT_TRUE(bool(no_files_id->short_description_key())); EXPECT_EQ("The Short Description", no_files_id->short_description_key()->parse_value()); @@ -938,7 +937,7 @@ TEST(ERepository, Fetch) { const std::shared_ptr<const PackageID> fetched_files_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/fetched-files", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(fetched_files_id)); EXPECT_TRUE((FSPath("e_repository_TEST_dir") / "distdir" / "already-fetched.txt").stat().is_regular_file()); fetched_files_id->perform_action(action); @@ -949,7 +948,7 @@ TEST(ERepository, Fetch) EXPECT_TRUE(! (FSPath("e_repository_TEST_dir") / "distdir" / "fetchable-1.txt").stat().is_regular_file()); const std::shared_ptr<const PackageID> fetchable_files_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/fetchable-files", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(fetchable_files_id)); fetchable_files_id->perform_action(action); EXPECT_TRUE((FSPath("e_repository_TEST_dir") / "distdir" / "fetchable-1.txt").stat().is_regular_file()); @@ -959,7 +958,7 @@ TEST(ERepository, Fetch) EXPECT_TRUE(! (FSPath("e_repository_TEST_dir") / "distdir" / "arrowed.txt").stat().is_regular_file()); const std::shared_ptr<const PackageID> arrow_files_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/arrow-files", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(arrow_files_id)); arrow_files_id->perform_action(action); EXPECT_TRUE((FSPath("e_repository_TEST_dir") / "distdir" / "arrowed.txt").stat().is_regular_file()); @@ -968,7 +967,7 @@ TEST(ERepository, Fetch) { const std::shared_ptr<const PackageID> unfetchable_files_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/unfetchable-files", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(unfetchable_files_id)); EXPECT_THROW(unfetchable_files_id->perform_action(action), ActionFailedError); } @@ -976,7 +975,7 @@ TEST(ERepository, Fetch) { const std::shared_ptr<const PackageID> no_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/no-files-restricted", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(no_files_restricted_id)); no_files_restricted_id->perform_action(action); } @@ -984,7 +983,7 @@ TEST(ERepository, Fetch) { const std::shared_ptr<const PackageID> fetched_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/fetched-files-restricted", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(fetched_files_restricted_id)); fetched_files_restricted_id->perform_action(action); } @@ -992,7 +991,7 @@ TEST(ERepository, Fetch) { const std::shared_ptr<const PackageID> fetchable_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/fetchable-files-restricted", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(fetchable_files_restricted_id)); EXPECT_THROW(fetchable_files_restricted_id->perform_action(action), ActionFailedError); } @@ -1024,7 +1023,7 @@ TEST(ERepository, ManifestCheck) const std::shared_ptr<const PackageID> id(*env[selection::AllVersionsSorted(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("category/package", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); repo->make_manifest(id->name()); id->perform_action(action); @@ -1052,7 +1051,7 @@ TEST(ERepository, ParseEAPI) }; auto ids(env[selection::AllVersionsSorted(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("category/package", - &env, { })), make_null_shared_ptr(), { }))]); + &env, { })), nullptr, { }))]); int i(0); for (auto it(ids->begin()), it_end(ids->end()); it_end != it; ++i, ++it) diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc index fccec254e..43733e7b7 100644 --- a/paludis/repositories/e/e_repository_TEST_0.cc +++ b/paludis/repositories/e/e_repository_TEST_0.cc @@ -33,7 +33,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -129,7 +128,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/in-ebuild-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -137,7 +136,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/in-subshell-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -145,7 +144,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -153,7 +152,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/unpack-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -161,7 +160,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/econf-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -169,7 +168,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -177,7 +176,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/emake-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -185,7 +184,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/einstall-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -193,7 +192,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -201,7 +200,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -209,7 +208,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/dobin-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -217,7 +216,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/fperms-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -225,7 +224,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/fperms-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); ASSERT_THROW(id->perform_action(action), ActionFailedError); } @@ -233,7 +232,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("0", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); ASSERT_THROW(id->perform_action(action), ActionFailedError); @@ -242,7 +241,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doman-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("0", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -251,7 +250,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("0", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -260,7 +259,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("0", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -269,7 +268,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -277,7 +276,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/has-version-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -285,7 +284,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/match-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -293,7 +292,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/vars-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -301,7 +300,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/expand-vars-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -309,7 +308,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("0", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -318,7 +317,7 @@ TEST(ERepository, InstallEAPI0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/use-with-enable-empty-third-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } diff --git a/paludis/repositories/e/e_repository_TEST_1.cc b/paludis/repositories/e/e_repository_TEST_1.cc index cffc50d5f..ca97d0f53 100644 --- a/paludis/repositories/e/e_repository_TEST_1.cc +++ b/paludis/repositories/e/e_repository_TEST_1.cc @@ -33,7 +33,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -126,7 +125,7 @@ TEST(ERepository, InstallEAPI1) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("1", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -135,7 +134,7 @@ TEST(ERepository, InstallEAPI1) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-success-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("1", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -144,7 +143,7 @@ TEST(ERepository, InstallEAPI1) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doman-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("1", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -153,7 +152,7 @@ TEST(ERepository, InstallEAPI1) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("1", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -162,7 +161,7 @@ TEST(ERepository, InstallEAPI1) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("1", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); diff --git a/paludis/repositories/e/e_repository_TEST_2.cc b/paludis/repositories/e/e_repository_TEST_2.cc index 0319a56da..175de8b12 100644 --- a/paludis/repositories/e/e_repository_TEST_2.cc +++ b/paludis/repositories/e/e_repository_TEST_2.cc @@ -33,7 +33,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -126,7 +125,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -135,7 +134,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doman-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -144,7 +143,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); ASSERT_THROW(id->perform_action(action), ActionFailedError); @@ -153,7 +152,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); ASSERT_THROW(id->perform_action(action), ActionFailedError); @@ -162,7 +161,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_configure-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -171,7 +170,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_compile-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -180,7 +179,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_compile-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -189,7 +188,7 @@ TEST(ERepository, InstallEAPI2) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/src_compile-via-default-func-2", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("2", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); diff --git a/paludis/repositories/e/e_repository_TEST_3.cc b/paludis/repositories/e/e_repository_TEST_3.cc index 522db226c..758a0f3d1 100644 --- a/paludis/repositories/e/e_repository_TEST_3.cc +++ b/paludis/repositories/e/e_repository_TEST_3.cc @@ -33,7 +33,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -126,7 +125,7 @@ TEST(ERepository, InstallEAPI3) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/prefix-3", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("3", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc index 7fe5b1e71..a59014d1a 100644 --- a/paludis/repositories/e/e_repository_TEST_4.cc +++ b/paludis/repositories/e/e_repository_TEST_4.cc @@ -34,7 +34,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -133,7 +132,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/pkg_pretend-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -149,7 +148,7 @@ TEST(ERepository, InstallEAPI4) )); const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/pkg_pretend-failure-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action2); @@ -159,7 +158,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_install-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -168,7 +167,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/docompress-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -177,7 +176,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/dodoc-r-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -186,7 +185,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doins-symlink-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -195,7 +194,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/banned-functions-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); EXPECT_THROW(id->perform_action(action), ActionFailedError); @@ -204,7 +203,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-4_beta", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -213,7 +212,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -222,7 +221,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/global-scope-use-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -231,7 +230,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doman-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -240,7 +239,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/use-with-enable-empty-third-4", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -248,7 +247,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/no-eapi5-commands-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -258,7 +257,7 @@ TEST(ERepository, InstallEAPI4) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/no-new-stdin-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -306,7 +305,7 @@ TEST(ERepository, EAPI4MergeType) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -376,7 +375,7 @@ TEST(ERepository, EAPI4MergeTypeBin) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -394,7 +393,7 @@ TEST(ERepository, EAPI4MergeTypeBin) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::binrepo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("pbin-1+4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -441,7 +440,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-all-good-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -457,7 +456,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-all-empty-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -473,7 +472,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-all-one-not-good-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -489,7 +488,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-any-good-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -505,7 +504,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-any-empty-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -521,7 +520,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-any-none-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -537,7 +536,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-one-none-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -553,7 +552,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-one-none-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -569,7 +568,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-one-good-4::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc index 68e0db589..dcb86c65e 100644 --- a/paludis/repositories/e/e_repository_TEST_5.cc +++ b/paludis/repositories/e/e_repository_TEST_5.cc @@ -34,7 +34,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -135,7 +134,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-silent-rules-5", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -144,7 +143,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/usex-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -154,7 +153,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/new-stdin-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -163,7 +162,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doheader-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -172,7 +171,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doheader-dies-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); EXPECT_THROW(id->perform_action(action), ActionFailedError); @@ -181,7 +180,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-5", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -190,7 +189,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-fail-5", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); EXPECT_THROW(id->perform_action(action), ActionFailedError); @@ -199,7 +198,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-injection-5", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(action); @@ -208,7 +207,7 @@ TEST(ERepository, InstallEAPI5) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/ebuild-phase-func-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -254,7 +253,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-at-most-one-none-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -270,7 +269,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-at-most-one-one-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -286,7 +285,7 @@ TEST(ERepository, RequiredUse) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-at-most-one-two-5::test-repo", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(pretend_action); @@ -338,7 +337,7 @@ TEST(ERepository, SubSlots) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/subslots-5", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); EXPECT_EQ("foo/bar", id->slot_key()->parse_value().raw_value()); @@ -354,7 +353,7 @@ TEST(ERepository, SubSlots) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/subslots-5::installed", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); EXPECT_EQ("foo/bar", id->slot_key()->parse_value().raw_value()); @@ -366,7 +365,7 @@ TEST(ERepository, SubSlots) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/subslot-dep-5", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); EXPECT_EQ("cat/subslots:= cat/subslots:foo=", id->build_dependencies_key()->pretty_print_value(UnformattedPrettyPrinter(), { })); @@ -378,7 +377,7 @@ TEST(ERepository, SubSlots) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/subslot-dep-5::installed", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); EXPECT_EQ("cat/subslots:foo/bar= cat/subslots:foo/bar=", id->build_dependencies_key()->pretty_print_value(UnformattedPrettyPrinter(), { })); diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc index cdd9637d2..5d6ecf7bf 100644 --- a/paludis/repositories/e/e_repository_TEST_ever.cc +++ b/paludis/repositories/e/e_repository_TEST_ever.cc @@ -32,7 +32,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/output_manager.hh> @@ -137,7 +136,7 @@ TEST_P(EverTest, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/" + test, - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc index 01202e28f..10b90f9f8 100644 --- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc +++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc @@ -33,7 +33,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/util/safe_ifstream.hh> @@ -128,7 +127,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/in-ebuild-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -136,7 +135,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/in-subshell-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -144,7 +143,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -152,7 +151,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/expatch-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -160,7 +159,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/expatch-success-dir", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -168,7 +167,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/expatch-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -176,7 +175,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/expatch-unrecognised", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -184,7 +183,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -192,7 +191,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -200,7 +199,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/unpack-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -208,7 +207,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -216,7 +215,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -224,7 +223,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/econf-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -232,7 +231,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -240,7 +239,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -248,7 +247,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -256,7 +255,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -264,7 +263,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -272,7 +271,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/einstall-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -280,7 +279,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -288,7 +287,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -296,7 +295,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -304,7 +303,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -312,7 +311,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -320,7 +319,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -328,7 +327,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/dobin-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -336,7 +335,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -344,7 +343,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -352,7 +351,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -360,7 +359,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-die", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -368,7 +367,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/herebin-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -376,7 +375,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/herebin-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -384,7 +383,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereconfd-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -392,7 +391,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereconfd-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -400,7 +399,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereenvd-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -408,7 +407,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereenvd-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -416,7 +415,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereinitd-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -424,7 +423,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereinitd-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -432,7 +431,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereins-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -440,7 +439,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/hereins-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -448,7 +447,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/heresbin-success", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -456,7 +455,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/heresbin-fail", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -464,7 +463,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -472,7 +471,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/has-version-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -480,7 +479,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/match-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -488,7 +487,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-phase-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -496,7 +495,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/econf-vars-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -504,7 +503,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/expand-vars-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -512,7 +511,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doman-success-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -520,7 +519,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doman-nonfatal-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -528,7 +527,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/doman-failure-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -536,7 +535,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/change-globals-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -544,7 +543,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/install-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -552,7 +551,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/install-s-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -560,7 +559,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/global-optionq-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -568,7 +567,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/expecting-tests-enabled-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -576,7 +575,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/expecting-tests-disabled-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } @@ -584,7 +583,7 @@ TEST(ERepository, InstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/expecting-tests-none-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -629,7 +628,7 @@ TEST(ERepository, ReallyInstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/exdirectory-phase-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -637,7 +636,7 @@ TEST(ERepository, ReallyInstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/exdirectory-forbid-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_THROW(id->perform_action(action), ActionFailedError); } @@ -645,7 +644,7 @@ TEST(ERepository, ReallyInstallExheres0) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/exdirectory-allow-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); } diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc index ac9cd405a..8fe42a8c0 100644 --- a/paludis/repositories/e/e_repository_TEST_exlibs.cc +++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc @@ -34,7 +34,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/package_id.hh> @@ -153,7 +152,7 @@ TEST_P(ExlibsTest, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/" + info.test, - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); switch (info.expected_result) { diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc index 3f94e5537..5bab3bf3d 100644 --- a/paludis/repositories/e/e_repository_TEST_pbin.cc +++ b/paludis/repositories/e/e_repository_TEST_pbin.cc @@ -34,7 +34,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> #include <paludis/util/fs_stat.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -161,7 +160,7 @@ TEST_P(ERepositoryInstallEAPIPBinTest, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ(base_eapi, visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(bin_action); @@ -181,7 +180,7 @@ TEST_P(ERepositoryInstallEAPIPBinTest, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1::binrepo" + base_eapi, - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("pbin-1+" + base_eapi, visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(install_action); @@ -261,7 +260,7 @@ TEST(Symlinks, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/symlinks-1", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("exheres-0", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(bin_action); @@ -283,7 +282,7 @@ TEST(Symlinks, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/symlinks-1::binrepoexheres-0", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ("pbin-1+exheres-0", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); id->perform_action(install_action); diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc index b48c3af7e..187fb8555 100644 --- a/paludis/repositories/e/e_repository_TEST_phases.cc +++ b/paludis/repositories/e/e_repository_TEST_phases.cc @@ -33,7 +33,6 @@ #include <paludis/util/map.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/output_manager.hh> @@ -149,7 +148,7 @@ TEST_P(PhasesTest, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/" + info.test, - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); EXPECT_EQ(info.expect_expensive_test, !! id->choices_key()->parse_value()->find_by_name_with_prefix( ChoiceNameWithPrefix("build_options:expensive_tests"))); diff --git a/paludis/repositories/e/e_repository_TEST_replacing.cc b/paludis/repositories/e/e_repository_TEST_replacing.cc index 7c28a0a71..335cb3b68 100644 --- a/paludis/repositories/e/e_repository_TEST_replacing.cc +++ b/paludis/repositories/e/e_repository_TEST_replacing.cc @@ -29,7 +29,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> #include <paludis/util/map.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/package_id.hh> @@ -140,7 +139,7 @@ TEST_P(ReplacingTest, Works) const std::shared_ptr<const PackageIDSequence> rlist(env[selection::AllVersionsSorted(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(info.replacing, &env, { })), - make_null_shared_ptr(), { }) | + nullptr, { }) | filter::InstalledAtRoot(env.preferred_root_key()->parse_value()))]); InstallAction action(make_named_values<InstallActionOptions>( @@ -153,7 +152,7 @@ TEST_P(ReplacingTest, Works) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/" + info.test, - &env, { })), make_null_shared_ptr(), { }) | + &env, { })), nullptr, { }) | filter::SupportsAction<InstallAction>())]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc index 5f8ce76b7..20364918e 100644 --- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc +++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc @@ -34,7 +34,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/set.hh> #include <paludis/util/safe_ifstream.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/standard_output_manager.hh> @@ -128,7 +127,7 @@ TEST(ERepository, SymlinkRewriting) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("cat/pkg", - &env, { })), make_null_shared_ptr(), { }))]->last()); + &env, { })), nullptr, { }))]->last()); ASSERT_TRUE(bool(id)); id->perform_action(action); diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc index 193419cbd..5e0653cfe 100644 --- a/paludis/repositories/e/e_repository_news.cc +++ b/paludis/repositories/e/e_repository_news.cc @@ -33,7 +33,6 @@ #include <paludis/util/fs_path.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/fs_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/environment.hh> #include <paludis/distribution.hh> @@ -177,7 +176,7 @@ ERepositoryNews::update_news() const if (! (*_imp->environment)[selection::SomeArbitraryVersion( generator::Matches(PackageDepSpec(parse_elike_package_dep_spec(*i, eapi.supported()->package_dep_spec_parse_options(), - eapi.supported()->version_spec_options())), make_null_shared_ptr(), { }) | + eapi.supported()->version_spec_options())), nullptr, { }) | filter::InstalledAtRoot(_imp->environment->preferred_root_key()->parse_value()))]->empty()) local_show = true; show &= local_show; diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc index 2f60c1def..254568b52 100644 --- a/paludis/repositories/e/e_repository_sets.cc +++ b/paludis/repositories/e/e_repository_sets.cc @@ -46,7 +46,6 @@ #include <paludis/util/is_file_with_extension.hh> #include <paludis/util/log.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/util/sequence.hh> #include <paludis/util/set.hh> @@ -131,7 +130,7 @@ ERepositorySets::package_set(const SetName & ss) const return f.contents(); } else - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const SetNameSet> @@ -180,7 +179,7 @@ namespace { PackageDepSpec spec(parse_elike_package_dep_spec(stringify(id->name()) + ":" + r.slot(), eapi.supported()->package_dep_spec_parse_options(), eapi.supported()->version_spec_options())); - if (! match_package(*env, spec, id, make_null_shared_ptr(), { })) + if (! match_package(*env, spec, id, nullptr, { })) return false; } catch (const SlotNameError &) diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc index 815263504..8e8771225 100644 --- a/paludis/repositories/e/ebuild.cc +++ b/paludis/repositories/e/ebuild.cc @@ -40,7 +40,6 @@ #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/set.hh> #include <paludis/util/env_var_names.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/about.hh> #include <paludis/environment.hh> @@ -1066,8 +1065,8 @@ WriteVDBEntryCommand::operator() () std::bind(&pipe_command_handler, params.environment(), params.package_id(), - make_null_shared_ptr(), - make_null_shared_ptr(), false, _1, + nullptr, + nullptr, false, _1, params.maybe_output_manager())); if (! params.package_id()->eapi()->supported()->ebuild_metadata_variables()->iuse_effective()->name().empty()) @@ -1330,8 +1329,8 @@ WriteBinaryEbuildCommand::operator() () std::bind(&pipe_command_handler, params.environment(), params.package_id(), - make_null_shared_ptr(), - make_null_shared_ptr(), false, _1, + nullptr, + nullptr, false, _1, params.maybe_output_manager())); if (! params.package_id()->eapi()->supported()->ebuild_metadata_variables()->scm_revision()->name().empty()) diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc index 9aecb84d1..91db754da 100644 --- a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc +++ b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc @@ -38,7 +38,6 @@ #include <paludis/util/safe_ifstream.hh> #include <paludis/util/timestamp.hh> #include <paludis/util/fs_stat.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/join.hh> #include <paludis/util/stringify.hh> @@ -83,7 +82,7 @@ TEST(EbuildFlatMetadataCache, FlatList) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_list", id->short_description_key()->parse_value()); @@ -105,7 +104,7 @@ TEST(EbuildFlatMetadataCache, FlatListStale) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-stale-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_list-stale", id1->short_description_key()->parse_value()); @@ -128,7 +127,7 @@ TEST(EbuildFlatMetadataCache, GuessedEAPI) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-guessed-eapi-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_list-guessed-eapi", id1->short_description_key()->parse_value()); @@ -150,7 +149,7 @@ TEST(EbuildFlatMetadataCache, EclassCached) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_list-eclass", id->short_description_key()->parse_value()); @@ -175,7 +174,7 @@ TEST(EbuildFlatMetadataCache, EclassStale) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-stale-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_list-eclass-stale", id1->short_description_key()->parse_value()); @@ -197,7 +196,7 @@ TEST(EbuildFlatMetadataCache, EclassWrong) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-wrong-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_list-eclass-wrong", id1->short_description_key()->parse_value()); @@ -219,7 +218,7 @@ TEST(EbuildFlatMetadataCache, EclassGone) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-gone-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_list-eclass-gone", id1->short_description_key()->parse_value()); @@ -241,7 +240,7 @@ TEST(EbuildFlatMetadataCache, FlatListDetection) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-detection-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_list-detection", id->short_description_key()->parse_value()); @@ -263,7 +262,7 @@ TEST(EbuildFlatMetadataCache, FlatHash) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_hash", id->short_description_key()->parse_value()); @@ -286,7 +285,7 @@ TEST(EbuildFlatMetadataCache, FlatHashGuessedEAPI) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-guessed-eapi-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-guessed-eapi", id1->short_description_key()->parse_value()); @@ -308,7 +307,7 @@ TEST(EbuildFlatMetadataCache, FlatHashGuessedExtension) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-guessed-eapi-extension-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-guessed-eapi-extension", id1->short_description_key()->parse_value()); @@ -330,7 +329,7 @@ TEST(EbuildFlatMetadataCache, FlatHashNoGuessedEAPI) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-guessed-eapi-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_hash-no-guessed-eapi", id->short_description_key()->parse_value()); @@ -352,7 +351,7 @@ TEST(EbuildFlatMetadataCache, EmptyValue) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-empty-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("", id->short_description_key()->parse_value()); @@ -375,7 +374,7 @@ TEST(EbuildFlatMetadataCache, HashStale) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-stale-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-stale", id1->short_description_key()->parse_value()); @@ -397,7 +396,7 @@ TEST(EbuildFlatMetadataCache, HashNoMTime) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("the-description-flat_hash-no-mtime", id1->short_description_key()->parse_value()); @@ -419,7 +418,7 @@ TEST(EbuildFlatMetadataCache, HashNoMTimeStale) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-stale-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-no-mtime-stale", id1->short_description_key()->parse_value()); @@ -441,7 +440,7 @@ TEST(EbuildFlatMetadataCache, HashBadMtime) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-bad-mtime-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-bad-mtime", id1->short_description_key()->parse_value()); @@ -463,7 +462,7 @@ TEST(EbuildFlatMetadataCache, HashMD5) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-md5-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Description flat_hash-md5", id1->short_description_key()->parse_value()); @@ -485,7 +484,7 @@ TEST(EbuildFlatMetadataCache, HashBadMD5) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-bad-md5-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-bad-md5", id1->short_description_key()->parse_value()); @@ -507,7 +506,7 @@ TEST(EbuildFlatMetadataCache, HashNoEAPI) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-eapi-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Description flat_hash-no-eapi", id1->short_description_key()->parse_value()); @@ -529,7 +528,7 @@ TEST(EbuildFlatMetadataCache, HashDuplicateKey) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-duplicate-key-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id1->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-duplicate-key", id1->short_description_key()->parse_value()); @@ -551,7 +550,7 @@ TEST(EbuildFlatMetadataCache, HashEclass) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_hash-eclass", id->short_description_key()->parse_value()); @@ -575,7 +574,7 @@ TEST(EbuildFlatMetadataCache, HashEclassStale) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-stale-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclass-stale", id->short_description_key()->parse_value()); @@ -597,7 +596,7 @@ TEST(EbuildFlatMetadataCache, HashEclassWrong) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-wrong-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclass-wrong", id->short_description_key()->parse_value()); @@ -618,7 +617,7 @@ TEST(EbuildFlatMetadataCache, HashEclassGone) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-gone-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclass-gone", id->short_description_key()->parse_value()); @@ -640,7 +639,7 @@ TEST(EbuildFlatMetadataCache, HashFullEclass) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_hash-full-eclass", id->short_description_key()->parse_value()); @@ -664,7 +663,7 @@ TEST(EbuildFlatMetadataCache, HashFullEclassNonStandard) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-nonstandard-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_hash-full-eclass-nonstandard", id->short_description_key()->parse_value()); @@ -688,7 +687,7 @@ TEST(EbuildFlatMetadataCache, HashFullEclassStale) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-stale-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-full-eclass-stale", id->short_description_key()->parse_value()); @@ -710,7 +709,7 @@ TEST(EbuildFlatMetadataCache, HashFullEclassWrong) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-wrong-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-full-eclass-wrong", id->short_description_key()->parse_value()); @@ -732,7 +731,7 @@ TEST(EbuildFlatMetadataCache, HashFullEclassGone) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-gone-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-full-eclass-gone", id->short_description_key()->parse_value()); @@ -754,14 +753,14 @@ TEST(EbuildFlatMetadataCache, HashEclassTruncated) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-truncated-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclasses-truncated", id->short_description_key()->parse_value()); std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-truncated-2", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id2->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclasses-truncated-2", id2->short_description_key()->parse_value()); @@ -783,7 +782,7 @@ TEST(EbuildFlatMetadataCache, HashEclassBadMtime) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-bad-mtime-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclasses-bad-mtime", id->short_description_key()->parse_value()); @@ -805,7 +804,7 @@ TEST(EbuildFlatMetadataCache, HashEclassSpaces) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-spaces-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclasses-spaces", id->short_description_key()->parse_value()); @@ -827,7 +826,7 @@ TEST(EbuildFlatMetadataCache, HashEclassMD5) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-md5-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Description flat_hash-eclass-md5", id->short_description_key()->parse_value()); @@ -849,7 +848,7 @@ TEST(EbuildFlatMetadataCache, HashEclassBadMD5) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-bad-md5-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclass-bad-md5", id->short_description_key()->parse_value()); @@ -871,7 +870,7 @@ TEST(EbuildFlatMetadataCache, HashEclassTruncatedMD5) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-truncated-md5-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclass-truncated-md5", id->short_description_key()->parse_value()); @@ -893,7 +892,7 @@ TEST(EbuildFlatMetadataCache, HashEclassGoneMD5) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-gone-md5-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-eclass-gone-md5", id->short_description_key()->parse_value()); @@ -916,7 +915,7 @@ TEST(EbuildFlatMetadataCache, HashExlib) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_hash-exlib", id->short_description_key()->parse_value()); @@ -941,7 +940,7 @@ TEST(EbuildFlatMetadataCache, HashExlibPerCategory) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-percat-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("the-description-flat_hash-exlib-percat", id->short_description_key()->parse_value()); @@ -966,7 +965,7 @@ TEST(EbuildFlatMetadataCache, HashExlibStale) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-stale-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-exlib-stale", id->short_description_key()->parse_value()); @@ -989,7 +988,7 @@ TEST(EbuildFlatMetadataCache, HashExlibWrong) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-wrong-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-exlib-wrong", id->short_description_key()->parse_value()); @@ -1012,7 +1011,7 @@ TEST(EbuildFlatMetadataCache, HashExlibGone) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-gone-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-exlib-gone", id->short_description_key()->parse_value()); @@ -1035,14 +1034,14 @@ TEST(EbuildFlatMetadataCache, HashExlibTruncated) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-truncated-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-exlibs-truncated", id->short_description_key()->parse_value()); std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-truncated-2", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id2->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-exlibs-truncated-2", id2->short_description_key()->parse_value()); @@ -1065,7 +1064,7 @@ TEST(EbuildFlatMetadataCache, HashExlibBadMtime) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-bad-mtime-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-exlibs-bad-mtime", id->short_description_key()->parse_value()); @@ -1088,7 +1087,7 @@ TEST(EbuildFlatMetadataCache, HashExlibSpaces) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-spaces-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ("The Generated Description flat_hash-exlibs-spaces", id->short_description_key()->parse_value()); @@ -1111,7 +1110,7 @@ TEST(EbuildFlatMetadataCache, Write) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/write-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ(contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-1")); @@ -1135,7 +1134,7 @@ TEST(EbuildFlatMetadataCache, Write1) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/write-eapi1-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ(contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-eapi1-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-eapi1-1")); @@ -1161,7 +1160,7 @@ TEST(EbuildFlatMetadataCache, WriteEclasses) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/write-eclasses-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ(contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-eclasses-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-eclasses-1")); @@ -1186,7 +1185,7 @@ TEST(EbuildFlatMetadataCache, WriteExlibs) std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/write-exlibs-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id->short_description_key())); EXPECT_EQ(contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-exlibs-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-exlibs-1")); diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc index cdc8f8088..ffb59a345 100644 --- a/paludis/repositories/e/ebuild_id.cc +++ b/paludis/repositories/e/ebuild_id.cc @@ -62,7 +62,6 @@ #include <paludis/util/wrapped_output_iterator.hh> #include <paludis/util/return_literal_function.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/destringify.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/accept_visitor.hh> @@ -313,11 +312,11 @@ EbuildID::need_non_xml_keys_added() const n::environment() = _imp->environment, n::exlibsdirs() = e_repo->layout()->exlibsdirs(name()), n::files_dir() = e_repo->layout()->package_directory(name()) / "files", - n::maybe_output_manager() = make_null_shared_ptr(), + n::maybe_output_manager() = nullptr, n::package_builddir() = e_repo->params().builddir() / (stringify(name().category()) + "-" + stringify(name().package()) + "-" + stringify(version()) + "-metadata"), n::package_id() = shared_from_this(), - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = (e_repo->params().master_repositories() && ! e_repo->params().master_repositories()->empty()) ? (*e_repo->params().master_repositories()->begin())->params().location() : e_repo->params().location(), @@ -424,7 +423,7 @@ EbuildID::need_non_xml_keys_added() const } else _imp->choices = std::make_shared<EChoicesKey>(_imp->environment, shared_from_this(), "PALUDIS_CHOICES", "Choices", mkt_normal, - e_repo, std::bind(return_literal_function(make_null_shared_ptr()))); + e_repo, std::bind(return_literal_function(nullptr))); add_metadata_key(_imp->choices); } @@ -543,7 +542,7 @@ EbuildID::choice_descriptions() const if (m) return m->uses(); else - return make_null_shared_ptr(); + return nullptr; } namespace @@ -959,7 +958,7 @@ EbuildID::from_repositories_key() const return _imp->generated_from; } else - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > @@ -1805,6 +1804,6 @@ EbuildID::set_scm_revision(const std::string & s) const const std::shared_ptr<const Contents> EbuildID::contents() const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc index 4be51e146..b5f9c8fde 100644 --- a/paludis/repositories/e/exheres_layout.cc +++ b/paludis/repositories/e/exheres_layout.cc @@ -38,7 +38,6 @@ #include <paludis/util/set.hh> #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/fs_stat.hh> @@ -653,13 +652,13 @@ ExheresLayout::accounts_repository_data_location_key() const return std::make_shared<LiteralMetadataValueKey<FSPath>>("accounts_repository_data_location", "AccountsRepository data location", mkt_internal, _imp->tree_root / "metadata" / "accounts"); else - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<MetadataValueKey<FSPath> > ExheresLayout::e_updates_location_key() const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<MetadataValueKey<FSPath> > @@ -669,7 +668,7 @@ ExheresLayout::licence_groups_location_key() const return std::make_shared<LiteralMetadataValueKey<FSPath>>("licence_groups_location", "License groups data location", mkt_internal, _imp->tree_root / "metadata" / "licence_groups.conf"); else - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const MasksInfo> diff --git a/paludis/repositories/e/exheres_mask_store.cc b/paludis/repositories/e/exheres_mask_store.cc index 6b8eea4f1..5813c0e90 100644 --- a/paludis/repositories/e/exheres_mask_store.cc +++ b/paludis/repositories/e/exheres_mask_store.cc @@ -26,7 +26,6 @@ #include <paludis/util/hashes.hh> #include <paludis/util/stringify.hh> #include <paludis/util/log.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/fs_stat.hh> @@ -157,7 +156,7 @@ ExheresMaskStore::_populate() try { auto specs(parse_commented_set(file_text, _imp->env, *EAPIData::get_instance()->eapi_from_string(_imp->eapi_for_file(*f)))); - DepSpecFlattener<SetSpecTree, PackageDepSpec> flat_specs(_imp->env, make_null_shared_ptr()); + DepSpecFlattener<SetSpecTree, PackageDepSpec> flat_specs(_imp->env, nullptr); specs->top()->accept(flat_specs); for (auto s(flat_specs.begin()), s_end(flat_specs.end()) ; @@ -191,7 +190,7 @@ ExheresMaskStore::query(const std::shared_ptr<const PackageID> & id) const auto r(_imp->repo_mask.find(id->name())); if (_imp->repo_mask.end() != r) for (auto k(r->second.begin()), k_end(r->second.end()) ; k != k_end ; ++k) - if (match_package(*_imp->env, k->first, id, make_null_shared_ptr(), { })) + if (match_package(*_imp->env, k->first, id, nullptr, { })) result->push_back(*k->second); return result; diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc index de84491a7..4abf76752 100644 --- a/paludis/repositories/e/exheres_profile.cc +++ b/paludis/repositories/e/exheres_profile.cc @@ -34,7 +34,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/hashes.hh> #include <paludis/util/system.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/safe_ifstream.hh> @@ -135,18 +134,18 @@ ExheresProfile::ExheresProfile( _load_dir(*l); const std::shared_ptr<const Set<UnprefixedChoiceName> > s(_imp->options_conf.known_choice_value_names( - make_null_shared_ptr(), ChoicePrefixName("suboptions"))); + nullptr, ChoicePrefixName("suboptions"))); for (Set<UnprefixedChoiceName>::ConstIterator f(s->begin()), f_end(s->end()) ; f != f_end ; ++f) - if (_imp->options_conf.want_choice_enabled_locked(make_null_shared_ptr(), + if (_imp->options_conf.want_choice_enabled_locked(nullptr, ChoicePrefixName("suboptions"), *f).first.is_true()) _imp->use_expand->insert(stringify(*f)); const std::shared_ptr<const Set<UnprefixedChoiceName> > sh(_imp->options_conf.known_choice_value_names( - make_null_shared_ptr(), ChoicePrefixName("hidden_suboptions"))); + nullptr, ChoicePrefixName("hidden_suboptions"))); for (Set<UnprefixedChoiceName>::ConstIterator f(sh->begin()), f_end(sh->end()) ; f != f_end ; ++f) - if (_imp->options_conf.want_choice_enabled_locked(make_null_shared_ptr(), + if (_imp->options_conf.want_choice_enabled_locked(nullptr, ChoicePrefixName("hidden_suboptions"), *f).first.is_true()) _imp->use_expand_hidden->insert(stringify(*f)); } @@ -185,7 +184,7 @@ ExheresProfile::_load_dir(const FSPath & f) auto eapi(EAPIData::get_instance()->eapi_from_string(_imp->eapi_for_file(f / "system.conf"))); auto specs(parse_commented_set(file_text, _imp->env, *EAPIData::get_instance()->eapi_from_string(_imp->eapi_for_file(f / "system.conf")))); - DepSpecFlattener<SetSpecTree, PackageDepSpec> flat_specs(_imp->env, make_null_shared_ptr()); + DepSpecFlattener<SetSpecTree, PackageDepSpec> flat_specs(_imp->env, nullptr); specs->top()->accept(flat_specs); for (auto s(flat_specs.begin()), s_end(flat_specs.end()) ; diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc index 7064b2f95..ca14dae10 100644 --- a/paludis/repositories/e/exndbam_repository.cc +++ b/paludis/repositories/e/exndbam_repository.cc @@ -35,7 +35,6 @@ #include <paludis/util/system.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/safe_ifstream.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/join.hh> @@ -292,7 +291,7 @@ ExndbamRepository::installed_root_key() const const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > ExndbamRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } void @@ -475,7 +474,7 @@ ExndbamRepository::merge(const MergeParams & m) std::placeholders::_1), n::is_overwrite() = true, n::make_output_manager() = std::bind(&this_output_manager, m.output_manager(), std::placeholders::_1), - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = m.want_phase() )); m.perform_uninstall()(if_overwritten_id, uo); @@ -498,7 +497,7 @@ ExndbamRepository::merge(const MergeParams & m) std::placeholders::_1), n::is_overwrite() = false, n::make_output_manager() = std::bind(&this_output_manager, m.output_manager(), std::placeholders::_1), - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = m.want_phase() )); m.perform_uninstall()(candidate, uo); @@ -638,8 +637,8 @@ ExndbamRepository::perform_uninstall( n::maybe_output_manager() = output_manager, n::package_builddir() = package_builddir, n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = _imp->params.location(), n::root() = stringify(_imp->params.root()), n::sandbox() = phase->option("sandbox"), diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc index 3c77d8377..0809628d8 100644 --- a/paludis/repositories/e/exndbam_repository_TEST.cc +++ b/paludis/repositories/e/exndbam_repository_TEST.cc @@ -28,7 +28,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/sequence.hh> #include <paludis/util/fs_path.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/standard_output_manager.hh> #include <paludis/action.hh> @@ -81,7 +80,7 @@ namespace if (! victim.empty()) replacing->push_back(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(victim, - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); InstallAction install_action(make_named_values<InstallActionOptions>( n::destination() = exndbam_repo, n::make_output_manager() = &make_standard_output_manager, @@ -91,7 +90,7 @@ namespace )); (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(chosen_one, - &env, { })), make_null_shared_ptr(), { }))]->begin())->perform_action(install_action); + &env, { })), nullptr, { }))]->begin())->perform_action(install_action); } std::shared_ptr<Repository> diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc index 239c62f99..24025d90f 100644 --- a/paludis/repositories/e/fetch_visitor_TEST.cc +++ b/paludis/repositories/e/fetch_visitor_TEST.cc @@ -29,7 +29,6 @@ #include <paludis/util/sequence.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/fs_stat.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/stringify.hh> @@ -77,7 +76,7 @@ TEST(FetchVisitor, Works) const std::shared_ptr<const EAPI> eapi(EAPIData::get_instance()->eapi_from_string("exheres-0")); FetchVisitor v(&env, *env[selection::RequireExactlyOne( generator::Matches(parse_user_package_dep_spec("=cat/pkg-1", - &env, { }), make_null_shared_ptr(), { }))]->begin(), + &env, { }), nullptr, { }))]->begin(), *eapi, FSPath("fetch_visitor_TEST_dir/out"), false, false, "test", std::make_shared<URIListedThenMirrorsLabel>("listed-then-mirrors"), false, std::make_shared<StandardOutputManager>(), get_mirrors_fn); diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc index a825e2743..84156d6d2 100644 --- a/paludis/repositories/e/fix_locked_dependencies.cc +++ b/paludis/repositories/e/fix_locked_dependencies.cc @@ -25,7 +25,6 @@ #include <paludis/util/options.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/accept_visitor.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/environment.hh> #include <paludis/package_id.hh> @@ -55,17 +54,17 @@ namespace std::shared_ptr<const SlotRequirement> visit(const SlotExactPartialRequirement &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const SlotRequirement> visit(const SlotExactFullRequirement &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const SlotRequirement> visit(const SlotAnyUnlockedRequirement &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const SlotRequirement> rewrite() const @@ -73,7 +72,7 @@ namespace std::shared_ptr<const PackageIDSequence> matches((*env)[selection::AllVersionsSorted( generator::Matches(*spec, id, { }) | filter::InstalledAtRoot(env->system_root_key()->parse_value()))]); if (matches->empty()) - return make_null_shared_ptr(); + return nullptr; if ((*matches->last())->slot_key()) { @@ -89,7 +88,7 @@ namespace return std::make_shared<ELikeSlotExactPartialRequirement>(ss.match_values().first, spec->slot_requirement_ptr()); } else - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const SlotRequirement> visit(const SlotAnyPartialLockedRequirement &) const diff --git a/paludis/repositories/e/info_metadata_key.cc b/paludis/repositories/e/info_metadata_key.cc index f90ad2585..8a8fa83ee 100644 --- a/paludis/repositories/e/info_metadata_key.cc +++ b/paludis/repositories/e/info_metadata_key.cc @@ -31,7 +31,6 @@ #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/join.hh> #include <paludis/util/fs_stat.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/selection.hh> @@ -188,7 +187,7 @@ InfoPkgsMetadataKey::need_keys_added() const std::shared_ptr<const PackageIDSequence> q((*_imp->env)[selection::AllVersionsSorted( generator::Matches(parse_elike_package_dep_spec(i->first, eapi->supported()->package_dep_spec_parse_options(), - eapi->supported()->version_spec_options()), make_null_shared_ptr(), { }) | + eapi->supported()->version_spec_options()), nullptr, { }) | filter::InstalledAtRoot(_imp->env->preferred_root_key()->parse_value()))]); if (q->empty()) diff --git a/paludis/repositories/e/licence_groups.cc b/paludis/repositories/e/licence_groups.cc index c0be7ec0b..609a2f16f 100644 --- a/paludis/repositories/e/licence_groups.cc +++ b/paludis/repositories/e/licence_groups.cc @@ -26,7 +26,6 @@ #include <paludis/util/set.hh> #include <paludis/util/options.hh> #include <paludis/util/wrapped_output_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <vector> #include <map> @@ -85,11 +84,11 @@ LicenceGroups::maybe_expand_licence_nonrecursively(const std::string & s) const { auto i(_imp->store.find(s.substr(1))); if (_imp->store.end() == i) - return make_null_shared_ptr(); + return nullptr; else return i->second; } else - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/e/myoptions_requirements_verifier.cc b/paludis/repositories/e/myoptions_requirements_verifier.cc index 542bd1f4d..6b8eae682 100644 --- a/paludis/repositories/e/myoptions_requirements_verifier.cc +++ b/paludis/repositories/e/myoptions_requirements_verifier.cc @@ -28,7 +28,6 @@ #include <paludis/util/log.hh> #include <paludis/util/set.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/accept_visitor.hh> #include <paludis/choice.hh> #include <paludis/metadata_key.hh> @@ -115,7 +114,7 @@ namespace } } - return make_null_shared_ptr(); + return nullptr; } } diff --git a/paludis/repositories/e/parse_annotations.cc b/paludis/repositories/e/parse_annotations.cc index 8d7dd1ad5..cd8b5ff1a 100644 --- a/paludis/repositories/e/parse_annotations.cc +++ b/paludis/repositories/e/parse_annotations.cc @@ -24,7 +24,6 @@ #include <paludis/util/stringify.hh> #include <paludis/util/log.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec_annotations.hh> using namespace paludis; diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc index 5ca63317c..6d8b56865 100644 --- a/paludis/repositories/e/traditional_layout.cc +++ b/paludis/repositories/e/traditional_layout.cc @@ -36,7 +36,6 @@ #include <paludis/util/set.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/active_object_ptr.hh> @@ -671,7 +670,7 @@ TraditionalLayout::binary_ebuild_directory(const QualifiedPackageName & q) const std::shared_ptr<MetadataValueKey<FSPath> > TraditionalLayout::accounts_repository_data_location_key() const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<MetadataValueKey<FSPath> > @@ -681,7 +680,7 @@ TraditionalLayout::e_updates_location_key() const return std::make_shared<LiteralMetadataValueKey<FSPath>>("e_updates_location", "VDBRepository updates data location", mkt_internal, _imp->tree_root / "profiles" / "updates"); else - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<MetadataValueKey<FSPath> > @@ -691,7 +690,7 @@ TraditionalLayout::licence_groups_location_key() const return std::make_shared<LiteralMetadataValueKey<FSPath>>("licence_groups_location", "License groups data location", mkt_internal, _imp->tree_root / "profiles" / "license_groups"); else - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const MasksInfo> diff --git a/paludis/repositories/e/traditional_mask_store.cc b/paludis/repositories/e/traditional_mask_store.cc index 28d5292a2..3017bcdbc 100644 --- a/paludis/repositories/e/traditional_mask_store.cc +++ b/paludis/repositories/e/traditional_mask_store.cc @@ -26,7 +26,6 @@ #include <paludis/util/hashes.hh> #include <paludis/util/stringify.hh> #include <paludis/util/log.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_id.hh> #include <paludis/match_package.hh> @@ -125,7 +124,7 @@ TraditionalMaskStore::query(const std::shared_ptr<const PackageID> & id) const auto r(_imp->repo_mask.find(id->name())); if (_imp->repo_mask.end() != r) for (auto k(r->second.begin()), k_end(r->second.end()) ; k != k_end ; ++k) - if (match_package(*_imp->env, k->first, id, make_null_shared_ptr(), { })) + if (match_package(*_imp->env, k->first, id, nullptr, { })) result->push_back(*k->second); return result; diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc index cf34e713f..fd72b4fed 100644 --- a/paludis/repositories/e/traditional_profile.cc +++ b/paludis/repositories/e/traditional_profile.cc @@ -42,7 +42,6 @@ #include <paludis/util/map.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/fs_error.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/upper_lower.hh> #include <paludis/choice.hh> @@ -831,7 +830,7 @@ TraditionalProfile::use_masked( for (PackageFlagStatusMapList::const_iterator g(i->package_use_mask.begin()), g_end(i->package_use_mask.end()) ; g != g_end ; ++g) { - if (! match_package(*_imp->env, *g->first, id, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *g->first, id, nullptr, { })) continue; FlagStatusMap::const_iterator h(g->second.find(value_prefixed)); @@ -844,7 +843,7 @@ TraditionalProfile::use_masked( for (PackageFlagStatusMapList::const_iterator gs(i->package_use_stable_mask.begin()), gs_end(i->package_use_stable_mask.end()) ; gs != gs_end ; ++gs) { - if (! match_package(*_imp->env, *gs->first, id, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *gs->first, id, nullptr, { })) continue; FlagStatusMap::const_iterator hs(gs->second.find(value_prefixed)); @@ -888,7 +887,7 @@ TraditionalProfile::use_forced( for (PackageFlagStatusMapList::const_iterator g(i->package_use_force.begin()), g_end(i->package_use_force.end()) ; g != g_end ; ++g) { - if (! match_package(*_imp->env, *g->first, id, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *g->first, id, nullptr, { })) continue; FlagStatusMap::const_iterator h(g->second.find(value_prefixed)); @@ -901,7 +900,7 @@ TraditionalProfile::use_forced( for (PackageFlagStatusMapList::const_iterator gs(i->package_use_stable_force.begin()), gs_end(i->package_use_stable_force.end()) ; gs != gs_end ; ++gs) { - if (! match_package(*_imp->env, *gs->first, id, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *gs->first, id, nullptr, { })) continue; FlagStatusMap::const_iterator hs(gs->second.find(value_prefixed)); @@ -931,7 +930,7 @@ TraditionalProfile::use_state_ignoring_masks( for (PackageFlagStatusMapList::const_iterator g(i->package_use.begin()), g_end(i->package_use.end()) ; g != g_end ; ++g) { - if (! match_package(*_imp->env, *g->first, id, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, *g->first, id, nullptr, { })) continue; FlagStatusMap::const_iterator h(g->second.find(value_prefixed)); @@ -1032,7 +1031,7 @@ TraditionalProfile::profile_masks(const std::shared_ptr<const PackageID> & id) c { for (std::list<std::pair<std::shared_ptr<const PackageDepSpec>, std::shared_ptr<const MaskInfo> > >::const_iterator k(rr->second.begin()), k_end(rr->second.end()) ; k != k_end ; ++k) - if (match_package(*_imp->env, *k->first, id, make_null_shared_ptr(), { })) + if (match_package(*_imp->env, *k->first, id, nullptr, { })) result->push_back(*k->second); } diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc index af74b35ec..9312f22bd 100644 --- a/paludis/repositories/e/vdb_merger.cc +++ b/paludis/repositories/e/vdb_merger.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -30,7 +30,7 @@ #include <paludis/util/strip.hh> #include <paludis/util/options.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> +#include <paludis/util/enum_iterator.hh> #include <paludis/util/timestamp.hh> #include <paludis/util/env_var_names.hh> #include <paludis/util/safe_ofstream.hh> @@ -98,7 +98,7 @@ VDBMerger::VDBMerger(const VDBMergerParams & p) : n::merged_entries() = p.merged_entries(), n::no_chown() = ! getenv_with_default(env_vars::no_chown, "").empty(), n::options() = p.options(), - n::parts() = make_null_shared_ptr(), + n::parts() = nullptr, n::permit_destination() = p.permit_destination(), n::root() = p.root() )), diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc index eb5f44a20..b7fd7b5a0 100644 --- a/paludis/repositories/e/vdb_repository.cc +++ b/paludis/repositories/e/vdb_repository.cc @@ -68,7 +68,6 @@ #include <paludis/util/tokeniser.hh> #include <paludis/util/hashes.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/visitor_cast.hh> #include <paludis/util/wrapped_output_iterator.hh> #include <paludis/util/safe_ifstream.hh> @@ -508,8 +507,8 @@ VDBRepository::perform_uninstall( n::maybe_output_manager() = output_manager, n::package_builddir() = package_builddir, n::package_id() = id, - n::parts() = make_null_shared_ptr(), - n::permitted_directories() = make_null_shared_ptr(), + n::parts() = nullptr, + n::permitted_directories() = nullptr, n::portdir() = _imp->params.location(), n::root() = stringify(_imp->params.root()), n::sandbox() = phase->option("sandbox"), @@ -783,7 +782,7 @@ VDBRepository::merge(const MergeParams & m) std::placeholders::_1), n::is_overwrite() = false, n::make_output_manager() = std::bind(&this_output_manager, m.output_manager(), std::placeholders::_1), - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = m.want_phase() )); m.perform_uninstall()(candidate, uo); @@ -927,7 +926,7 @@ VDBRepository::installed_root_key() const const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > VDBRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } namespace @@ -1206,7 +1205,7 @@ VDBRepository::perform_updates() SlotName old_slot(tokens.at(2)), new_slot(tokens.at(3)); const std::shared_ptr<const PackageIDSequence> ids((*_imp->params.environment())[selection::AllVersionsSorted( - (generator::Matches(old_spec, make_null_shared_ptr(), { }) & generator::InRepository(name())) | + (generator::Matches(old_spec, nullptr, { }) & generator::InRepository(name())) | filter::Slot(old_slot) )]); if (! ids->empty()) diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc index 5c1c36fa6..1f22fc428 100644 --- a/paludis/repositories/e/vdb_repository_TEST.cc +++ b/paludis/repositories/e/vdb_repository_TEST.cc @@ -46,7 +46,6 @@ #include <paludis/contents.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <functional> #include <algorithm> @@ -134,7 +133,7 @@ namespace if (! victim.empty()) replacing->push_back(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(victim, - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); InstallAction install_action(make_named_values<InstallActionOptions>( n::destination() = vdb_repo, n::make_output_manager() = &make_standard_output_manager, @@ -144,7 +143,7 @@ namespace )); (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(chosen_one, - &env, { })), make_null_shared_ptr(), { }))]->begin())->perform_action(install_action); + &env, { })), nullptr, { }))]->begin())->perform_action(install_action); } } @@ -191,7 +190,7 @@ TEST(VDBRepository, QueryUse) std::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(e1->choices_key())); ASSERT_TRUE(bool(e1->choices_key()->parse_value())); @@ -220,7 +219,7 @@ TEST(VDBRepository, Contents) std::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ContentsGatherer gatherer; auto contents(e1->contents()); std::for_each(indirect_iterator(contents->begin()), @@ -313,7 +312,7 @@ TEST(VDBRepository, Reinstall) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1::reinstalltest_src1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); id->perform_action(install_action); vdb_repo->invalidate(); @@ -324,7 +323,7 @@ TEST(VDBRepository, Reinstall) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1::reinstalltest_src1", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); id->perform_action(install_action); vdb_repo->invalidate(); @@ -335,7 +334,7 @@ TEST(VDBRepository, Reinstall) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1::reinstalltest_src2", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); id->perform_action(install_action); vdb_repo->invalidate(); diff --git a/paludis/repositories/e/vdb_repository_TEST_cache.cc b/paludis/repositories/e/vdb_repository_TEST_cache.cc index 835db4031..7863128e4 100644 --- a/paludis/repositories/e/vdb_repository_TEST_cache.cc +++ b/paludis/repositories/e/vdb_repository_TEST_cache.cc @@ -32,7 +32,6 @@ #include <paludis/util/fs_stat.hh> #include <paludis/util/stringify.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/metadata_key.hh> #include <paludis/standard_output_manager.hh> @@ -97,7 +96,7 @@ namespace if (! victim.empty()) replacing->push_back(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(victim, - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); InstallAction install_action(make_named_values<InstallActionOptions>( n::destination() = vdb_repo, n::make_output_manager() = &make_standard_output_manager, @@ -107,7 +106,7 @@ namespace )); (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(chosen_one, - &env, { })), make_null_shared_ptr(), { }))]->begin())->perform_action(install_action); + &env, { })), nullptr, { }))]->begin())->perform_action(install_action); } void read_cache(const FSPath & names_cache, std::vector<FSPath> & vec) @@ -163,11 +162,11 @@ TEST(NamesCache, Incremental) UninstallAction uninstall_action(make_named_values<UninstallActionOptions>( n::config_protect() = "", - n::if_for_install_id() = make_null_shared_ptr(), + n::if_for_install_id() = nullptr, n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = &make_standard_output_manager, - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = &want_all_phases )); @@ -235,7 +234,7 @@ TEST(NamesCache, Incremental) { const std::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-2::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); inst_id->perform_action(uninstall_action); vdb_repo->invalidate(); @@ -262,7 +261,7 @@ TEST(NamesCache, Incremental) { const std::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg2-1::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); inst_id->perform_action(uninstall_action); vdb_repo->invalidate(); @@ -287,7 +286,7 @@ TEST(NamesCache, Incremental) { const std::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat2/pkg1-1::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); inst_id->perform_action(uninstall_action); vdb_repo->invalidate(); @@ -301,7 +300,7 @@ TEST(NamesCache, Incremental) { const std::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); inst_id->perform_action(uninstall_action); vdb_repo->invalidate(); diff --git a/paludis/repositories/e/vdb_repository_TEST_eapis.cc b/paludis/repositories/e/vdb_repository_TEST_eapis.cc index b4bc85bf0..ce7c15217 100644 --- a/paludis/repositories/e/vdb_repository_TEST_eapis.cc +++ b/paludis/repositories/e/vdb_repository_TEST_eapis.cc @@ -45,7 +45,6 @@ #include <paludis/unformatted_pretty_printer.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <functional> #include <algorithm> @@ -140,11 +139,11 @@ TEST_P(PhasesTest, Works) UninstallAction uninstall_action(make_named_values<UninstallActionOptions>( n::config_protect() = "", - n::if_for_install_id() = make_null_shared_ptr(), + n::if_for_install_id() = nullptr, n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = &make_standard_output_manager, - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = &want_all_phases )); @@ -162,7 +161,7 @@ TEST_P(PhasesTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(install_action); } @@ -172,7 +171,7 @@ TEST_P(PhasesTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(install_action); } @@ -182,7 +181,7 @@ TEST_P(PhasesTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(info_action); } @@ -190,7 +189,7 @@ TEST_P(PhasesTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(config_action); } @@ -198,7 +197,7 @@ TEST_P(PhasesTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(uninstall_action); } @@ -267,11 +266,11 @@ TEST_P(VarsTest, Works) UninstallAction uninstall_action(make_named_values<UninstallActionOptions>( n::config_protect() = "", - n::if_for_install_id() = make_null_shared_ptr(), + n::if_for_install_id() = nullptr, n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = &make_standard_output_manager, - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = &want_all_phases )); @@ -289,7 +288,7 @@ TEST_P(VarsTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(install_action); } @@ -299,7 +298,7 @@ TEST_P(VarsTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(install_action); } @@ -309,7 +308,7 @@ TEST_P(VarsTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(info_action); } @@ -317,7 +316,7 @@ TEST_P(VarsTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(config_action); } @@ -325,7 +324,7 @@ TEST_P(VarsTest, Works) { const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed", - &env, { })), make_null_shared_ptr(), { }))]->begin()); + &env, { })), nullptr, { }))]->begin()); ASSERT_TRUE(bool(id)); id->perform_action(uninstall_action); } diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc index 37c3809db..199f63063 100644 --- a/paludis/repositories/e/vdb_unmerger_TEST.cc +++ b/paludis/repositories/e/vdb_unmerger_TEST.cc @@ -30,7 +30,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/sequence.hh> #include <paludis/util/fs_stat.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/standard_output_manager.hh> #include <paludis/user_dep_spec.hh> @@ -117,7 +116,7 @@ namespace env.add_repository(0, repo); auto id(*env[selection::RequireExactlyOne(generator::Matches( - parse_user_package_dep_spec("cat/" + fix(what), &env, { }), make_null_shared_ptr(), { }))]->begin()); + parse_user_package_dep_spec("cat/" + fix(what), &env, { }), nullptr, { }))]->begin()); unmerger = std::make_shared<VDBUnmergerNoDisplay>(make_named_values<VDBUnmergerOptions>( n::config_protect() = "/protected_file /protected_dir", diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc index b54aab1c9..a4922accb 100644 --- a/paludis/repositories/fake/fake_installed_repository.cc +++ b/paludis/repositories/fake/fake_installed_repository.cc @@ -21,7 +21,6 @@ #include <paludis/util/sequence.hh> #include <paludis/util/set.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/package_id.hh> #include <paludis/metadata_key.hh> @@ -209,12 +208,12 @@ FakeInstalledRepository::repository_factory_dependencies( const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > FakeInstalledRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const Set<std::string> > FakeInstalledRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc index 440b3be7a..5858a101e 100644 --- a/paludis/repositories/fake/fake_package_id.cc +++ b/paludis/repositories/fake/fake_package_id.cc @@ -44,7 +44,6 @@ #include <paludis/util/tribool.hh> #include <paludis/util/wrapped_output_iterator.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/return_literal_function.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/accept_visitor.hh> @@ -469,7 +468,7 @@ namespace virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const { - return make_null_shared_ptr(); + return nullptr; } virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result)) @@ -804,7 +803,7 @@ FakePackageID::post_dependencies_key() const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > FakePackageID::dependencies_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > @@ -1198,7 +1197,7 @@ FakePackageID::behaviours_set() const std::shared_ptr<const Contents> FakePackageID::contents() const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc index dea5a108b..1c7853420 100644 --- a/paludis/repositories/fake/fake_repository.cc +++ b/paludis/repositories/fake/fake_repository.cc @@ -24,7 +24,6 @@ #include <paludis/util/sequence.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/wrapped_forward_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/distribution.hh> #include <paludis/environment.hh> #include <paludis/package_id.hh> @@ -151,12 +150,12 @@ FakeRepository::installed_root_key() const const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > FakeRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const Set<std::string> > FakeRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/gemcutter/gemcutter_id.cc b/paludis/repositories/gemcutter/gemcutter_id.cc index 3e12a5f52..06a891563 100644 --- a/paludis/repositories/gemcutter/gemcutter_id.cc +++ b/paludis/repositories/gemcutter/gemcutter_id.cc @@ -27,7 +27,6 @@ #include <paludis/util/set.hh> #include <paludis/util/hashes.hh> #include <paludis/util/wrapped_forward_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/make_named_values.hh> #include <paludis/name.hh> @@ -47,7 +46,7 @@ namespace const std::string & r, const std::string & h, const MetadataKeyType t, const std::string & v) { if (v.empty()) - return make_null_shared_ptr(); + return nullptr; else return std::make_shared<LiteralMetadataValueKey<std::string> >(r, h, t, v); } @@ -56,7 +55,7 @@ namespace const std::string * const r, const std::string * const h, const MetadataKeyType t, const std::string & v) { if (v.empty()) - return make_null_shared_ptr(); + return nullptr; else return std::make_shared<GemcutterURIKey>(r, h, t, v); } @@ -331,7 +330,7 @@ GemcutterID::fs_location_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > GemcutterID::behaviours_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > @@ -397,13 +396,13 @@ GemcutterID::installed_time_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > GemcutterID::from_repositories_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > GemcutterID::choices_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<Slot> > @@ -415,7 +414,7 @@ GemcutterID::slot_key() const const std::shared_ptr<const Contents> GemcutterID::contents() const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/gemcutter/gemcutter_repository.cc b/paludis/repositories/gemcutter/gemcutter_repository.cc index 381febbdc..4bdad242d 100644 --- a/paludis/repositories/gemcutter/gemcutter_repository.cc +++ b/paludis/repositories/gemcutter/gemcutter_repository.cc @@ -29,7 +29,6 @@ #include <paludis/util/simple_parser.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/safe_ofstream.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/action.hh> @@ -131,7 +130,7 @@ GemcutterRepository::location_key() const const std::shared_ptr<const MetadataValueKey<FSPath> > GemcutterRepository::installed_root_key() const { - return make_null_shared_ptr(); + return nullptr; } void @@ -299,13 +298,13 @@ GemcutterRepository::perform_hook(const Hook &, const std::shared_ptr<OutputMana const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > GemcutterRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const Set<std::string> > GemcutterRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/repository/repository_id.cc b/paludis/repositories/repository/repository_id.cc index f35a6b095..27e70077d 100644 --- a/paludis/repositories/repository/repository_id.cc +++ b/paludis/repositories/repository/repository_id.cc @@ -25,7 +25,6 @@ #include <paludis/util/set.hh> #include <paludis/util/hashes.hh> #include <paludis/util/wrapped_forward_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/name.hh> #include <paludis/version_spec.hh> @@ -225,7 +224,7 @@ RepositoryID::post_dependencies_key() const const std::shared_ptr<const MetadataValueKey<std::string> > RepositoryID::short_description_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<std::string> > @@ -255,25 +254,25 @@ RepositoryID::installed_time_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > RepositoryID::from_repositories_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > RepositoryID::choices_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<Slot> > RepositoryID::slot_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const Contents> RepositoryID::contents() const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc index ac7598c21..99f73ddce 100644 --- a/paludis/repositories/repository/repository_repository.cc +++ b/paludis/repositories/repository/repository_repository.cc @@ -29,7 +29,6 @@ #include <paludis/util/simple_parser.hh> #include <paludis/util/safe_ifstream.hh> #include <paludis/util/safe_ofstream.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/action.hh> @@ -136,7 +135,7 @@ RepositoryRepository::format_key() const const std::shared_ptr<const MetadataValueKey<FSPath> > RepositoryRepository::location_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<FSPath> > @@ -320,7 +319,7 @@ RepositoryRepository::perform_hook(const Hook &, const std::shared_ptr<OutputMan const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > RepositoryRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } bool @@ -475,7 +474,7 @@ RepositoryRepository::merge(const MergeParams & m) const std::shared_ptr<const Set<std::string> > RepositoryRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/unavailable/unavailable_package_id.cc b/paludis/repositories/unavailable/unavailable_package_id.cc index 0108f230a..b3f729c02 100644 --- a/paludis/repositories/unavailable/unavailable_package_id.cc +++ b/paludis/repositories/unavailable/unavailable_package_id.cc @@ -26,7 +26,6 @@ #include <paludis/util/set.hh> #include <paludis/util/hashes.hh> #include <paludis/util/wrapped_forward_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/make_named_values.hh> #include <paludis/name.hh> @@ -217,7 +216,7 @@ UnavailablePackageID::fs_location_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > UnavailablePackageID::behaviours_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > @@ -301,7 +300,7 @@ UnavailablePackageID::slot_key() const const std::shared_ptr<const Contents> UnavailablePackageID::contents() const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc index 61af1e1a3..051b64bcc 100644 --- a/paludis/repositories/unavailable/unavailable_repository.cc +++ b/paludis/repositories/unavailable/unavailable_repository.cc @@ -26,7 +26,6 @@ #include <paludis/util/tokeniser.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/extract_host_from_url.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/action.hh> #include <paludis/syncer.hh> @@ -457,7 +456,7 @@ UnavailableRepository::sync_host_key() const const std::shared_ptr<const Set<std::string> > UnavailableRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/unavailable/unavailable_repository_id.cc b/paludis/repositories/unavailable/unavailable_repository_id.cc index 764cec4da..1cf0d97e8 100644 --- a/paludis/repositories/unavailable/unavailable_repository_id.cc +++ b/paludis/repositories/unavailable/unavailable_repository_id.cc @@ -26,7 +26,6 @@ #include <paludis/util/hashes.hh> #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/return_literal_function.hh> #include <paludis/name.hh> @@ -229,7 +228,7 @@ UnavailableRepositoryID::perform_action(Action & action) const n::options() = MergerOptions(), n::output_manager() = output_manager, n::package_id() = shared_from_this(), - n::parts() = make_null_shared_ptr(), + n::parts() = nullptr, n::perform_uninstall() = install_action->options.perform_uninstall(), n::permit_destination() = std::bind(return_literal_function(true)), n::replacing() = install_action->options.replacing(), @@ -289,7 +288,7 @@ UnavailableRepositoryID::perform_action(Action & action) const n::is_overwrite() = false, n::make_output_manager() = std::bind( &this_output_manager, output_manager, std::placeholders::_1), - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = install_action->options.want_phase() )); install_action->options.perform_uninstall()(*i, uo); @@ -391,25 +390,25 @@ UnavailableRepositoryID::installed_time_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > UnavailableRepositoryID::from_repositories_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > UnavailableRepositoryID::choices_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<Slot> > UnavailableRepositoryID::slot_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const Contents> UnavailableRepositoryID::contents() const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc index 95e4fd61d..4434465ec 100644 --- a/paludis/repositories/unavailable/unavailable_repository_store.cc +++ b/paludis/repositories/unavailable/unavailable_repository_store.cc @@ -32,7 +32,6 @@ #include <paludis/util/is_file_with_extension.hh> #include <paludis/util/log.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/name.hh> #include <paludis/version_spec.hh> diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc index 63535375a..6400f8f9a 100644 --- a/paludis/repositories/unpackaged/installed_id.cc +++ b/paludis/repositories/unpackaged/installed_id.cc @@ -30,7 +30,6 @@ #include <paludis/util/safe_ifstream.hh> #include <paludis/util/return_literal_function.hh> #include <paludis/util/timestamp.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/fs_stat.hh> @@ -503,7 +502,7 @@ InstalledUnpackagedID::keywords_key() const const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > InstalledUnpackagedID::dependencies_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc index 7763261c5..4e5c2564c 100644 --- a/paludis/repositories/unpackaged/installed_repository.cc +++ b/paludis/repositories/unpackaged/installed_repository.cc @@ -32,7 +32,6 @@ #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/safe_ofstream.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_iterator.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/return_literal_function.hh> @@ -516,12 +515,12 @@ InstalledUnpackagedRepository::sync( const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > InstalledUnpackagedRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const Set<std::string> > InstalledUnpackagedRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc index 7dc3d8a41..1fbbaca3f 100644 --- a/paludis/repositories/unpackaged/installed_repository_TEST.cc +++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc @@ -40,7 +40,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/accept_visitor.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <algorithm> @@ -131,7 +130,7 @@ TEST(InstalledRepository, Metadata) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne( generator::Matches(parse_user_package_dep_spec("cat-one/foo:0", - &env, { }), make_null_shared_ptr(), { }))]->begin()); + &env, { }), nullptr, { }))]->begin()); EXPECT_EQ(id1->version(), VersionSpec("1", { })); EXPECT_EQ("0", id1->slot_key()->parse_value().raw_value()); @@ -148,7 +147,7 @@ TEST(InstalledRepository, Metadata) const std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne( generator::Matches(parse_user_package_dep_spec("cat-one/foo:1", - &env, { }), make_null_shared_ptr(), { }))]->begin()); + &env, { }), nullptr, { }))]->begin()); EXPECT_EQ(id2->version(), VersionSpec("2", { })); EXPECT_EQ("1", id2->slot_key()->parse_value().raw_value()); @@ -178,13 +177,13 @@ TEST(InstalledRepository, Masks) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne( generator::Matches(parse_user_package_dep_spec("cat-one/foo:0", - &env, { }), make_null_shared_ptr(), { }))]->begin()); + &env, { }), nullptr, { }))]->begin()); EXPECT_TRUE(! id1->masked()); const std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne( generator::Matches(parse_user_package_dep_spec("cat-one/foo:1", - &env, { }), make_null_shared_ptr(), { }))]->begin()); + &env, { }), nullptr, { }))]->begin()); EXPECT_TRUE(! id2->masked()); } @@ -209,7 +208,7 @@ TEST(InstalledRepository, Actions) const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne( generator::Matches(parse_user_package_dep_spec("cat-one/foo:1", - &env, { }), make_null_shared_ptr(), { }))]->begin()); + &env, { }), nullptr, { }))]->begin()); EXPECT_TRUE(! id1->supports_action(SupportsActionTest<InstallAction>())); EXPECT_TRUE(! id1->supports_action(SupportsActionTest<ConfigAction>())); @@ -245,11 +244,11 @@ TEST(InstalledRepository, UninstallLast) UninstallAction action(make_named_values<UninstallActionOptions>( n::config_protect() = "", - n::if_for_install_id() = make_null_shared_ptr(), + n::if_for_install_id() = nullptr, n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = &make_standard_output_manager, - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = &want_all_phases )); id->perform_action(action); @@ -289,15 +288,15 @@ TEST(InstalledRepository, UninstallNotLast) const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne( generator::Matches(parse_user_package_dep_spec("cat-one/foo:fred", - &env, { }), make_null_shared_ptr(), { }))]->begin()); + &env, { }), nullptr, { }))]->begin()); UninstallAction action(make_named_values<UninstallActionOptions>( n::config_protect() = "", - n::if_for_install_id() = make_null_shared_ptr(), + n::if_for_install_id() = nullptr, n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = &make_standard_output_manager, - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = &want_all_phases )); id->perform_action(action); @@ -529,16 +528,16 @@ TEST(InstalledRepository, MultipleOps) UninstallAction action(make_named_values<UninstallActionOptions>( n::config_protect() = "", - n::if_for_install_id() = make_null_shared_ptr(), + n::if_for_install_id() = nullptr, n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = &make_standard_output_manager, - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::Matches( parse_user_package_dep_spec("cat/pkg4a", - &env, { }), make_null_shared_ptr(), { }))]->begin())->perform_action(action); + &env, { }), nullptr, { }))]->begin())->perform_action(action); EXPECT_TRUE(FSPath("installed_repository_TEST_dir/root4/dir").stat().is_directory()); EXPECT_TRUE(! FSPath("installed_repository_TEST_dir/root4/dir/4a").stat().is_regular_file()); @@ -575,16 +574,16 @@ TEST(InstalledRepository, MultipleOps) UninstallAction action(make_named_values<UninstallActionOptions>( n::config_protect() = "", - n::if_for_install_id() = make_null_shared_ptr(), + n::if_for_install_id() = nullptr, n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = &make_standard_output_manager, - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::Matches( parse_user_package_dep_spec("cat/pkg4b", - &env, { }), make_null_shared_ptr(), { }))]->begin())->perform_action(action); + &env, { }), nullptr, { }))]->begin())->perform_action(action); EXPECT_TRUE(! FSPath("installed_repository_TEST_dir/root4/dir").stat().is_directory()); diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc index 7d02ec851..80cfec97e 100644 --- a/paludis/repositories/unpackaged/unpackaged_id.cc +++ b/paludis/repositories/unpackaged/unpackaged_id.cc @@ -28,7 +28,6 @@ #include <paludis/util/hashes.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/return_literal_function.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/singleton-impl.hh> #include <paludis/util/timestamp.hh> @@ -114,9 +113,9 @@ namespace paludis UnpackagedIDData::get_instance()->run_dependencies_labels, r)), description_key(std::make_shared<LiteralMetadataValueKey<std::string> >("description", "Description", mkt_significant, d)), choices_key(std::make_shared<UnpackagedChoicesKey>(env, "choices", "Choices", mkt_normal, id)), - strip_key(ds.is_indeterminate() ? make_null_shared_ptr() : + strip_key(ds.is_indeterminate() ? nullptr : std::make_shared<LiteralMetadataValueKey<bool>>("strip", "Strip", mkt_internal, ds.is_true() ? true : false)), - preserve_work_key(dw.is_indeterminate() ? make_null_shared_ptr() : + preserve_work_key(dw.is_indeterminate() ? nullptr : std::make_shared<LiteralMetadataValueKey<bool>>("preserve_work", "Preserve work", mkt_internal, dw.is_true() ? true : false)) { } @@ -216,7 +215,7 @@ UnpackagedID::keywords_key() const const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > UnpackagedID::dependencies_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > @@ -288,7 +287,7 @@ UnpackagedID::slot_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > UnpackagedID::behaviours_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataValueKey<bool> > @@ -415,7 +414,7 @@ UnpackagedID::perform_action(Action & action) const | extra_merger_options, n::output_manager() = output_manager, n::package_id() = shared_from_this(), - n::parts() = make_null_shared_ptr(), + n::parts() = nullptr, n::perform_uninstall() = install_action->options.perform_uninstall(), n::permit_destination() = std::bind(return_literal_function(true)), n::replacing() = install_action->options.replacing(), @@ -475,7 +474,7 @@ UnpackagedID::perform_action(Action & action) const n::ignore_for_unmerge() = &ignore_nothing, n::is_overwrite() = false, n::make_output_manager() = std::bind(&this_output_manager, output_manager, std::placeholders::_1), - n::override_contents() = make_null_shared_ptr(), + n::override_contents() = nullptr, n::want_phase() = install_action->options.want_phase() )); install_action->options.perform_uninstall()(*i, uo); @@ -513,6 +512,6 @@ UnpackagedID::choices_key() const const std::shared_ptr<const Contents> UnpackagedID::contents() const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc index a829cf187..e656f216d 100644 --- a/paludis/repositories/unpackaged/unpackaged_repository.cc +++ b/paludis/repositories/unpackaged/unpackaged_repository.cc @@ -26,7 +26,6 @@ #include <paludis/util/stringify.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/destringify.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/package_id.hh> #include <paludis/metadata_key.hh> #include <paludis/action.hh> @@ -309,12 +308,12 @@ UnpackagedRepository::sync( const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > UnpackagedRepository::sync_host_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const Set<std::string> > UnpackagedRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } diff --git a/paludis/repositories/unwritten/unwritten_id.cc b/paludis/repositories/unwritten/unwritten_id.cc index 2702f6fc8..fb5e6758a 100644 --- a/paludis/repositories/unwritten/unwritten_id.cc +++ b/paludis/repositories/unwritten/unwritten_id.cc @@ -24,7 +24,6 @@ #include <paludis/util/visitor_cast.hh> #include <paludis/util/set.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/name.hh> #include <paludis/version_spec.hh> #include <paludis/metadata_key.hh> @@ -214,7 +213,7 @@ UnwrittenID::fs_location_key() const const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > UnwrittenID::behaviours_key() const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > @@ -298,7 +297,7 @@ UnwrittenID::choices_key() const const std::shared_ptr<const Contents> UnwrittenID::contents() const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc index 648f6965d..63a219926 100644 --- a/paludis/repositories/unwritten/unwritten_repository.cc +++ b/paludis/repositories/unwritten/unwritten_repository.cc @@ -26,7 +26,6 @@ #include <paludis/util/tokeniser.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/extract_host_from_url.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/action.hh> @@ -416,7 +415,7 @@ UnwrittenRepository::sync_host_key() const const std::shared_ptr<const Set<std::string> > UnwrittenRepository::maybe_expand_licence_nonrecursively(const std::string &) const { - return make_null_shared_ptr(); + return nullptr; } namespace paludis diff --git a/paludis/resolver/allowed_to_remove_helper.cc b/paludis/resolver/allowed_to_remove_helper.cc index 50262aa2b..b68eb8376 100644 --- a/paludis/resolver/allowed_to_remove_helper.cc +++ b/paludis/resolver/allowed_to_remove_helper.cc @@ -23,7 +23,6 @@ #include <paludis/resolver/resolvent.hh> #include <paludis/resolver/resolution.hh> #include <paludis/util/pimp-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_dep_spec_collection.hh> @@ -40,7 +39,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - allowed_to_remove_specs(make_null_shared_ptr()) + allowed_to_remove_specs(nullptr) { } }; diff --git a/paludis/resolver/allowed_to_restart_helper.cc b/paludis/resolver/allowed_to_restart_helper.cc index 67a107ec3..84f5f0012 100644 --- a/paludis/resolver/allowed_to_restart_helper.cc +++ b/paludis/resolver/allowed_to_restart_helper.cc @@ -24,7 +24,6 @@ #include <paludis/resolver/resolution.hh> #include <paludis/resolver/decision_utils-fwd.hh> #include <paludis/util/pimp-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_dep_spec_collection.hh> @@ -41,7 +40,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - no_restarts_for_specs(make_null_shared_ptr()) + no_restarts_for_specs(nullptr) { } }; diff --git a/paludis/resolver/always_via_binary_helper.cc b/paludis/resolver/always_via_binary_helper.cc index b5aa466e8..94b44aa9b 100644 --- a/paludis/resolver/always_via_binary_helper.cc +++ b/paludis/resolver/always_via_binary_helper.cc @@ -26,7 +26,6 @@ #include <paludis/resolver/destination_utils.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/util/visitor_cast.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_id.hh> #include <paludis/metadata_key.hh> @@ -45,7 +44,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - always_via_binary_specs(make_null_shared_ptr()) + always_via_binary_specs(nullptr) { } }; diff --git a/paludis/resolver/can_use_helper.cc b/paludis/resolver/can_use_helper.cc index ecc913f7a..ceaecca98 100644 --- a/paludis/resolver/can_use_helper.cc +++ b/paludis/resolver/can_use_helper.cc @@ -20,7 +20,6 @@ #include <paludis/resolver/can_use_helper.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/util/options.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_id.hh> #include <paludis/package_dep_spec_collection.hh> @@ -38,7 +37,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - cannot_use_specs(make_null_shared_ptr()) + cannot_use_specs(nullptr) { } }; diff --git a/paludis/resolver/collect_depped_upon.cc b/paludis/resolver/collect_depped_upon.cc index 3cc356de7..8ad2391c5 100644 --- a/paludis/resolver/collect_depped_upon.cc +++ b/paludis/resolver/collect_depped_upon.cc @@ -23,7 +23,6 @@ #include <paludis/util/visitor_cast.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/accept_visitor.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/sequence-impl.hh> #include <paludis/util/set-impl.hh> @@ -163,7 +162,7 @@ namespace if (best_eventual_id && best_eventual_id->slot_key()) { PartiallyMadePackageDepSpec part_spec(*s.spec()); - part_spec.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(best_eventual_id->slot_key()->parse_value().parallel_value(), make_null_shared_ptr())); + part_spec.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(best_eventual_id->slot_key()->parse_value().parallel_value(), nullptr)); spec = std::make_shared<PackageDepSpec>(part_spec); } } diff --git a/paludis/resolver/confirm_helper.cc b/paludis/resolver/confirm_helper.cc index 4a7e0be58..c845f88cc 100644 --- a/paludis/resolver/confirm_helper.cc +++ b/paludis/resolver/confirm_helper.cc @@ -26,7 +26,6 @@ #include <paludis/resolver/required_confirmations.hh> #include <paludis/resolver/decision_utils.hh> #include <paludis/util/pimp-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_id.hh> #include <paludis/package_dep_spec_collection.hh> @@ -47,9 +46,9 @@ namespace paludis Imp(const Environment * const e) : env(e), - permit_downgrade_specs(make_null_shared_ptr()), - permit_old_version_specs(make_null_shared_ptr()), - allowed_to_break_specs(make_null_shared_ptr()), + permit_downgrade_specs(nullptr), + permit_old_version_specs(nullptr), + allowed_to_break_specs(nullptr), allowed_to_break_system(false) { } diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc index 118f11b1f..7b026ecad 100644 --- a/paludis/resolver/decider.cc +++ b/paludis/resolver/decider.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009, 2010, 2011 Ciaran McCreesh + * Copyright (c) 2009, 2010, 2011, 2013 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -52,7 +52,6 @@ #include <paludis/util/tribool.hh> #include <paludis/util/log.hh> #include <paludis/util/visitor_cast.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/accept_visitor.hh> #include <paludis/environment.hh> #include <paludis/notifier_callback.hh> @@ -478,7 +477,7 @@ Decider::_create_resolution_for_resolvent(const Resolvent & r) const { return std::make_shared<Resolution>(make_named_values<Resolution>( n::constraints() = _imp->fns.get_initial_constraints_for_fn()(r), - n::decision() = make_null_shared_ptr(), + n::decision() = nullptr, n::resolvent() = r )); } @@ -498,7 +497,7 @@ Decider::_resolution_for_resolvent(const Resolvent & r, const Tribool if_not_exi throw InternalError(PALUDIS_HERE, "resolver bug: expected resolution for " + stringify(r) + " to exist, but it doesn't"); else - return make_null_shared_ptr(); + return nullptr; } return *i; @@ -518,7 +517,7 @@ Decider::_make_constraints_from_target( result->push_back(std::make_shared<Constraint>(make_named_values<Constraint>( n::destination_type() = resolution->resolvent().destination_type(), n::force_unable() = false, - n::from_id() = make_null_shared_ptr(), + n::from_id() = nullptr, n::nothing_is_fine_too() = existing.second, n::reason() = reason, n::spec() = spec, @@ -672,12 +671,12 @@ namespace bool visit(const ChangesToMakeDecision & decision) const { return ok(decision.origin_id(), - decision.if_changed_choices() ? decision.if_changed_choices()->changed_choices() : make_null_shared_ptr()); + decision.if_changed_choices() ? decision.if_changed_choices()->changed_choices() : nullptr); } bool visit(const ExistingNoChangeDecision & decision) const { - return ok(decision.existing_id(), make_null_shared_ptr()); + return ok(decision.existing_id(), nullptr); } bool visit(const NothingNoChangeDecision &) const @@ -763,17 +762,17 @@ namespace { const std::shared_ptr<const ChangedChoices> visit(const TargetReason &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const DependentReason &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const PresetReason &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const DependencyReason & r) const @@ -783,17 +782,17 @@ namespace const std::shared_ptr<const ChangedChoices> visit(const ViaBinaryReason &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const WasUsedByReason &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const LikeOtherDestinationTypeReason &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const SetReason & r) const @@ -812,32 +811,32 @@ namespace { const std::shared_ptr<const ChangedChoices> visit(const ChangesToMakeDecision & d) const { - return d.if_changed_choices() ? d.if_changed_choices()->changed_choices() : make_null_shared_ptr(); + return d.if_changed_choices() ? d.if_changed_choices()->changed_choices() : nullptr; } const std::shared_ptr<const ChangedChoices> visit(const ExistingNoChangeDecision &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const NothingNoChangeDecision &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const UnableToMakeDecision &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const RemoveDecision &) const { - return make_null_shared_ptr(); + return nullptr; } const std::shared_ptr<const ChangedChoices> visit(const BreakDecision &) const { - return make_null_shared_ptr(); + return nullptr; } }; @@ -1048,39 +1047,39 @@ namespace { const std::pair<std::shared_ptr<const PackageID>, std::shared_ptr<const ChangedChoices> > visit(const NothingNoChangeDecision &) const { - return std::make_pair(make_null_shared_ptr(), make_null_shared_ptr()); + return std::make_pair(nullptr, nullptr); } const std::pair<std::shared_ptr<const PackageID>, std::shared_ptr<const ChangedChoices> > visit(const RemoveDecision &) const { - return std::make_pair(make_null_shared_ptr(), make_null_shared_ptr()); + return std::make_pair(nullptr, nullptr); } const std::pair<std::shared_ptr<const PackageID>, std::shared_ptr<const ChangedChoices> > visit(const UnableToMakeDecision &) const { - return std::make_pair(make_null_shared_ptr(), make_null_shared_ptr()); + return std::make_pair(nullptr, nullptr); } const std::pair<std::shared_ptr<const PackageID>, std::shared_ptr<const ChangedChoices> > visit(const ExistingNoChangeDecision & decision) const { if (decision.taken()) - return std::make_pair(decision.existing_id(), make_null_shared_ptr()); + return std::make_pair(decision.existing_id(), nullptr); else - return std::make_pair(make_null_shared_ptr(), make_null_shared_ptr()); + return std::make_pair(nullptr, nullptr); } const std::pair<std::shared_ptr<const PackageID>, std::shared_ptr<const ChangedChoices> > visit(const ChangesToMakeDecision & decision) const { if (decision.taken()) return std::make_pair(decision.origin_id(), - decision.if_changed_choices() ? decision.if_changed_choices()->changed_choices() : make_null_shared_ptr()); + decision.if_changed_choices() ? decision.if_changed_choices()->changed_choices() : nullptr); else - return std::make_pair(make_null_shared_ptr(), make_null_shared_ptr()); + return std::make_pair(nullptr, nullptr); } const std::pair<std::shared_ptr<const PackageID>, std::shared_ptr<const ChangedChoices> > visit(const BreakDecision &) const { - return std::make_pair(make_null_shared_ptr(), make_null_shared_ptr()); + return std::make_pair(nullptr, nullptr); } }; } @@ -1256,9 +1255,9 @@ Decider::find_any_score( return std::make_pair(acs_vacuous_blocker, operator_bias); } - const std::shared_ptr<DependencyReason> reason_unless_block(is_block ? make_null_shared_ptr() : std::make_shared<DependencyReason>( - our_id, make_null_shared_ptr(), our_resolution->resolvent(), dep, _package_dep_spec_already_met(*dep.spec().if_package(), our_id))); - const std::shared_ptr<const Resolvents> resolvents_unless_block(is_block ? make_null_shared_ptr() : + const std::shared_ptr<DependencyReason> reason_unless_block(is_block ? nullptr : std::make_shared<DependencyReason>( + our_id, nullptr, our_resolution->resolvent(), dep, _package_dep_spec_already_met(*dep.spec().if_package(), our_id))); + const std::shared_ptr<const Resolvents> resolvents_unless_block(is_block ? nullptr : _get_resolvents_for(spec, reason_unless_block).first); std::list<std::shared_ptr<Decision> > could_install_decisions; if (resolvents_unless_block) @@ -1354,12 +1353,12 @@ namespace std::shared_ptr<SlotName> visit(const SlotAnyUnlockedRequirement &) { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<SlotName> visit(const SlotAnyAtAllLockedRequirement &) { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<SlotName> visit(const SlotUnknownRewrittenRequirement &) PALUDIS_ATTRIBUTE((noreturn)) @@ -1436,7 +1435,7 @@ Decider::_get_error_resolvents_for( if (destination_types[*t]) { Resolvent resolvent(spec, make_named_values<SlotNameOrNull>( - n::name_or_null() = make_null_shared_ptr(), + n::name_or_null() = nullptr, n::null_means_unknown() = true ), *t); @@ -1446,7 +1445,7 @@ Decider::_get_error_resolvents_for( resolvent.slot() = make_named_values<SlotNameOrNull>( n::name_or_null() = (*ids->rbegin())->slot_key() ? make_shared_copy((*ids->rbegin())->slot_key()->parse_value().parallel_value()) : - make_null_shared_ptr(), + nullptr, n::null_means_unknown() = true ); @@ -1474,7 +1473,7 @@ Decider::_try_to_find_decision_for( const bool try_removes_if_allowed) const { if (resolution->constraints()->any_force_unable()) - return make_null_shared_ptr(); + return nullptr; const std::shared_ptr<const PackageID> existing_id(_find_existing_id_for(resolution)); @@ -1506,7 +1505,7 @@ Decider::_try_to_find_decision_for( best, last_ct, ! resolution->constraints()->all_untaken(), - make_null_shared_ptr(), + nullptr, std::bind(&Decider::_fixup_changes_to_make_decision, this, resolution, std::placeholders::_1) ); } @@ -1525,11 +1524,11 @@ Decider::_try_to_find_decision_for( case ue_if_same: case ue_if_same_version: if (! is_transient) - return make_null_shared_ptr(); + return nullptr; break; case ue_never: - return make_null_shared_ptr(); + return nullptr; case last_ue: break; @@ -1558,7 +1557,7 @@ Decider::_try_to_find_decision_for( else if (also_try_masked && ! try_masked_this_time) return _try_to_find_decision_for(resolution, also_try_option_changes, try_option_changes_this_time, true, true, try_removes_if_allowed); else - return make_null_shared_ptr(); + return nullptr; } else if (existing_id && installable_id) { @@ -1580,7 +1579,7 @@ Decider::_try_to_find_decision_for( best, last_ct, ! resolution->constraints()->all_untaken(), - make_null_shared_ptr(), + nullptr, std::bind(&Decider::_fixup_changes_to_make_decision, this, resolution, std::placeholders::_1) )); @@ -1803,7 +1802,7 @@ Decider::_find_id_for_from( if (ok) return FoundID(*i, - why_changed_choices->changed_choices()->empty() ? make_null_shared_ptr() : why_changed_choices, + why_changed_choices->changed_choices()->empty() ? nullptr : why_changed_choices, (*i)->version() == best_version->version()); } } @@ -1811,7 +1810,7 @@ Decider::_find_id_for_from( if (try_changing_choices && ! trying_changing_choices) return _find_id_for_from(resolution, ids, true, true); else - return FoundID(make_null_shared_ptr(), make_null_shared_ptr(), false); + return FoundID(nullptr, nullptr, false); } const std::shared_ptr<const Constraints> @@ -1842,11 +1841,11 @@ Decider::_get_unmatching_constraints( decision = std::make_shared<ChangesToMakeDecision>( resolution->resolvent(), id, - make_null_shared_ptr(), + nullptr, false, last_ct, ! (*c)->untaken(), - make_null_shared_ptr(), + nullptr, std::function<void (const ChangesToMakeDecision &)>() ); if (! _check_constraint(*c, decision)) diff --git a/paludis/resolver/decision.cc b/paludis/resolver/decision.cc index df02effe1..57a2765bb 100644 --- a/paludis/resolver/decision.cc +++ b/paludis/resolver/decision.cc @@ -29,7 +29,6 @@ #include <paludis/util/pimp-impl.hh> #include <paludis/util/sequence.hh> #include <paludis/util/wrapped_forward_iterator.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/serialise-impl.hh> #include <paludis/changed_choices.hh> #include <sstream> @@ -450,7 +449,7 @@ ChangesToMakeDecision::serialise(Serialiser & s) const .member(SerialiserFlags<>(), "change_type", stringify(change_type())) .member(SerialiserFlags<serialise::might_be_null>(), "destination", destination()) .member(SerialiserFlags<serialise::might_be_null>(), "if_via_new_binary_in", if_via_new_binary_in() ? - make_shared_copy(stringify(*if_via_new_binary_in())) : make_null_shared_ptr()) + make_shared_copy(stringify(*if_via_new_binary_in())) : nullptr) .member(SerialiserFlags<>(), "taken", taken()) .member(SerialiserFlags<serialise::might_be_null, serialise::container>(), "required_confirmations_if_any", required_confirmations_if_any()) ; diff --git a/paludis/resolver/decision_utils.cc b/paludis/resolver/decision_utils.cc index 4633cbb53..04591e5b4 100644 --- a/paludis/resolver/decision_utils.cc +++ b/paludis/resolver/decision_utils.cc @@ -19,7 +19,6 @@ #include <paludis/resolver/decision_utils.hh> #include <paludis/resolver/decision.hh> -#include <paludis/util/make_null_shared_ptr.hh> using namespace paludis; using namespace paludis::resolver; @@ -45,17 +44,17 @@ namespace std::shared_ptr<const PackageID> visit(const NothingNoChangeDecision &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const PackageID> visit(const RemoveDecision &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const PackageID> visit(const UnableToMakeDecision &) const { - return make_null_shared_ptr(); + return nullptr; } }; } diff --git a/paludis/resolver/get_constraints_for_dependent_helper.cc b/paludis/resolver/get_constraints_for_dependent_helper.cc index 7604e1849..9b331086c 100644 --- a/paludis/resolver/get_constraints_for_dependent_helper.cc +++ b/paludis/resolver/get_constraints_for_dependent_helper.cc @@ -28,7 +28,6 @@ #include <paludis/util/visitor_cast.hh> #include <paludis/util/make_shared_copy.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/dep_spec.hh> #include <paludis/package_id.hh> @@ -51,7 +50,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - less_restrictive_remove_blockers_specs(make_null_shared_ptr()) + less_restrictive_remove_blockers_specs(nullptr) { } }; @@ -86,7 +85,7 @@ GetConstraintsForDependentHelper::operator() ( PartiallyMadePackageDepSpec partial_spec({ }); partial_spec.package(id->name()); if (id->slot_key()) - partial_spec.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(id->slot_key()->parse_value().parallel_value(), make_null_shared_ptr())); + partial_spec.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(id->slot_key()->parse_value().parallel_value(), nullptr)); spec = std::make_shared<PackageDepSpec>(partial_spec); } diff --git a/paludis/resolver/get_constraints_for_purge_helper.cc b/paludis/resolver/get_constraints_for_purge_helper.cc index 9bde04ea2..d6d6b7583 100644 --- a/paludis/resolver/get_constraints_for_purge_helper.cc +++ b/paludis/resolver/get_constraints_for_purge_helper.cc @@ -28,7 +28,6 @@ #include <paludis/util/visitor_cast.hh> #include <paludis/util/make_shared_copy.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/dep_spec.hh> #include <paludis/package_id.hh> @@ -51,7 +50,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - purge_specs(make_null_shared_ptr()) + purge_specs(nullptr) { } }; @@ -81,7 +80,7 @@ GetConstraintsForPurgeHelper::operator() ( PartiallyMadePackageDepSpec partial_spec({ }); partial_spec.package(id->name()); if (id->slot_key()) - partial_spec.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(id->slot_key()->parse_value().parallel_value(), make_null_shared_ptr())); + partial_spec.slot_requirement(std::make_shared<ELikeSlotExactPartialRequirement>(id->slot_key()->parse_value().parallel_value(), nullptr)); PackageDepSpec spec(partial_spec); const std::shared_ptr<WasUsedByReason> reason(std::make_shared<WasUsedByReason>(was_used_by_ids)); diff --git a/paludis/resolver/get_constraints_for_via_binary_helper.cc b/paludis/resolver/get_constraints_for_via_binary_helper.cc index d7dd17db6..b2e142f55 100644 --- a/paludis/resolver/get_constraints_for_via_binary_helper.cc +++ b/paludis/resolver/get_constraints_for_via_binary_helper.cc @@ -28,7 +28,6 @@ #include <paludis/util/make_shared_copy.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/stringify.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/partially_made_package_dep_spec.hh> @@ -72,7 +71,7 @@ GetConstraintsForViaBinaryHelper::operator() ( result->push_back(std::make_shared<Constraint>(make_named_values<Constraint>( n::destination_type() = resolution->resolvent().destination_type(), n::force_unable() = false, - n::from_id() = make_null_shared_ptr(), + n::from_id() = nullptr, n::nothing_is_fine_too() = false, n::reason() = reason, n::spec() = spec, diff --git a/paludis/resolver/get_initial_constraints_for_helper.cc b/paludis/resolver/get_initial_constraints_for_helper.cc index fd352a8b3..5c1ca5f33 100644 --- a/paludis/resolver/get_initial_constraints_for_helper.cc +++ b/paludis/resolver/get_initial_constraints_for_helper.cc @@ -33,7 +33,6 @@ #include <paludis/util/stringify.hh> #include <paludis/util/hashes.hh> #include <paludis/util/timestamp.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/enum_iterator.hh> #include <paludis/dep_spec.hh> #include <paludis/package_id.hh> @@ -91,7 +90,7 @@ GetInitialConstraintsForHelper::add_preset_spec(const PackageDepSpec & spec, con { Context context("When adding preset for '" + stringify(spec) + "':"); - auto reason(std::make_shared<PresetReason>("preset", make_null_shared_ptr())); + auto reason(std::make_shared<PresetReason>("preset", nullptr)); auto ids((*_imp->env)[selection::BestVersionInEachSlot(generator::Matches(spec, from_id, { }))]); for (auto i(ids->begin()), i_end(ids->end()) ; @@ -237,9 +236,9 @@ GetInitialConstraintsForHelper::_make_initial_constraints_for( result->add(std::make_shared<Constraint>(make_named_values<Constraint>( n::destination_type() = resolvent.destination_type(), n::force_unable() = false, - n::from_id() = make_null_shared_ptr(), + n::from_id() = nullptr, n::nothing_is_fine_too() = true, - n::reason() = std::make_shared<PresetReason>("is scm", make_null_shared_ptr()), + n::reason() = std::make_shared<PresetReason>("is scm", nullptr), n::spec() = make_package_dep_spec({ }).package(resolvent.package()), n::untaken() = false, n::use_existing() = ue_only_if_transient diff --git a/paludis/resolver/interest_in_spec_helper.cc b/paludis/resolver/interest_in_spec_helper.cc index e34cf502e..54a1cb9f0 100644 --- a/paludis/resolver/interest_in_spec_helper.cc +++ b/paludis/resolver/interest_in_spec_helper.cc @@ -28,7 +28,6 @@ #include <paludis/util/pimp-impl.hh> #include <paludis/util/stringify.hh> #include <paludis/util/tribool.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/selection.hh> #include <paludis/generator.hh> @@ -66,8 +65,8 @@ namespace paludis Imp(const Environment * const e) : env(e), - no_blockers_from_specs(make_null_shared_ptr()), - no_dependencies_from_specs(make_null_shared_ptr()), + no_blockers_from_specs(nullptr), + no_dependencies_from_specs(nullptr), follow_installed_build_dependencies(false), follow_installed_dependencies(true), take_suggestions(indeterminate), @@ -276,7 +275,7 @@ InterestInSpecHelper::operator() ( for (auto l(_imp->take_from_specs.begin()), l_end(_imp->take_from_specs.end()) ; l != l_end ; ++l) { - if (match_package(*_imp->env, *l, id, make_null_shared_ptr(), { })) + if (match_package(*_imp->env, *l, id, nullptr, { })) return si_take; } @@ -305,7 +304,7 @@ InterestInSpecHelper::operator() ( for (auto l(_imp->ignore_from_specs.begin()), l_end(_imp->ignore_from_specs.end()) ; l != l_end ; ++l) { - if (match_package(*_imp->env, *l, id, make_null_shared_ptr(), { })) + if (match_package(*_imp->env, *l, id, nullptr, { })) return si_ignore; } diff --git a/paludis/resolver/job_state.cc b/paludis/resolver/job_state.cc index 2d541bd56..c7f7d0d81 100644 --- a/paludis/resolver/job_state.cc +++ b/paludis/resolver/job_state.cc @@ -19,7 +19,6 @@ #include <paludis/resolver/job_state.hh> #include <paludis/util/pimp-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/serialise-impl.hh> using namespace paludis; @@ -174,7 +173,7 @@ const std::shared_ptr<JobSucceededState> JobSucceededState::deserialise(Deserialisation & d) { Deserialisator v(d, "JobSucceededState"); - return std::make_shared<JobSucceededState>(make_null_shared_ptr()); + return std::make_shared<JobSucceededState>(nullptr); } void @@ -204,7 +203,7 @@ const std::shared_ptr<JobFailedState> JobFailedState::deserialise(Deserialisation & d) { Deserialisator v(d, "JobFailedState"); - return std::make_shared<JobFailedState>(make_null_shared_ptr()); + return std::make_shared<JobFailedState>(nullptr); } void diff --git a/paludis/resolver/order_early_helper.cc b/paludis/resolver/order_early_helper.cc index d9e9eb3f2..27ee387a9 100644 --- a/paludis/resolver/order_early_helper.cc +++ b/paludis/resolver/order_early_helper.cc @@ -24,7 +24,6 @@ #include <paludis/resolver/decision_utils.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/util/tribool.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_dep_spec_collection.hh> @@ -42,8 +41,8 @@ namespace paludis Imp(const Environment * const e) : env(e), - early_specs(make_null_shared_ptr()), - late_specs(make_null_shared_ptr()) + early_specs(nullptr), + late_specs(nullptr) { } }; diff --git a/paludis/resolver/package_or_block_dep_spec.cc b/paludis/resolver/package_or_block_dep_spec.cc index 87b63614a..6c4b4b891 100644 --- a/paludis/resolver/package_or_block_dep_spec.cc +++ b/paludis/resolver/package_or_block_dep_spec.cc @@ -23,7 +23,6 @@ #include <paludis/util/map.hh> #include <paludis/util/sequence-impl.hh> #include <paludis/util/wrapped_forward_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/make_named_values.hh> #include <paludis/serialise-impl.hh> #include <paludis/dep_spec_annotations.hh> @@ -44,12 +43,12 @@ paludis::resolver::operator<< (std::ostream & s, const PackageOrBlockDepSpec & d PackageOrBlockDepSpec::PackageOrBlockDepSpec(const BlockDepSpec & s) : if_block(n::if_block() = std::make_shared<BlockDepSpec>(s)), - if_package(n::if_package() = make_null_shared_ptr()) + if_package(n::if_package() = nullptr) { } PackageOrBlockDepSpec::PackageOrBlockDepSpec(const PackageDepSpec & s) : - if_block(n::if_block() = make_null_shared_ptr()), + if_block(n::if_block() = nullptr), if_package(n::if_package() = std::make_shared<PackageDepSpec>(s)) { } diff --git a/paludis/resolver/prefer_or_avoid_helper.cc b/paludis/resolver/prefer_or_avoid_helper.cc index 1cfa1d94b..318dfff39 100644 --- a/paludis/resolver/prefer_or_avoid_helper.cc +++ b/paludis/resolver/prefer_or_avoid_helper.cc @@ -21,7 +21,6 @@ #include <paludis/util/pimp-impl.hh> #include <paludis/util/hashes.hh> #include <paludis/util/tribool.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/options.hh> #include <paludis/name.hh> #include <paludis/dep_spec.hh> @@ -98,7 +97,7 @@ PreferOrAvoidHelper::operator() (const PackageDepSpec & s) const { bool all(true); for (auto q((*p)->begin()), q_end((*p)->end()) ; q != q_end ; ++q) - if (! match_package(*_imp->env, s, *q, make_null_shared_ptr(), { })) + if (! match_package(*_imp->env, s, *q, nullptr, { })) { all = false; break; @@ -112,7 +111,7 @@ PreferOrAvoidHelper::operator() (const PackageDepSpec & s) const p != p_end ; ++p) { for (auto q((*p)->begin()), q_end((*p)->end()) ; q != q_end ; ++q) - if (match_package(*_imp->env, s, *q, make_null_shared_ptr(), { })) + if (match_package(*_imp->env, s, *q, nullptr, { })) return false; } diff --git a/paludis/resolver/reason_utils.cc b/paludis/resolver/reason_utils.cc index 724b23c77..4a075c176 100644 --- a/paludis/resolver/reason_utils.cc +++ b/paludis/resolver/reason_utils.cc @@ -19,7 +19,6 @@ #include <paludis/resolver/reason_utils.hh> #include <paludis/resolver/reason.hh> -#include <paludis/util/make_null_shared_ptr.hh> using namespace paludis; using namespace paludis::resolver; @@ -78,27 +77,27 @@ namespace std::shared_ptr<const PackageID> visit(const DependentReason &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const PackageID> visit(const WasUsedByReason &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const PackageID> visit(const PresetReason &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const PackageID> visit(const ViaBinaryReason &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const PackageID> visit(const TargetReason &) const { - return make_null_shared_ptr(); + return nullptr; } std::shared_ptr<const PackageID> visit(const LikeOtherDestinationTypeReason & r) const diff --git a/paludis/resolver/remove_hidden_helper.cc b/paludis/resolver/remove_hidden_helper.cc index 9e884cd93..5ac8d9e37 100644 --- a/paludis/resolver/remove_hidden_helper.cc +++ b/paludis/resolver/remove_hidden_helper.cc @@ -21,7 +21,6 @@ #include <paludis/util/pimp-impl.hh> #include <paludis/util/stringify.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/options.hh> #include <paludis/dep_spec.hh> @@ -42,7 +41,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - hide_specs(make_null_shared_ptr()) + hide_specs(nullptr) { } }; diff --git a/paludis/resolver/remove_if_dependent_helper.cc b/paludis/resolver/remove_if_dependent_helper.cc index c0ed425af..1dea57178 100644 --- a/paludis/resolver/remove_if_dependent_helper.cc +++ b/paludis/resolver/remove_if_dependent_helper.cc @@ -23,7 +23,6 @@ #include <paludis/resolver/resolvent.hh> #include <paludis/resolver/resolution.hh> #include <paludis/util/pimp-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/package_dep_spec_collection.hh> @@ -40,7 +39,7 @@ namespace paludis Imp(const Environment * const e) : env(e), - remove_if_dependent_specs(make_null_shared_ptr()) + remove_if_dependent_specs(nullptr) { } }; diff --git a/paludis/resolver/resolvent.cc b/paludis/resolver/resolvent.cc index 80b4ff66b..5b6d46fae 100644 --- a/paludis/resolver/resolvent.cc +++ b/paludis/resolver/resolvent.cc @@ -23,7 +23,6 @@ #include <paludis/util/make_named_values.hh> #include <paludis/util/destringify.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/dep_spec.hh> #include <paludis/filter.hh> #include <paludis/package_id.hh> @@ -133,7 +132,7 @@ Resolvent::Resolvent( slot(make_named_values<SlotNameOrNull>( n::name_or_null() = id->slot_key() ? std::make_shared<SlotName>(id->slot_key()->parse_value().parallel_value()) : - make_null_shared_ptr(), + nullptr, n::null_means_unknown() = false )) { diff --git a/paludis/resolver/sanitised_dependencies.cc b/paludis/resolver/sanitised_dependencies.cc index 8012fe403..794c206a6 100644 --- a/paludis/resolver/sanitised_dependencies.cc +++ b/paludis/resolver/sanitised_dependencies.cc @@ -388,7 +388,7 @@ namespace )); } else - return make_null_shared_ptr(); + return nullptr; } void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node) @@ -567,7 +567,7 @@ SanitisedDependency::deserialise(Deserialisation & d, const std::shared_ptr<cons return make_named_values<SanitisedDependency>( n::active_conditions_as_string() = v.member<std::string>("active_conditions_as_string"), - n::active_dependency_labels() = make_null_shared_ptr(), + n::active_dependency_labels() = nullptr, n::active_dependency_labels_as_string() = v.member<std::string>("active_dependency_labels_as_string"), n::active_dependency_labels_classifier() = v.member<std::shared_ptr<const LabelsClassifier> >("active_dependency_labels_classifier"), n::from_id() = v.member<std::shared_ptr<const PackageID> >("from_id"), diff --git a/paludis/resolver/slot_name_or_null.cc b/paludis/resolver/slot_name_or_null.cc index 6664dcd4d..8ca972c5c 100644 --- a/paludis/resolver/slot_name_or_null.cc +++ b/paludis/resolver/slot_name_or_null.cc @@ -20,7 +20,6 @@ #include <paludis/resolver/slot_name_or_null.hh> #include <paludis/util/make_named_values.hh> #include <paludis/util/hashes.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/serialise-impl.hh> #include <ostream> @@ -71,7 +70,7 @@ SlotNameOrNull::deserialise(Deserialisation & d) std::string s(v.member<std::string>("name_or_null")); return make_named_values<SlotNameOrNull>( - n::name_or_null() = s.empty() ? make_null_shared_ptr() : std::make_shared<SlotName>(s), + n::name_or_null() = s.empty() ? nullptr : std::make_shared<SlotName>(s), n::null_means_unknown() = v.member<bool>("null_means_unknown") ); } diff --git a/paludis/selection_TEST.cc b/paludis/selection_TEST.cc index 80e7492df..69687c251 100644 --- a/paludis/selection_TEST.cc +++ b/paludis/selection_TEST.cc @@ -32,7 +32,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/join.hh> #include <paludis/util/stringify.hh> @@ -62,40 +61,40 @@ TEST(Selection, Basic) env.add_repository(10, r2); PackageDepSpec d1(parse_user_package_dep_spec("r1c1/r1c1p1", &env, { })); - const std::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d1, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d1, nullptr, { }))]); EXPECT_EQ(1, std::distance(q1->begin(), q1->end())); PackageDepSpec d2(parse_user_package_dep_spec("r1c1/r1c1p2", &env, { })); - const std::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsSorted(generator::Matches(d2, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsSorted(generator::Matches(d2, nullptr, { }))]); EXPECT_EQ(2, std::distance(q2->begin(), q2->end())); PackageDepSpec d3(parse_user_package_dep_spec(">=r1c1/r1c1p2-1", &env, { })); - const std::shared_ptr<const PackageIDSequence> q3(env[selection::AllVersionsSorted(generator::Matches(d3, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q3(env[selection::AllVersionsSorted(generator::Matches(d3, nullptr, { }))]); EXPECT_EQ(2, std::distance(q3->begin(), q3->end())); PackageDepSpec d4(parse_user_package_dep_spec(">=r1c1/r1c1p2-2", &env, { })); - const std::shared_ptr<const PackageIDSequence> q4(env[selection::AllVersionsSorted(generator::Matches(d4, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q4(env[selection::AllVersionsSorted(generator::Matches(d4, nullptr, { }))]); EXPECT_EQ("r1c1/r1c1p2-2:0::repo1", join(indirect_iterator(q4->begin()), indirect_iterator(q4->end()), " ")); EXPECT_EQ(1, std::distance(q4->begin(), q4->end())); PackageDepSpec d5(parse_user_package_dep_spec(">=r1c1/r1c1p2-3", &env, { })); - const std::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(d5, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(d5, nullptr, { }))]); EXPECT_EQ(0, std::distance(q5->begin(), q5->end())); PackageDepSpec d6(parse_user_package_dep_spec("<r1c1/r1c1p2-3", &env, { })); - const std::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsSorted(generator::Matches(d6, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsSorted(generator::Matches(d6, nullptr, { }))]); EXPECT_EQ(2, std::distance(q6->begin(), q6->end())); PackageDepSpec d7(parse_user_package_dep_spec("rac1/rac1pa", &env, { })); - const std::shared_ptr<const PackageIDSequence> q7(env[selection::AllVersionsSorted(generator::Matches(d7, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q7(env[selection::AllVersionsSorted(generator::Matches(d7, nullptr, { }))]); EXPECT_EQ(4, std::distance(q7->begin(), q7->end())); PackageDepSpec d8(parse_user_package_dep_spec("foo/bar", &env, { })); - const std::shared_ptr<const PackageIDSequence> q8(env[selection::AllVersionsSorted(generator::Matches(d8, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q8(env[selection::AllVersionsSorted(generator::Matches(d8, nullptr, { }))]); EXPECT_EQ(0, std::distance(q8->begin(), q8->end())); PackageDepSpec d9(parse_user_package_dep_spec("r1c1/r1c1p1", &env, { })); - const std::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsSorted(generator::Matches(d9, make_null_shared_ptr(), { }) + const std::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsSorted(generator::Matches(d9, nullptr, { }) | filter::SupportsAction<InstallAction>())]); EXPECT_EQ(1, std::distance(q9->begin(), q9->end())); } @@ -122,18 +121,18 @@ TEST(Selection, Fiddly) PackageDepSpec d(parse_user_package_dep_spec("cat/pkg", &env, { })); - const std::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d, nullptr, { }))]); EXPECT_EQ("cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-2:c::repo1 cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1", join(indirect_iterator(q1->begin()), indirect_iterator(q1->end()), " ")); - const std::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsGroupedBySlot(generator::Matches(d, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsGroupedBySlot(generator::Matches(d, nullptr, { }))]); EXPECT_EQ("cat/pkg-3:b::repo2 cat/pkg-2:c::repo1 cat/pkg-3:c::repo1 cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-4:a::repo1", join(indirect_iterator(q2->begin()), indirect_iterator(q2->end()), " ")); - const std::shared_ptr<const PackageIDSequence> q3(env[selection::BestVersionOnly(generator::Matches(d, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q3(env[selection::BestVersionOnly(generator::Matches(d, nullptr, { }))]); EXPECT_EQ("cat/pkg-4:a::repo1", join(indirect_iterator(q3->begin()), indirect_iterator(q3->end()), " ")); - const std::shared_ptr<const PackageIDSequence> q4(env[selection::BestVersionInEachSlot(generator::Matches(d, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q4(env[selection::BestVersionInEachSlot(generator::Matches(d, nullptr, { }))]); EXPECT_EQ("cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1", join(indirect_iterator(q4->begin()), indirect_iterator(q4->end()), " ")); @@ -145,31 +144,31 @@ TEST(Selection, Fiddly) PackageDepSpec c(parse_user_package_dep_spec("cat/*", &env, { updso_allow_wildcards })); - const std::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(c, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(c, nullptr, { }))]); EXPECT_EQ("cat/other-1:a::repo3 cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-2:c::repo1 " "cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1", join(indirect_iterator(q5->begin()), indirect_iterator(q5->end()), " ")); - const std::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsGroupedBySlot(generator::Matches(c, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsGroupedBySlot(generator::Matches(c, nullptr, { }))]); EXPECT_EQ("cat/other-1:a::repo3 cat/pkg-3:b::repo2 cat/pkg-2:c::repo1 cat/pkg-3:c::repo1 " "cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-4:a::repo1", join(indirect_iterator(q6->begin()), indirect_iterator(q6->end()), " ")); - const std::shared_ptr<const PackageIDSequence> q7(env[selection::BestVersionOnly(generator::Matches(c, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q7(env[selection::BestVersionOnly(generator::Matches(c, nullptr, { }))]); EXPECT_EQ("cat/other-1:a::repo3 cat/pkg-4:a::repo1", join(indirect_iterator(q7->begin()), indirect_iterator(q7->end()), " ")); - const std::shared_ptr<const PackageIDSequence> q8(env[selection::BestVersionInEachSlot(generator::Matches(c, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q8(env[selection::BestVersionInEachSlot(generator::Matches(c, nullptr, { }))]); EXPECT_EQ("cat/other-1:a::repo3 cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1", join(indirect_iterator(q8->begin()), indirect_iterator(q8->end()), " ")); PackageDepSpec b(parse_user_package_dep_spec("cat/pkg:a", &env, { })); - const std::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsGroupedBySlot(generator::Matches(b, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsGroupedBySlot(generator::Matches(b, nullptr, { }))]); EXPECT_EQ("cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-4:a::repo1", join(indirect_iterator(q9->begin()), indirect_iterator(q9->end()), " ")); PackageDepSpec a(parse_user_package_dep_spec("cat/pkg[=1|=3]", &env, { })); - const std::shared_ptr<const PackageIDSequence> q10(env[selection::AllVersionsGroupedBySlot(generator::Matches(a, make_null_shared_ptr(), { }))]); + const std::shared_ptr<const PackageIDSequence> q10(env[selection::AllVersionsGroupedBySlot(generator::Matches(a, nullptr, { }))]); EXPECT_EQ("cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-3:b::repo2 cat/pkg-3:c::repo1", join(indirect_iterator(q10->begin()), indirect_iterator(q10->end()), " ")); } diff --git a/paludis/serialise-impl.hh b/paludis/serialise-impl.hh index 343679b0c..1ba2a5b19 100644 --- a/paludis/serialise-impl.hh +++ b/paludis/serialise-impl.hh @@ -25,7 +25,6 @@ #include <paludis/util/destringify.hh> #include <paludis/util/options.hh> #include <paludis/util/tokeniser.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/package_id-fwd.hh> #include <paludis/dep_spec-fwd.hh> #include <type_traits> @@ -253,7 +252,7 @@ namespace paludis static std::shared_ptr<T_> handle(Deserialisation & v) { if (v.null()) - return make_null_shared_ptr(); + return nullptr; else return T_::deserialise(v); } diff --git a/paludis/serialise.cc b/paludis/serialise.cc index 75657bacb..0016e995d 100644 --- a/paludis/serialise.cc +++ b/paludis/serialise.cc @@ -366,7 +366,7 @@ DeserialisatorHandler<std::shared_ptr<const PackageID> >::handle(Deserialisation Context context("When deserialising:"); if (v.null()) - return make_null_shared_ptr(); + return nullptr; return *(*v.deserialiser().environment())[ selection::RequireExactlyOne(generator::Matches( @@ -378,7 +378,7 @@ DeserialisatorHandler<std::shared_ptr<const PackageID> >::handle(Deserialisation epdso_allow_slot_deps, epdso_allow_key_requirements, epdso_allow_use_dep_question_defaults, epdso_allow_subslot_deps }, { vso_flexible_dashes, vso_flexible_dots, vso_ignore_case, - vso_letters_anywhere, vso_dotted_suffixes }), make_null_shared_ptr(), { }))]->begin(); + vso_letters_anywhere, vso_dotted_suffixes }), nullptr, { }))]->begin(); } namespace paludis diff --git a/paludis/set_file.cc b/paludis/set_file.cc index 4c40669e1..721080204 100644 --- a/paludis/set_file.cc +++ b/paludis/set_file.cc @@ -28,7 +28,6 @@ #include <paludis/util/system.hh> #include <paludis/util/safe_ofstream.hh> #include <paludis/util/process.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/env_var_names.hh> #include <paludis/environment.hh> @@ -271,7 +270,7 @@ namespace make_package_dep_spec({ }) .package(*spec->package_ptr()) .slot_requirement(spec->slot_requirement_ptr()), - make_null_shared_ptr(), { }) | + nullptr, { }) | filter::InstalledAtRoot(params.environment()->preferred_root_key()->parse_value()))]->empty()) result->top()->append(spec); } diff --git a/paludis/tar_merger_TEST.cc b/paludis/tar_merger_TEST.cc index 349daa7a0..2312bd509 100644 --- a/paludis/tar_merger_TEST.cc +++ b/paludis/tar_merger_TEST.cc @@ -29,7 +29,6 @@ #include <paludis/util/set.hh> #include <paludis/util/process.hh> #include <paludis/util/stringify.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/util/return_literal_function.hh> @@ -97,7 +96,7 @@ TEST(TarMerger, Works) n::get_new_ids_or_minus_one() = &get_new_ids_or_minus_one, n::image() = FSPath("tar_merger_TEST_dir") / "simple", n::install_under() = FSPath("/"), - n::maybe_output_manager() = make_null_shared_ptr(), + n::maybe_output_manager() = nullptr, n::merged_entries() = std::make_shared<FSPathSet>(), n::no_chown() = true, n::options() = MergerOptions() + mo_rewrite_symlinks, @@ -152,7 +151,7 @@ TEST(TarMerger, NotAvailable) n::get_new_ids_or_minus_one() = &get_new_ids_or_minus_one, n::image() = FSPath("tar_merger_TEST_dir") / "simple", n::install_under() = FSPath("/"), - n::maybe_output_manager() = make_null_shared_ptr(), + n::maybe_output_manager() = nullptr, n::merged_entries() = std::make_shared<FSPathSet>(), n::no_chown() = true, n::options() = MergerOptions(), diff --git a/paludis/tee_output_manager.cc b/paludis/tee_output_manager.cc index 8458968a0..21bf20e30 100644 --- a/paludis/tee_output_manager.cc +++ b/paludis/tee_output_manager.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009, 2010, 2011 Ciaran McCreesh + * Copyright (c) 2009, 2010, 2011, 2013 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -25,7 +25,6 @@ #include <paludis/util/wrapped_forward_iterator.hh> #include <paludis/util/tokeniser.hh> #include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <vector> #include <algorithm> @@ -61,7 +60,7 @@ namespace paludis TeeOutputManager::TeeOutputManager( const std::shared_ptr<const OutputManagerSequence> & s, const std::shared_ptr<const OutputManagerSequence> & ss) : - _imp(s, ss, make_null_shared_ptr(), make_null_shared_ptr()) + _imp(s, ss, nullptr, nullptr) { for (OutputManagerSequence::ConstIterator i(_imp->streams->begin()), i_end(_imp->streams->end()) ; i != i_end ; ++i) diff --git a/paludis/unmerger.cc b/paludis/unmerger.cc index e94bb4bf1..54b51caed 100644 --- a/paludis/unmerger.cc +++ b/paludis/unmerger.cc @@ -22,7 +22,6 @@ #include <paludis/environment.hh> #include <paludis/hook.hh> #include <paludis/util/pimp-impl.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/fs_stat.hh> #include <paludis/contents.hh> #include <paludis/metadata_key.hh> diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc index 245023ce1..8b71528cf 100644 --- a/paludis/user_dep_spec.cc +++ b/paludis/user_dep_spec.cc @@ -45,7 +45,6 @@ #include <paludis/util/destringify.hh> #include <paludis/util/accept_visitor.hh> #include <paludis/util/tribool.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/join.hh> #include <algorithm> @@ -84,7 +83,7 @@ namespace if (options[updso_no_disambiguation]) throw PackageDepSpecError("Need an explicit category specified"); result.package(env->fetch_unique_qualified_package_name(PackageNamePart(s), - filter::And(filter, filter::Matches(result, make_null_shared_ptr(), { })))); + filter::And(filter, filter::Matches(result, nullptr, { })))); } } @@ -230,7 +229,7 @@ namespace default: { - std::shared_ptr<const AdditionalPackageDepSpecRequirement> req(parse_elike_use_requirement(flag, { }, make_null_shared_ptr())); + std::shared_ptr<const AdditionalPackageDepSpecRequirement> req(parse_elike_use_requirement(flag, { }, nullptr)); result.additional_requirement(req); } break; @@ -417,7 +416,7 @@ UserSlotExactFullRequirement::as_string() const const std::shared_ptr<const SlotRequirement> UserSlotExactFullRequirement::maybe_original_requirement_if_rewritten() const { - return make_null_shared_ptr(); + return nullptr; } UserSlotExactPartialRequirement::UserSlotExactPartialRequirement(const SlotName & s) : @@ -439,7 +438,7 @@ UserSlotExactPartialRequirement::as_string() const const std::shared_ptr<const SlotRequirement> UserSlotExactPartialRequirement::maybe_original_requirement_if_rewritten() const { - return make_null_shared_ptr(); + return nullptr; } GotASetNotAPackageDepSpec::GotASetNotAPackageDepSpec(const std::string & s) throw () : diff --git a/paludis/user_dep_spec_TEST.cc b/paludis/user_dep_spec_TEST.cc index 7b3cc6352..b3bebabc8 100644 --- a/paludis/user_dep_spec_TEST.cc +++ b/paludis/user_dep_spec_TEST.cc @@ -29,7 +29,6 @@ #include <paludis/util/options.hh> #include <paludis/util/indirect_iterator-impl.hh> #include <paludis/util/make_named_values.hh> -#include <paludis/util/make_null_shared_ptr.hh> #include <paludis/util/stringify.hh> #include <paludis/util/join.hh> @@ -422,89 +421,89 @@ TEST_F(UserDepSpecTest, Keys) pkg3->keywords_key()->set_from_string("~d"); PackageDepSpec a(parse_user_package_dep_spec("cat/pkg1[.KEYWORDS<~a]", &env, { })); - EXPECT_TRUE(match_package(env, a, pkg1, make_null_shared_ptr(), { })); - EXPECT_TRUE(match_package(env, a, pkg2, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, a, pkg3, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, a, pkg1, nullptr, { })); + EXPECT_TRUE(match_package(env, a, pkg2, nullptr, { })); + EXPECT_TRUE(! match_package(env, a, pkg3, nullptr, { })); PackageDepSpec b(parse_user_package_dep_spec("cat/pkg1[.KEYWORDS<~b]", &env, { })); - EXPECT_TRUE(match_package(env, b, pkg1, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, b, pkg2, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, b, pkg3, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, b, pkg1, nullptr, { })); + EXPECT_TRUE(! match_package(env, b, pkg2, nullptr, { })); + EXPECT_TRUE(! match_package(env, b, pkg3, nullptr, { })); PackageDepSpec c(parse_user_package_dep_spec("cat/pkg1[.KEYWORDS<~c]", &env, { })); - EXPECT_TRUE(! match_package(env, c, pkg1, make_null_shared_ptr(), { })); - EXPECT_TRUE(match_package(env, c, pkg2, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, c, pkg3, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, c, pkg1, nullptr, { })); + EXPECT_TRUE(match_package(env, c, pkg2, nullptr, { })); + EXPECT_TRUE(! match_package(env, c, pkg3, nullptr, { })); PackageDepSpec d(parse_user_package_dep_spec("cat/pkg1[.KEYWORDS>~a]", &env, { })); - EXPECT_TRUE(! match_package(env, d, pkg1, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, d, pkg2, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, d, pkg3, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, d, pkg1, nullptr, { })); + EXPECT_TRUE(! match_package(env, d, pkg2, nullptr, { })); + EXPECT_TRUE(! match_package(env, d, pkg3, nullptr, { })); PackageDepSpec e(parse_user_package_dep_spec("cat/pkg1[.KEYWORDS=~d]", &env, { })); - EXPECT_TRUE(! match_package(env, e, pkg1, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, e, pkg2, make_null_shared_ptr(), { })); - EXPECT_TRUE(match_package(env, e, pkg3, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, e, pkg1, nullptr, { })); + EXPECT_TRUE(! match_package(env, e, pkg2, nullptr, { })); + EXPECT_TRUE(match_package(env, e, pkg3, nullptr, { })); PackageDepSpec f(parse_user_package_dep_spec("cat/pkg1[.KEYWORDS=~a ~c]", &env, { })); - EXPECT_TRUE(! match_package(env, f, pkg1, make_null_shared_ptr(), { })); - EXPECT_TRUE(match_package(env, f, pkg2, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, f, pkg3, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, f, pkg1, nullptr, { })); + EXPECT_TRUE(match_package(env, f, pkg2, nullptr, { })); + EXPECT_TRUE(! match_package(env, f, pkg3, nullptr, { })); PackageDepSpec g(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER=42]", &env, { })); - EXPECT_TRUE(match_package(env, g, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, g, pkg1, nullptr, { })); PackageDepSpec h(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER<41]", &env, { })); - EXPECT_TRUE(! match_package(env, h, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, h, pkg1, nullptr, { })); PackageDepSpec i(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER<42]", &env, { })); - EXPECT_TRUE(! match_package(env, i, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, i, pkg1, nullptr, { })); PackageDepSpec j(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER<43]", &env, { })); - EXPECT_TRUE(match_package(env, j, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, j, pkg1, nullptr, { })); PackageDepSpec k(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER>42]", &env, { })); - EXPECT_TRUE(! match_package(env, k, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, k, pkg1, nullptr, { })); PackageDepSpec l(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER>41]", &env, { })); - EXPECT_TRUE(match_package(env, l, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, l, pkg1, nullptr, { })); PackageDepSpec m(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER?]", &env, { })); - EXPECT_TRUE(match_package(env, m, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, m, pkg1, nullptr, { })); PackageDepSpec n(parse_user_package_dep_spec("cat/pkg1[.SPOON?]", &env, { })); - EXPECT_TRUE(! match_package(env, n, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, n, pkg1, nullptr, { })); PackageDepSpec o(parse_user_package_dep_spec("cat/pkg1[.$keywords<~a]", &env, { })); - EXPECT_TRUE(match_package(env, o, pkg1, make_null_shared_ptr(), { })); - EXPECT_TRUE(match_package(env, o, pkg2, make_null_shared_ptr(), { })); - EXPECT_TRUE(! match_package(env, o, pkg3, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, o, pkg1, nullptr, { })); + EXPECT_TRUE(match_package(env, o, pkg2, nullptr, { })); + EXPECT_TRUE(! match_package(env, o, pkg3, nullptr, { })); PackageDepSpec p(parse_user_package_dep_spec("cat/pkg1[.::$format=fake]", &env, { })); - EXPECT_TRUE(match_package(env, p, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, p, pkg1, nullptr, { })); PackageDepSpec q(parse_user_package_dep_spec("cat/pkg1[.::$format=e]", &env, { })); - EXPECT_TRUE(! match_package(env, q, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, q, pkg1, nullptr, { })); PackageDepSpec r(parse_user_package_dep_spec("cat/pkg1[.::format=fake]", &env, { })); - EXPECT_TRUE(match_package(env, r, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, r, pkg1, nullptr, { })); PackageDepSpec s(parse_user_package_dep_spec("cat/pkg1[.::format=e]", &env, { })); - EXPECT_TRUE(! match_package(env, s, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, s, pkg1, nullptr, { })); PackageDepSpec t(parse_user_package_dep_spec("cat/pkg1[.HITCHHIKER!=42]", &env, { })); - EXPECT_TRUE(! match_package(env, t, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, t, pkg1, nullptr, { })); PackageDepSpec u(parse_user_package_dep_spec("cat/pkg1[.::$format!=fake]", &env, { })); - EXPECT_TRUE(! match_package(env, u, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, u, pkg1, nullptr, { })); PackageDepSpec v(parse_user_package_dep_spec("cat/pkg1[.::$format!=e]", &env, { })); - EXPECT_TRUE(match_package(env, v, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, v, pkg1, nullptr, { })); PackageDepSpec w(parse_user_package_dep_spec("cat/pkg1[.::format!=fake]", &env, { })); - EXPECT_TRUE(! match_package(env, w, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(! match_package(env, w, pkg1, nullptr, { })); PackageDepSpec x(parse_user_package_dep_spec("cat/pkg1[.::format!=e]", &env, { })); - EXPECT_TRUE(match_package(env, x, pkg1, make_null_shared_ptr(), { })); + EXPECT_TRUE(match_package(env, x, pkg1, nullptr, { })); } diff --git a/paludis/util/files.m4 b/paludis/util/files.m4 index 7636efab7..93fc959e0 100644 --- a/paludis/util/files.m4 +++ b/paludis/util/files.m4 @@ -48,7 +48,6 @@ add(`is_file_with_extension', `hh', `cc', `se', `gtest', `testscript' add(`join', `hh', `gtest') add(`log', `hh', `cc', `se', `gtest') add(`make_named_values', `hh', `cc') -add(`make_null_shared_ptr', `hh') add(`make_shared_copy', `hh', `fwd') add(`map', `hh', `fwd', `impl', `cc') add(`member_iterator', `hh', `fwd', `impl', `gtest') diff --git a/paludis/util/make_null_shared_ptr.hh b/paludis/util/make_null_shared_ptr.hh deleted file mode 100644 index 995b84316..000000000 --- a/paludis/util/make_null_shared_ptr.hh +++ /dev/null @@ -1,61 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2007, 2008, 2010 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef PALUDIS_GUARD_PALUDIS_UTIL_MAKE_NULL_SHARED_PTR_HH -#define PALUDIS_GUARD_PALUDIS_UTIL_MAKE_NULL_SHARED_PTR_HH 1 - -#include <memory> -#include <paludis/util/attributes.hh> - -/** \file - * Declarations for the make_null_shared_ptr function. - * - * \ingroup g_utils - * - * \section Examples - * - * - None at this time. - */ - -namespace paludis -{ - /** - * An object that can convert itself into an empty std::shared_ptr<> - * of any type. - * - * \see make_null_shared_ptr() - * \since 0.32 - * \ingroup g_utils - */ - struct PALUDIS_VISIBLE NullSharedPtr - { - template <typename T_> - inline operator std::shared_ptr<T_> () const - { - return std::shared_ptr<T_>(); - } - }; - - inline NullSharedPtr make_null_shared_ptr() - { - return NullSharedPtr(); - } -} - -#endif |