aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/paludis
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-16 20:18:39 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-22 23:19:27 +0100
commit0174215ed434594d9288e38575a3aa41e2b10842 (patch)
tree6037c4c58a100e5a0cbca30ac7f3d911d8d57032 /paludis/environments/paludis
parent78d9a9bf0758140e0e8c03c5e8d3288f74efbb51 (diff)
downloadpaludis-0174215ed434594d9288e38575a3aa41e2b10842.tar.gz
paludis-0174215ed434594d9288e38575a3aa41e2b10842.tar.xz
Use nullptr
Diffstat (limited to 'paludis/environments/paludis')
-rw-r--r--paludis/environments/paludis/keywords_conf.cc7
-rw-r--r--paludis/environments/paludis/licenses_conf.cc7
-rw-r--r--paludis/environments/paludis/output_conf.cc5
-rw-r--r--paludis/environments/paludis/package_mask_conf.cc5
-rw-r--r--paludis/environments/paludis/paludis_environment_TEST.cc15
-rw-r--r--paludis/environments/paludis/suggestions_conf.cc7
6 files changed, 20 insertions, 26 deletions
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()) ;