aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e')
-rw-r--r--paludis/repositories/e/dep_parser.cc55
-rw-r--r--paludis/repositories/e/depend_rdepend_TEST.cc5
-rw-r--r--paludis/repositories/e/dependencies_rewriter.cc7
-rw-r--r--paludis/repositories/e/e_choices_key.cc1
-rw-r--r--paludis/repositories/e/e_installed_repository.cc15
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc34
-rw-r--r--paludis/repositories/e/e_key.cc13
-rw-r--r--paludis/repositories/e/e_repository.cc34
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc7
-rw-r--r--paludis/repositories/e/e_repository_TEST_0.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_1.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_2.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_3.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc3
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_exheres_0.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_pbin.cc7
-rw-r--r--paludis/repositories/e/e_repository_TEST_phases.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST_replacing.cc3
-rw-r--r--paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc5
-rw-r--r--paludis/repositories/e/e_repository_sets.cc4
-rw-r--r--paludis/repositories/e/eapi.cc53
-rw-r--r--paludis/repositories/e/eapi_phase.cc5
-rw-r--r--paludis/repositories/e/ebuild_id.cc114
-rw-r--r--paludis/repositories/e/exheres_layout.cc6
-rw-r--r--paludis/repositories/e/exheres_profile.cc8
-rw-r--r--paludis/repositories/e/exndbam_id.cc5
-rw-r--r--paludis/repositories/e/exndbam_repository.cc6
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc3
-rw-r--r--paludis/repositories/e/extra_distribution_data.cc5
-rw-r--r--paludis/repositories/e/fetch_visitor.cc3
-rw-r--r--paludis/repositories/e/fetch_visitor_TEST.cc5
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc7
-rw-r--r--paludis/repositories/e/metadata_xml.cc1
-rw-r--r--paludis/repositories/e/myoptions_requirements_verifier.cc4
-rw-r--r--paludis/repositories/e/pretend_fetch_visitor.cc3
-rw-r--r--paludis/repositories/e/traditional_layout.cc6
-rw-r--r--paludis/repositories/e/traditional_profile.cc7
-rw-r--r--paludis/repositories/e/vdb_id.cc7
-rw-r--r--paludis/repositories/e/vdb_merger_TEST.cc5
-rw-r--r--paludis/repositories/e/vdb_repository.cc16
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc9
-rw-r--r--paludis/repositories/e/vdb_unmerger_TEST.cc3
-rw-r--r--paludis/repositories/e/xml_things.cc7
46 files changed, 246 insertions, 280 deletions
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index ae72788f8..70f8dbcb1 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -20,7 +20,6 @@
#include <paludis/repositories/e/dep_parser.hh>
#include <paludis/repositories/e/eapi.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/options.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/make_named_values.hh>
@@ -323,7 +322,7 @@ paludis::erepository::parse_depend(const std::string & s,
ParseStackTypes<DependencySpecTree>::Stack stack;
std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
std::shared_ptr<DepSpec> thing_to_annotate(spec);
- std::shared_ptr<DependencySpecTree> top(make_shared_ptr(new DependencySpecTree(spec)));
+ std::shared_ptr<DependencySpecTree> top(std::make_shared<DependencySpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<DependencySpecTree>::Item>(
n::item() = top->root(),
n::spec() = spec
@@ -366,7 +365,7 @@ paludis::erepository::parse_provide(const std::string & s,
ParseStackTypes<ProvideSpecTree>::Stack stack;
std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
std::shared_ptr<DepSpec> thing_to_annotate(spec);
- std::shared_ptr<ProvideSpecTree> top(make_shared_ptr(new ProvideSpecTree(spec)));
+ std::shared_ptr<ProvideSpecTree> top(std::make_shared<ProvideSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<ProvideSpecTree>::Item>(
n::item() = top->root(),
n::spec() = spec
@@ -405,7 +404,7 @@ paludis::erepository::parse_fetchable_uri(const std::string & s,
ParseStackTypes<FetchableURISpecTree>::Stack stack;
std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
std::shared_ptr<DepSpec> thing_to_annotate(spec);
- std::shared_ptr<FetchableURISpecTree> top(make_shared_ptr(new FetchableURISpecTree(spec)));
+ std::shared_ptr<FetchableURISpecTree> top(std::make_shared<FetchableURISpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<FetchableURISpecTree>::Item>(
n::item() = top->root(),
n::spec() = spec
@@ -448,7 +447,7 @@ paludis::erepository::parse_simple_uri(const std::string & s,
ParseStackTypes<SimpleURISpecTree>::Stack stack;
std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
std::shared_ptr<DepSpec> thing_to_annotate(spec);
- std::shared_ptr<SimpleURISpecTree> top(make_shared_ptr(new SimpleURISpecTree(spec)));
+ std::shared_ptr<SimpleURISpecTree> top(std::make_shared<SimpleURISpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<SimpleURISpecTree>::Item>(
n::item() = top->root(),
n::spec() = spec
@@ -487,7 +486,7 @@ paludis::erepository::parse_license(const std::string & s,
ParseStackTypes<LicenseSpecTree>::Stack stack;
std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
std::shared_ptr<DepSpec> thing_to_annotate(spec);
- std::shared_ptr<LicenseSpecTree> top(make_shared_ptr(new LicenseSpecTree(spec)));
+ std::shared_ptr<LicenseSpecTree> top(std::make_shared<LicenseSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<LicenseSpecTree>::Item>(
n::item() = top->root(),
n::spec() = spec
@@ -526,7 +525,7 @@ paludis::erepository::parse_plain_text(const std::string & s,
ParseStackTypes<PlainTextSpecTree>::Stack stack;
std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
std::shared_ptr<DepSpec> thing_to_annotate(spec);
- std::shared_ptr<PlainTextSpecTree> top(make_shared_ptr(new PlainTextSpecTree(spec)));
+ std::shared_ptr<PlainTextSpecTree> top(std::make_shared<PlainTextSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<PlainTextSpecTree>::Item>(
n::item() = top->root(),
n::spec() = spec
@@ -565,7 +564,7 @@ paludis::erepository::parse_myoptions(const std::string & s,
ParseStackTypes<PlainTextSpecTree>::Stack stack;
std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
std::shared_ptr<DepSpec> thing_to_annotate(spec);
- std::shared_ptr<PlainTextSpecTree> top(make_shared_ptr(new PlainTextSpecTree(spec)));
+ std::shared_ptr<PlainTextSpecTree> top(std::make_shared<PlainTextSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<PlainTextSpecTree>::Item>(
n::item() = top->root(),
n::spec() = spec
@@ -612,17 +611,17 @@ paludis::erepository::parse_uri_label(const std::string & s, const EAPI & e)
std::shared_ptr<URILabelsDepSpec> l(new URILabelsDepSpec);
if (c == "URIMirrorsThenListedLabel")
- l->add_label(make_shared_ptr(new URIMirrorsThenListedLabel(s.substr(0, s.length() - 1))));
+ l->add_label(std::make_shared<URIMirrorsThenListedLabel>(s.substr(0, s.length() - 1)));
else if (c == "URIMirrorsOnlyLabel")
- l->add_label(make_shared_ptr(new URIMirrorsOnlyLabel(s.substr(0, s.length() - 1))));
+ l->add_label(std::make_shared<URIMirrorsOnlyLabel>(s.substr(0, s.length() - 1)));
else if (c == "URIListedOnlyLabel")
- l->add_label(make_shared_ptr(new URIListedOnlyLabel(s.substr(0, s.length() - 1))));
+ l->add_label(std::make_shared<URIListedOnlyLabel>(s.substr(0, s.length() - 1)));
else if (c == "URIListedThenMirrorsLabel")
- l->add_label(make_shared_ptr(new URIListedThenMirrorsLabel(s.substr(0, s.length() - 1))));
+ l->add_label(std::make_shared<URIListedThenMirrorsLabel>(s.substr(0, s.length() - 1)));
else if (c == "URILocalMirrorsOnlyLabel")
- l->add_label(make_shared_ptr(new URILocalMirrorsOnlyLabel(s.substr(0, s.length() - 1))));
+ l->add_label(std::make_shared<URILocalMirrorsOnlyLabel>(s.substr(0, s.length() - 1)));
else if (c == "URIManualOnlyLabel")
- l->add_label(make_shared_ptr(new URIManualOnlyLabel(s.substr(0, s.length() - 1))));
+ l->add_label(std::make_shared<URIManualOnlyLabel>(s.substr(0, s.length() - 1)));
else
throw EDepParseError(s, "Label '" + s + "' maps to unknown class '" + c + "'");
@@ -641,7 +640,7 @@ paludis::erepository::parse_plain_text_label(const std::string & s)
if (c.empty())
throw EDepParseError(s, "Unknown label");
- return make_shared_ptr(new PlainTextLabelDepSpec(s));
+ return std::make_shared<PlainTextLabelDepSpec>(s);
}
namespace
@@ -697,7 +696,7 @@ paludis::erepository::parse_dependency_label(
{
Log::get_instance()->message("e.dep_parser.obsolete_label_syntax", ll_warning, lc_context)
<< "Label '" << *it << "' uses commas, which are obsolete, so treating it as a build label instead";
- l->add_label(make_shared_ptr(new DependenciesBuildLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesBuildLabel>(*it, return_literal_function(true)));
continue;
}
@@ -713,34 +712,34 @@ paludis::erepository::parse_dependency_label(
}
if (c == "DependenciesBuildLabel")
- l->add_label(make_shared_ptr(new DependenciesBuildLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesBuildLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesRunLabel")
- l->add_label(make_shared_ptr(new DependenciesRunLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesRunLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesPostLabel")
- l->add_label(make_shared_ptr(new DependenciesPostLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesPostLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesInstallLabel")
- l->add_label(make_shared_ptr(new DependenciesInstallLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesInstallLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesCompileAgainstLabel")
- l->add_label(make_shared_ptr(new DependenciesCompileAgainstLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesCompileAgainstLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesFetchLabel")
- l->add_label(make_shared_ptr(new DependenciesFetchLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesFetchLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesSuggestionLabel")
- l->add_label(make_shared_ptr(new DependenciesSuggestionLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesSuggestionLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesRecommendationLabel")
- l->add_label(make_shared_ptr(new DependenciesRecommendationLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesRecommendationLabel>(*it, return_literal_function(true)));
else if (c == "DependenciesTestLabel")
{
if (cc.empty())
- l->add_label(make_shared_ptr(new DependenciesTestLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesTestLabel>(*it, return_literal_function(true)));
else
- l->add_label(make_shared_ptr(new DependenciesTestLabel(*it, std::bind(
- &enabled_if_option, id, *it, ChoiceNameWithPrefix(cc)))));
+ l->add_label(std::make_shared<DependenciesTestLabel>(*it, std::bind(
+ &enabled_if_option, id, *it, ChoiceNameWithPrefix(cc))));
}
else if (c == "WarnAndIgnore")
{
Log::get_instance()->message("e.dep_parser.obsolete_label", ll_warning, lc_context)
<< "Label '" << *it << "' no longer exists, pretending it's a build label instead";
- l->add_label(make_shared_ptr(new DependenciesBuildLabel(*it, return_literal_function(true))));
+ l->add_label(std::make_shared<DependenciesBuildLabel>(*it, return_literal_function(true)));
}
else
throw EDepParseError(s, "Label '" + *it + "' maps to unknown class '" + c + "'");
diff --git a/paludis/repositories/e/depend_rdepend_TEST.cc b/paludis/repositories/e/depend_rdepend_TEST.cc
index 7755df513..d63e6d970 100644
--- a/paludis/repositories/e/depend_rdepend_TEST.cc
+++ b/paludis/repositories/e/depend_rdepend_TEST.cc
@@ -21,7 +21,6 @@
#include <paludis/repositories/e/vdb_repository.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/sequence.hh>
@@ -52,7 +51,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -150,7 +149,7 @@ namespace
n::destination() = v_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/dependencies_rewriter.cc b/paludis/repositories/e/dependencies_rewriter.cc
index bdec731fd..5c5329f41 100644
--- a/paludis/repositories/e/dependencies_rewriter.cc
+++ b/paludis/repositories/e/dependencies_rewriter.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 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
@@ -20,7 +20,6 @@
#include <paludis/repositories/e/dependencies_rewriter.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/return_literal_function.hh>
#include <paludis/util/save.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -75,8 +74,8 @@ namespace paludis
Implementation() :
default_labels(new DependenciesLabelSequence)
{
- default_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build", return_literal_function(true))));
- default_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run", return_literal_function(true))));
+ default_labels->push_back(std::make_shared<DependenciesBuildLabel>("build", return_literal_function(true)));
+ default_labels->push_back(std::make_shared<DependenciesRunLabel>("run", return_literal_function(true)));
labels.push_front(default_labels);
}
};
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 834351950..bde164d76 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -32,7 +32,6 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/join.hh>
#include <paludis/util/simple_visitor_cast.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/member_iterator-impl.hh>
#include <paludis/util/map-impl.hh>
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 64c9035df..df915b732 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -30,7 +30,6 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/log.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/system.hh>
#include <paludis/util/map.hh>
@@ -177,7 +176,7 @@ EInstalledRepository::is_unimportant() const
std::shared_ptr<const CategoryNamePartSet>
EInstalledRepository::unimportant_category_names() const
{
- std::shared_ptr<CategoryNamePartSet> result(make_shared_ptr(new CategoryNamePartSet));
+ std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
return result;
}
@@ -251,7 +250,7 @@ EInstalledRepository::perform_config(
n::ebuild_file() = ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"),
n::eclassdirs() = eclassdirs,
n::environment() = _imp->params.environment(),
- n::exlibsdirs() = make_shared_ptr(new FSEntrySequence),
+ n::exlibsdirs() = std::make_shared<FSEntrySequence>(),
n::files_dir() = ver_dir,
n::maybe_output_manager() = output_manager,
n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-config"),
@@ -360,7 +359,7 @@ EInstalledRepository::perform_info(
n::ebuild_file() = ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"),
n::eclassdirs() = eclassdirs,
n::environment() = _imp->params.environment(),
- n::exlibsdirs() = make_shared_ptr(new FSEntrySequence),
+ n::exlibsdirs() = std::make_shared<FSEntrySequence>(),
n::files_dir() = ver_dir,
n::maybe_output_manager() = output_manager,
n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info"),
@@ -373,11 +372,11 @@ EInstalledRepository::perform_info(
),
make_named_values<EbuildInfoCommandParams>(
- n::expand_vars() = make_shared_ptr(new Map<std::string, std::string>),
- n::info_vars() = i ? i : make_shared_ptr(new const Set<std::string>),
+ n::expand_vars() = std::make_shared<Map<std::string, std::string> >(),
+ n::info_vars() = i ? i : std::make_shared<const Set<std::string> >(),
n::load_environment() = load_env.get(),
- n::profiles() = make_shared_ptr(new FSEntrySequence),
- n::profiles_with_parents() = make_shared_ptr(new FSEntrySequence),
+ n::profiles() = std::make_shared<FSEntrySequence>(),
+ n::profiles_with_parents() = std::make_shared<FSEntrySequence>(),
n::use() = "",
n::use_ebuild_file() = false,
n::use_expand() = "",
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index ba1db6d54..28b114282 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -39,11 +39,11 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/mutex.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#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/output_manager.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/user_dep_spec.hh>
@@ -144,17 +144,17 @@ namespace paludis
run_dependencies_labels(new DependenciesLabelSequence),
post_dependencies_labels(new DependenciesLabelSequence)
{
- raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build",
- return_literal_function(true))));
- raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run",
- return_literal_function(true))));
-
- build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("DEPEND",
- return_literal_function(true))));
- run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("RDEPEND",
- return_literal_function(true))));
- post_dependencies_labels->push_back(make_shared_ptr(new DependenciesPostLabel("PDEPEND",
- return_literal_function(true))));
+ raw_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build",
+ return_literal_function(true)));
+ raw_dependencies_labels->push_back(std::make_shared<DependenciesRunLabel>("run",
+ return_literal_function(true)));
+
+ build_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("DEPEND",
+ return_literal_function(true)));
+ run_dependencies_labels->push_back(std::make_shared<DependenciesRunLabel>("RDEPEND",
+ return_literal_function(true)));
+ post_dependencies_labels->push_back(std::make_shared<DependenciesPostLabel>("PDEPEND",
+ return_literal_function(true)));
}
};
}
@@ -192,7 +192,7 @@ EInstalledRepositoryID::need_keys_added() const
Context context("When loading ID keys from '" + stringify(_imp->dir) + "':");
- add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("EAPI", "EAPI", mkt_internal, eapi()->name())));
+ add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("EAPI", "EAPI", mkt_internal, eapi()->name()));
if (! eapi()->supported())
{
@@ -1028,8 +1028,8 @@ EInstalledRepositoryID::make_choice_value(const std::shared_ptr<const Choice> &
if (raw_use_key())
enabled = (raw_use_key()->value()->end() != raw_use_key()->value()->find(name_with_prefix));
- return make_shared_ptr(new EChoiceValue(c->prefix(), v, ChoiceNameWithPrefix(name_with_prefix), name(), std::shared_ptr<const UseDesc>(),
- enabled, enabled, true, explicitly_listed, override_description, ""));
+ return std::make_shared<EChoiceValue>(c->prefix(), v, ChoiceNameWithPrefix(name_with_prefix), name(), std::shared_ptr<const UseDesc>(),
+ enabled, enabled, true, explicitly_listed, override_description, "");
}
void
@@ -1049,8 +1049,8 @@ EInstalledRepositoryID::add_build_options(const std::shared_ptr<Choices> & choic
choices->add(build_options);
/* trace */
- build_options->add(make_shared_ptr(new ELikeTraceChoiceValue(
- shared_from_this(), _imp->environment, build_options)));
+ build_options->add(std::make_shared<ELikeTraceChoiceValue>(
+ shared_from_this(), _imp->environment, build_options));
}
}
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 11f47667e..087793cf6 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 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
@@ -35,7 +35,6 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/join.hh>
#include <paludis/util/create_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/member_iterator-impl.hh>
#include <paludis/util/sequence.hh>
@@ -1012,9 +1011,9 @@ EContentsKey::value() const
if ("obj" == tokens.at(0))
{
std::shared_ptr<ContentsEntry> e(new ContentsFileEntry(tokens.at(1)));
- e->add_metadata_key(make_shared_ptr(new LiteralMetadataTimeKey("mtime", "mtime", mkt_normal,
- Timestamp(destringify<time_t>(tokens.at(3)), 0))));
- e->add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("md5", "md5", mkt_normal, tokens.at(2))));
+ e->add_metadata_key(std::make_shared<LiteralMetadataTimeKey>("mtime", "mtime", mkt_normal,
+ Timestamp(destringify<time_t>(tokens.at(3)), 0)));
+ e->add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("md5", "md5", mkt_normal, tokens.at(2)));
_imp->value->add(e);
}
else if ("dir" == tokens.at(0))
@@ -1025,8 +1024,8 @@ EContentsKey::value() const
else if ("sym" == tokens.at(0))
{
std::shared_ptr<ContentsEntry> e(new ContentsSymEntry(tokens.at(1), tokens.at(2)));
- e->add_metadata_key(make_shared_ptr(new LiteralMetadataTimeKey("mtime", "mtime", mkt_normal,
- Timestamp(destringify<time_t>(tokens.at(3)), 0))));
+ e->add_metadata_key(std::make_shared<LiteralMetadataTimeKey>("mtime", "mtime", mkt_normal,
+ Timestamp(destringify<time_t>(tokens.at(3)), 0)));
_imp->value->add(e);
}
else if ("misc" == tokens.at(0) || "fif" == tokens.at(0) || "dev" == tokens.at(0))
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 151466163..64a7a08e2 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -75,7 +75,7 @@
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/map.hh>
#include <paludis/util/mutex.hh>
@@ -216,7 +216,7 @@ namespace paludis
mutable EAPIForFileMap eapi_for_file_map;
- Implementation(ERepository * const, const ERepositoryParams &, std::shared_ptr<Mutexes> = make_shared_ptr(new Mutexes));
+ Implementation(ERepository * const, const ERepositoryParams &, std::shared_ptr<Mutexes> = std::make_shared<Mutexes>());
~Implementation();
void need_profiles() const;
@@ -326,14 +326,14 @@ namespace paludis
layout->info_packages_files()->end(),
std::bind(std::mem_fn(&FSEntry::is_regular_file_or_symlink_to_regular_file),
std::placeholders::_1)) ?
- make_shared_ptr(new InfoPkgsMetadataKey(params.environment(), layout->info_packages_files(), repo)) :
+ std::make_shared<InfoPkgsMetadataKey>(params.environment(), layout->info_packages_files(), repo) :
std::shared_ptr<InfoPkgsMetadataKey>()
),
info_vars_key(layout->info_variables_files()->end() != std::find_if(layout->info_variables_files()->begin(),
layout->info_variables_files()->end(),
std::bind(std::mem_fn(&FSEntry::is_regular_file_or_symlink_to_regular_file),
std::placeholders::_1)) ?
- make_shared_ptr(new InfoVarsMetadataKey(layout->info_variables_files())) :
+ std::make_shared<InfoVarsMetadataKey>(layout->info_variables_files()) :
std::shared_ptr<InfoVarsMetadataKey>()
),
#ifdef ENABLE_PBINS
@@ -360,20 +360,20 @@ namespace paludis
KeyValueConfigFile k(params.location() / "metadata" / "about.conf", KeyValueConfigFileOptions(),
&KeyValueConfigFile::no_defaults, &KeyValueConfigFile::no_transformation);
if (! k.get("description").empty())
- about_keys.push_back(make_shared_ptr(new LiteralMetadataValueKey<std::string>("description", "description",
- mkt_significant, k.get("description"))));
+ about_keys.push_back(std::make_shared<LiteralMetadataValueKey<std::string>>("description", "description",
+ mkt_significant, k.get("description")));
if (! k.get("summary").empty())
- about_keys.push_back(make_shared_ptr(new LiteralMetadataValueKey<std::string>("summary", "summary",
- mkt_significant, k.get("summary"))));
+ about_keys.push_back(std::make_shared<LiteralMetadataValueKey<std::string>>("summary", "summary",
+ mkt_significant, k.get("summary")));
if (! k.get("status").empty())
- about_keys.push_back(make_shared_ptr(new LiteralMetadataValueKey<std::string>("status", "status",
- mkt_significant, k.get("status"))));
+ about_keys.push_back(std::make_shared<LiteralMetadataValueKey<std::string>>("status", "status",
+ mkt_significant, k.get("status")));
if (! k.get("maintainer").empty())
- about_keys.push_back(make_shared_ptr(new LiteralMetadataValueKey<std::string>("maintainer", "maintainer",
- mkt_significant, k.get("maintainer"))));
+ about_keys.push_back(std::make_shared<LiteralMetadataValueKey<std::string>>("maintainer", "maintainer",
+ mkt_significant, k.get("maintainer")));
if (! k.get("homepage").empty())
- about_keys.push_back(make_shared_ptr(new LiteralMetadataValueKey<std::string>("homepage", "homepage",
- mkt_significant, k.get("homepage"))));
+ about_keys.push_back(std::make_shared<LiteralMetadataValueKey<std::string>>("homepage", "homepage",
+ mkt_significant, k.get("homepage")));
}
FSEntry mtf(params.location() / "metadata" / "timestamp");
@@ -1000,7 +1000,7 @@ ERepository::perform_hook(const Hook & hook)
std::shared_ptr<const CategoryNamePartSet>
ERepository::unimportant_category_names() const
{
- std::shared_ptr<CategoryNamePartSet> result(make_shared_ptr(new CategoryNamePartSet));
+ std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
return result;
}
@@ -1912,7 +1912,7 @@ namespace
{
MirrorMap::const_iterator i(map.find(m));
if (i == map.end())
- return make_shared_ptr(new MirrorsSequence);
+ return std::make_shared<MirrorsSequence>();
else
return i->second;
}
@@ -2614,7 +2614,7 @@ ERepository::info(const std::shared_ptr<const ERepositoryID> & id,
make_named_values<EbuildInfoCommandParams>(
n::expand_vars() = expand_vars,
n::info_vars() = info_vars_key() ?
- info_vars_key()->value() : make_shared_ptr(new const Set<std::string>),
+ info_vars_key()->value() : std::make_shared<const Set<std::string>>(),
n::load_environment() = static_cast<const FSEntry *>(0),
n::profiles() = _imp->params.profiles(),
n::profiles_with_parents() = profile()->profiles_with_parents(),
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index e2abb8b6a..8683ff7f9 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/util/return_literal_function.hh>
@@ -70,7 +69,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -936,7 +935,7 @@ namespace test_cases
env.package_database()->add_repository(1, repo);
FetchAction action(make_named_values<FetchActionOptions>(
- n::errors() = make_shared_ptr(new Sequence<FetchActionFailure>),
+ n::errors() = std::make_shared<Sequence<FetchActionFailure>>(),
n::exclude_unmirrorable() = false,
n::fetch_parts() = FetchParts() + fp_regulars + fp_extras,
n::ignore_not_in_manifest() = false,
@@ -1045,7 +1044,7 @@ namespace test_cases
env.package_database()->add_repository(1, repo);
FetchAction action(make_named_values<FetchActionOptions>(
- n::errors() = make_shared_ptr(new Sequence<FetchActionFailure>),
+ n::errors() = std::make_shared<Sequence<FetchActionFailure>>(),
n::exclude_unmirrorable() = false,
n::fetch_parts() = FetchParts() + fp_regulars + fp_extras,
n::ignore_not_in_manifest() = false,
diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc
index f43bcee67..85711c280 100644
--- a/paludis/repositories/e/e_repository_TEST_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_0.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -154,7 +153,7 @@ namespace test_cases
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_1.cc b/paludis/repositories/e/e_repository_TEST_1.cc
index 67a4293d4..1bfbec57e 100644
--- a/paludis/repositories/e/e_repository_TEST_1.cc
+++ b/paludis/repositories/e/e_repository_TEST_1.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -133,7 +132,7 @@ namespace test_cases
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_2.cc b/paludis/repositories/e/e_repository_TEST_2.cc
index 38ead4077..617c2fb29 100644
--- a/paludis/repositories/e/e_repository_TEST_2.cc
+++ b/paludis/repositories/e/e_repository_TEST_2.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -133,7 +132,7 @@ namespace test_cases
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_3.cc b/paludis/repositories/e/e_repository_TEST_3.cc
index d60d28090..636f7bbf4 100644
--- a/paludis/repositories/e/e_repository_TEST_3.cc
+++ b/paludis/repositories/e/e_repository_TEST_3.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -133,7 +132,7 @@ namespace test_cases
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index 3400b9457..0bfd6d424 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -133,7 +132,7 @@ namespace test_cases
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc b/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
index faf73c622..2ea768991 100644
--- a/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
+++ b/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index ae6bf936e..9a7fdc503 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -155,7 +154,7 @@ namespace
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
index 9a974265d..8bd2a07db 100644
--- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -152,7 +151,7 @@ namespace test_cases
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index 1cb9241cf..a678bba74 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -30,7 +30,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/package_id.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -149,7 +148,7 @@ namespace
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc
index f8b7a1952..7be5f65cf 100644
--- a/paludis/repositories/e/e_repository_TEST_pbin.cc
+++ b/paludis/repositories/e/e_repository_TEST_pbin.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -164,7 +163,7 @@ namespace test_cases
n::destination() = b_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
@@ -185,7 +184,7 @@ namespace test_cases
n::destination() = v_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc
index da548f8ec..2bfdd6c64 100644
--- a/paludis/repositories/e/e_repository_TEST_phases.cc
+++ b/paludis/repositories/e/e_repository_TEST_phases.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -165,7 +164,7 @@ namespace
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_TEST_replacing.cc b/paludis/repositories/e/e_repository_TEST_replacing.cc
index 1acbcf4a7..47f121a64 100644
--- a/paludis/repositories/e/e_repository_TEST_replacing.cc
+++ b/paludis/repositories/e/e_repository_TEST_replacing.cc
@@ -23,7 +23,6 @@
#include <paludis/environments/test/test_environment.hh>
#include <paludis/repositories/fake/fake_installed_repository.hh>
#include <paludis/repositories/fake/fake_package_id.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/util/map.hh>
@@ -59,7 +58,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
index 0973b9f02..d37e71ef2 100644
--- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
+++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
@@ -29,7 +29,6 @@
#include <paludis/util/system.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -66,7 +65,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -137,7 +136,7 @@ namespace test_cases
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &cannot_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 095b39e34..bc281c1f3 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -42,8 +42,8 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/dep_spec.hh>
#include <paludis/elike_slot_requirement.hh>
#include <paludis/selection.hh>
@@ -255,7 +255,7 @@ ERepositorySets::security_set(bool insecurity) const
{
Context context("When building security or insecurity package set:");
- std::shared_ptr<SetSpecTree> security_packages(new SetSpecTree(make_shared_ptr(new AllDepSpec)));
+ std::shared_ptr<SetSpecTree> security_packages(new SetSpecTree(std::make_shared<AllDepSpec>()));
if (!_imp->params.securitydir().is_directory_or_symlink_to_directory())
return security_packages;
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 678385954..6533b98bf 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -26,7 +26,6 @@
#include <paludis/util/strip.hh>
#include <paludis/util/destringify.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/map.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/stringify.hh>
@@ -70,7 +69,7 @@ namespace
std::shared_ptr<const EAPIEbuildEnvironmentVariables> make_ebuild_environment_variables(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIEbuildEnvironmentVariables(make_named_values<EAPIEbuildEnvironmentVariables>(
+ return std::make_shared<EAPIEbuildEnvironmentVariables>(make_named_values<EAPIEbuildEnvironmentVariables>(
n::description_choices() = check_get(k, "description_choices"),
n::description_use() = check_get(k, "description_use"),
n::env_a() = check_get(k, "env_a"),
@@ -101,21 +100,21 @@ namespace
n::env_use_expand_implicit() = check_get(k, "env_use_expand_implicit"),
n::env_use_expand_unprefixed() = check_get(k, "env_use_expand_unprefixed"),
n::env_use_expand_values_part() = check_get(k, "env_use_expand_values_part")
- )));
+ ));
}
std::shared_ptr<EAPIMetadataVariable> make_metadata_variable(const KeyValueConfigFile & k, const std::string & s)
{
- return make_shared_ptr(new EAPIMetadataVariable(make_named_values<EAPIMetadataVariable>(
+ return std::make_shared<EAPIMetadataVariable>(make_named_values<EAPIMetadataVariable>(
n::description() = check_get(k, "description_" + s),
n::flat_list_index() = destringify_key<int>(k, "flat_list_" + s),
n::name() = check_get(k, "metadata_" + s)
- )));
+ ));
}
std::shared_ptr<const EAPIEbuildMetadataVariables> make_ebuild_metadata_variables(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIEbuildMetadataVariables(make_named_values<EAPIEbuildMetadataVariables>(
+ return std::make_shared<EAPIEbuildMetadataVariables>(make_named_values<EAPIEbuildMetadataVariables>(
n::bugs_to() = make_metadata_variable(k, "bugs_to"),
n::build_depend() = make_metadata_variable(k, "build_depend"),
n::defined_phases() = make_metadata_variable(k, "defined_phases"),
@@ -145,7 +144,7 @@ namespace
n::use() = make_metadata_variable(k, "use"),
n::use_expand() = make_metadata_variable(k, "use_expand"),
n::use_expand_hidden() = make_metadata_variable(k, "use_expand_hidden")
- )));
+ ));
}
std::shared_ptr<Set<std::string> > make_set(const std::string & s)
@@ -157,7 +156,7 @@ namespace
std::shared_ptr<const EAPIEbuildOptions> make_ebuild_options(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIEbuildOptions(make_named_values<EAPIEbuildOptions>(
+ return std::make_shared<EAPIEbuildOptions>(make_named_values<EAPIEbuildOptions>(
n::binary_from_env_variables() = check_get(k, "binary_from_env_variables"),
n::bracket_merged_variables() = check_get(k, "bracket_merged_variables"),
n::bracket_merged_variables_annotatable() = check_get(k, "bracket_merged_variables_annotatable"),
@@ -194,12 +193,12 @@ namespace
n::vdb_from_env_unless_empty_variables() = check_get(k, "vdb_from_env_unless_empty_variables"),
n::vdb_from_env_variables() = check_get(k, "vdb_from_env_variables"),
n::want_portage_emulation_vars() = destringify_key<bool>(k, "want_portage_emulation_vars")
- )));
+ ));
}
std::shared_ptr<const EAPIEbuildPhases> make_ebuild_phases(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIEbuildPhases(make_named_values<EAPIEbuildPhases>(
+ return std::make_shared<EAPIEbuildPhases>(make_named_values<EAPIEbuildPhases>(
n::ebuild_bad_options() = check_get(k, "ebuild_bad_options"),
n::ebuild_config() = check_get(k, "ebuild_config"),
n::ebuild_fetch_extra() = check_get(k, "ebuild_fetch_extra"),
@@ -211,20 +210,20 @@ namespace
n::ebuild_pretend() = check_get(k, "ebuild_pretend"),
n::ebuild_uninstall() = check_get(k, "ebuild_uninstall"),
n::ebuild_variable() = check_get(k, "ebuild_variable")
- )));
+ ));
}
std::shared_ptr<const EAPIPipeCommands> make_pipe_commands(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIPipeCommands(make_named_values<EAPIPipeCommands>(
+ return std::make_shared<EAPIPipeCommands>(make_named_values<EAPIPipeCommands>(
n::no_slot_or_repo() = destringify_key<bool>(k, "pipe_commands_no_slot_or_repo"),
n::rewrite_virtuals() = destringify_key<bool>(k, "pipe_commands_rewrite_virtuals")
- )));
+ ));
}
std::shared_ptr<const EAPIToolsOptions> make_tool_options(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIToolsOptions(make_named_values<EAPIToolsOptions>(
+ return std::make_shared<EAPIToolsOptions>(make_named_values<EAPIToolsOptions>(
n::dodoc_r() = destringify_key<bool>(k, "dodoc_r"),
n::doins_symlink() = destringify_key<bool>(k, "doins_symlink"),
n::doman_lang_filenames() = destringify_key<bool>(k, "doman_lang_filenames"),
@@ -234,31 +233,31 @@ namespace
n::unpack_fix_permissions() = destringify_key<bool>(k, "unpack_fix_permissions"),
n::unpack_suffixes() = k.get("unpack_suffixes"),
n::unpack_unrecognised_is_fatal() = destringify_key<bool>(k, "unpack_unrecognised_is_fatal")
- )));
+ ));
}
std::shared_ptr<const EAPIAnnotations> make_annotations(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIAnnotations(make_named_values<EAPIAnnotations>(
+ return std::make_shared<EAPIAnnotations>(make_named_values<EAPIAnnotations>(
n::myoptions_description() = k.get("annotations_myoptions_description"),
n::myoptions_number_selected() = k.get("annotations_myoptions_number_selected"),
n::myoptions_number_selected_at_least_one() = k.get("annotations_myoptions_number_selected_at_least_one"),
n::myoptions_number_selected_at_most_one() = k.get("annotations_myoptions_number_selected_at_most_one"),
n::myoptions_number_selected_exactly_one() = k.get("annotations_myoptions_number_selected_exactly_one"),
n::myoptions_requires() = k.get("annotations_myoptions_requires")
- )));
+ ));
}
std::shared_ptr<const EAPIChoicesOptions> make_choices_options(const KeyValueConfigFile & k)
{
- return make_shared_ptr(new EAPIChoicesOptions(make_named_values<EAPIChoicesOptions>(
+ return std::make_shared<EAPIChoicesOptions>(make_named_values<EAPIChoicesOptions>(
n::fancy_test_flag() = check_get(k, "fancy_test_flag"),
n::has_expensive_tests() = destringify_key<bool>(k, "has_expensive_tests"),
n::has_optional_tests() = destringify_key<bool>(k, "has_optional_tests"),
n::has_recommended_tests() = destringify_key<bool>(k, "has_recommended_tests"),
n::profile_iuse_injection() = destringify_key<bool>(k, "profile_iuse_injection"),
n::use_expand_separator() = destringify_key<char>(k, "use_expand_separator")
- )));
+ ));
}
std::shared_ptr<const SupportedEAPI> make_supported_eapi(const KeyValueConfigFile & k)
@@ -313,12 +312,12 @@ namespace
merger_options += destringify<MergerOption>(*t);
}
- return make_shared_ptr(new SupportedEAPI(make_named_values<SupportedEAPI>(
+ return std::make_shared<SupportedEAPI>(make_named_values<SupportedEAPI>(
n::annotations() = make_annotations(k),
n::breaks_portage() = destringify_key<bool>(k, "breaks_portage"),
n::can_be_pbin() = destringify_key<bool>(k, "can_be_pbin"),
n::choices_options() = make_choices_options(k),
- n::dependency_labels() = make_shared_ptr(new const EAPILabels(check_get(k, "dependency_labels"))),
+ n::dependency_labels() = std::make_shared<const EAPILabels>(check_get(k, "dependency_labels")),
n::dependency_spec_tree_parse_options() = dependency_spec_tree_parse_options,
n::ebuild_environment_variables() = make_ebuild_environment_variables(k),
n::ebuild_metadata_variables() = make_ebuild_metadata_variables(k),
@@ -329,10 +328,10 @@ namespace
n::package_dep_spec_parse_options() = package_dep_spec_parse_options,
n::pipe_commands() = make_pipe_commands(k),
n::tools_options() = make_tool_options(k),
- n::uri_labels() = make_shared_ptr(new const EAPILabels(check_get(k, "uri_labels"))),
+ n::uri_labels() = std::make_shared<const EAPILabels>(check_get(k, "uri_labels")),
n::userpriv_cannot_use_root() = destringify_key<bool>(k, "userpriv_cannot_use_root"),
n::version_spec_options() = version_spec_options
- )));
+ ));
}
}
@@ -397,21 +396,21 @@ EAPIData::eapi_from_string(const std::string & s) const
if (i != _imp->values.end())
return i->second;
- return make_shared_ptr(new EAPI(make_named_values<EAPI>(
+ return std::make_shared<EAPI>(make_named_values<EAPI>(
n::exported_name() = s,
n::name() = s,
n::supported() = std::shared_ptr<const SupportedEAPI>())
- ));
+ );
}
std::shared_ptr<const EAPI>
EAPIData::unknown_eapi() const
{
- return make_shared_ptr(new EAPI(make_named_values<EAPI>(
+ return std::make_shared<EAPI>(make_named_values<EAPI>(
n::exported_name() = "UNKNOWN",
n::name() = "UNKNOWN",
n::supported() = std::shared_ptr<const SupportedEAPI>())
- ));
+ );
}
namespace paludis
diff --git a/paludis/repositories/e/eapi_phase.cc b/paludis/repositories/e/eapi_phase.cc
index b7b923766..ffab13bc5 100644
--- a/paludis/repositories/e/eapi_phase.cc
+++ b/paludis/repositories/e/eapi_phase.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 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
@@ -21,7 +21,6 @@
#include <paludis/repositories/e/eapi.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -120,7 +119,7 @@ EAPIPhases::EAPIPhases(const std::string & s) :
tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(s, ";", "", std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
- _imp->phases.push_back(make_shared_ptr(new EAPIPhase(*t)));
+ _imp->phases.push_back(std::make_shared<EAPIPhase>(*t));
}
EAPIPhases::~EAPIPhases()
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index b053865ff..9ac2b1281 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -46,7 +46,6 @@
#include <paludis/util/log.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/save.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/tribool.hh>
@@ -54,6 +53,7 @@
#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 <set>
#include <iterator>
@@ -138,17 +138,17 @@ namespace paludis
run_dependencies_labels(new DependenciesLabelSequence),
post_dependencies_labels(new DependenciesLabelSequence)
{
- raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build",
- return_literal_function(true))));
- raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run",
- return_literal_function(true))));
-
- build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("DEPEND",
- return_literal_function(true))));
- run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("RDEPEND",
- return_literal_function(true))));
- post_dependencies_labels->push_back(make_shared_ptr(new DependenciesPostLabel("PDEPEND",
- return_literal_function(true))));
+ raw_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build",
+ return_literal_function(true)));
+ raw_dependencies_labels->push_back(std::make_shared<DependenciesRunLabel>("run",
+ return_literal_function(true)));
+
+ build_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("DEPEND",
+ return_literal_function(true)));
+ run_dependencies_labels->push_back(std::make_shared<DependenciesRunLabel>("RDEPEND",
+ return_literal_function(true)));
+ post_dependencies_labels->push_back(std::make_shared<DependenciesPostLabel>("PDEPEND",
+ return_literal_function(true)));
}
};
}
@@ -296,40 +296,40 @@ EbuildID::need_keys_added() const
}
}
- add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("EAPI", "EAPI", mkt_internal, _imp->eapi->name())));
+ add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("EAPI", "EAPI", mkt_internal, _imp->eapi->name()));
- _imp->repository_mask = make_shared_ptr(new EMutableRepositoryMaskInfoKey(shared_from_this(), "repository_mask", "Repository masked",
- std::static_pointer_cast<const ERepository>(repository())->repository_masked(*this), mkt_internal));
+ _imp->repository_mask = std::make_shared<EMutableRepositoryMaskInfoKey>(shared_from_this(), "repository_mask", "Repository masked",
+ std::static_pointer_cast<const ERepository>(repository())->repository_masked(*this), mkt_internal);
add_metadata_key(_imp->repository_mask);
- _imp->profile_mask = make_shared_ptr(new EMutableRepositoryMaskInfoKey(shared_from_this(), "profile_mask", "Profile masked",
- std::static_pointer_cast<const ERepository>(repository())->profile()->profile_masked(*this), mkt_internal));
+ _imp->profile_mask = std::make_shared<EMutableRepositoryMaskInfoKey>(shared_from_this(), "profile_mask", "Profile masked",
+ std::static_pointer_cast<const ERepository>(repository())->profile()->profile_masked(*this), mkt_internal);
add_metadata_key(_imp->profile_mask);
std::shared_ptr<const Map<ChoiceNameWithPrefix, std::string> > maybe_use_descriptions;
if (_imp->eapi->supported())
{
- _imp->raw_use_expand = make_shared_ptr(new LiteralMetadataStringSetKey(
+ _imp->raw_use_expand = std::make_shared<LiteralMetadataStringSetKey>(
_imp->eapi->supported()->ebuild_metadata_variables()->use_expand()->name(),
_imp->eapi->supported()->ebuild_metadata_variables()->use_expand()->description(),
mkt_internal,
- e_repository()->profile()->use_expand()));
- _imp->raw_use_expand_hidden = make_shared_ptr(new LiteralMetadataStringSetKey(
+ e_repository()->profile()->use_expand());
+ _imp->raw_use_expand_hidden = std::make_shared<LiteralMetadataStringSetKey>(
_imp->eapi->supported()->ebuild_metadata_variables()->use_expand_hidden()->name(),
_imp->eapi->supported()->ebuild_metadata_variables()->use_expand_hidden()->description(),
mkt_internal,
- e_repository()->profile()->use_expand_hidden()));
+ e_repository()->profile()->use_expand_hidden());
std::shared_ptr<const MetadataXML> m(MetadataXMLPool::get_instance()->metadata_if_exists(
_imp->fs_location->value().dirname() / "metadata.xml"));
if (m)
{
if (! m->long_description().empty())
- add_metadata_key(_imp->long_description = make_shared_ptr(new LiteralMetadataValueKey<std::string>("long_description",
- "Long Description", mkt_normal, m->long_description())));
+ add_metadata_key(_imp->long_description = std::make_shared<LiteralMetadataValueKey<std::string>>("long_description",
+ "Long Description", mkt_normal, m->long_description()));
if (! m->herds()->empty())
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringSequenceKey("herds", "Herds", mkt_normal, m->herds())));
+ add_metadata_key(std::make_shared<LiteralMetadataStringSequenceKey>("herds", "Herds", mkt_normal, m->herds()));
if (! m->maintainers()->empty())
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringSequenceKey("maintainers", "Maintainers", mkt_normal, m->maintainers())));
+ add_metadata_key(std::make_shared<LiteralMetadataStringSequenceKey>("maintainers", "Maintainers", mkt_normal, m->maintainers()));
maybe_use_descriptions = m->uses();
}
@@ -469,7 +469,7 @@ EbuildID::need_masks_added() const
if (! eapi()->supported())
{
- add_mask(make_shared_ptr(new EUnsupportedMask('E', "eapi", eapi()->name())));
+ add_mask(std::make_shared<EUnsupportedMask>('E', "eapi", eapi()->name()));
return;
}
@@ -477,20 +477,20 @@ EbuildID::need_masks_added() const
{
if (! _imp->environment->accept_keywords(keywords_key()->value(), *this))
{
- add_mask(make_shared_ptr(new EUnacceptedMask('K',
+ add_mask(std::make_shared<EUnacceptedMask>('K',
DistributionData::get_instance()->distribution_from_string(
- _imp->environment->distribution())->concept_keyword(), keywords_key())));
+ _imp->environment->distribution())->concept_keyword(), keywords_key()));
}
else if (keywords_key()->value()->end() == std::find_if(keywords_key()->value()->begin(),
keywords_key()->value()->end(), &is_stable_keyword))
{
- add_overridden_mask(make_shared_ptr(new OverriddenMask(
+ add_overridden_mask(std::make_shared<OverriddenMask>(
make_named_values<OverriddenMask>(
- n::mask() = make_shared_ptr(new EUnacceptedMask('~',
+ n::mask() = std::make_shared<EUnacceptedMask>('~',
DistributionData::get_instance()->distribution_from_string(
- _imp->environment->distribution())->concept_keyword() + " (unstable accepted)", keywords_key())),
+ _imp->environment->distribution())->concept_keyword() + " (unstable accepted)", keywords_key()),
n::override_reason() = mro_accepted_unstable
- ))));
+ )));
}
}
@@ -499,20 +499,20 @@ EbuildID::need_masks_added() const
LicenceChecker c(_imp->environment, &Environment::accept_license, this);
license_key()->value()->root()->accept(c);
if (! c.ok)
- add_mask(make_shared_ptr(new EUnacceptedMask('L',
+ add_mask(std::make_shared<EUnacceptedMask>('L',
DistributionData::get_instance()->distribution_from_string(
- _imp->environment->distribution())->concept_license(), license_key())));
+ _imp->environment->distribution())->concept_license(), license_key()));
}
if (! _imp->environment->unmasked_by_user(*this))
{
/* repo unless user */
if (_imp->repository_mask->value())
- add_mask(make_shared_ptr(new ERepositoryMask('R', "repository", _imp->repository_mask)));
+ add_mask(std::make_shared<ERepositoryMask>('R', "repository", _imp->repository_mask));
/* profile unless user */
if (_imp->profile_mask->value())
- add_mask(make_shared_ptr(new ERepositoryMask('P', "profile", _imp->profile_mask)));
+ add_mask(std::make_shared<ERepositoryMask>('P', "profile", _imp->profile_mask));
/* user */
std::shared_ptr<const Mask> user_mask(_imp->environment->mask_for_user(*this, false));
@@ -523,28 +523,28 @@ EbuildID::need_masks_added() const
{
/* repo overridden by user */
if (_imp->repository_mask->value())
- add_overridden_mask(make_shared_ptr(new OverriddenMask(
+ add_overridden_mask(std::make_shared<OverriddenMask>(
make_named_values<OverriddenMask>(
- n::mask() = make_shared_ptr(new ERepositoryMask('r', "repository (overridden)", _imp->repository_mask)),
+ n::mask() = std::make_shared<ERepositoryMask>('r', "repository (overridden)", _imp->repository_mask),
n::override_reason() = mro_overridden_by_user
- ))));
+ )));
/* profile unless user */
if (_imp->profile_mask->value())
- add_overridden_mask(make_shared_ptr(new OverriddenMask(
+ add_overridden_mask(std::make_shared<OverriddenMask>(
make_named_values<OverriddenMask>(
- n::mask() = make_shared_ptr(new ERepositoryMask('p', "profile (overridden)", _imp->profile_mask)),
+ n::mask() = std::make_shared<ERepositoryMask>('p', "profile (overridden)", _imp->profile_mask),
n::override_reason() = mro_overridden_by_user
- ))));
+ )));
/* user */
std::shared_ptr<const Mask> user_mask(_imp->environment->mask_for_user(*this, true));
if (user_mask)
- add_overridden_mask(make_shared_ptr(new OverriddenMask(
+ add_overridden_mask(std::make_shared<OverriddenMask>(
make_named_values<OverriddenMask>(
n::mask() = user_mask,
n::override_reason() = mro_overridden_by_user
- ))));
+ )));
}
@@ -1346,9 +1346,9 @@ EbuildID::make_choice_value(
}
}
- return make_shared_ptr(new EChoiceValue(choice->prefix(), value_name, ChoiceNameWithPrefix(name_with_prefix), name(),
+ return std::make_shared<EChoiceValue>(choice->prefix(), value_name, ChoiceNameWithPrefix(name_with_prefix), name(),
_imp->repository->use_desc(),
- enabled, enabled_by_default, force_locked || locked, explicitly_listed, override_description, ""));
+ enabled, enabled_by_default, force_locked || locked, explicitly_listed, override_description, "");
}
namespace
@@ -1409,12 +1409,12 @@ EbuildID::add_build_options(const std::shared_ptr<Choices> & choices) const
/* optional_tests */
if (eapi()->supported()->choices_options()->has_optional_tests())
if (may_be_unrestricted_test)
- build_options->add(make_shared_ptr(new ELikeOptionalTestsChoiceValue(shared_from_this(), _imp->environment, build_options)));
+ build_options->add(std::make_shared<ELikeOptionalTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
/* recommended_tests */
if (eapi()->supported()->choices_options()->has_recommended_tests())
if (may_be_unrestricted_test)
- build_options->add(make_shared_ptr(new ELikeRecommendedTestsChoiceValue(shared_from_this(), _imp->environment, build_options)));
+ build_options->add(std::make_shared<ELikeRecommendedTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
/* expensive_tests */
if (eapi()->supported()->choices_options()->has_expensive_tests())
@@ -1438,23 +1438,23 @@ EbuildID::add_build_options(const std::shared_ptr<Choices> & choices) const
}
if (has_expensive_test_phase)
- build_options->add(make_shared_ptr(new ELikeExpensiveTestsChoiceValue(shared_from_this(), _imp->environment, build_options)));
+ build_options->add(std::make_shared<ELikeExpensiveTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
}
/* split, strip */
if (may_be_unrestricted_strip)
{
- build_options->add(make_shared_ptr(new ELikeSplitChoiceValue(shared_from_this(), _imp->environment, build_options)));
- build_options->add(make_shared_ptr(new ELikeStripChoiceValue(shared_from_this(), _imp->environment, build_options)));
+ build_options->add(std::make_shared<ELikeSplitChoiceValue>(shared_from_this(), _imp->environment, build_options));
+ build_options->add(std::make_shared<ELikeStripChoiceValue>(shared_from_this(), _imp->environment, build_options));
}
/* trace */
- build_options->add(make_shared_ptr(new ELikeTraceChoiceValue(
- shared_from_this(), _imp->environment, build_options)));
+ build_options->add(std::make_shared<ELikeTraceChoiceValue>(
+ shared_from_this(), _imp->environment, build_options));
/* preserve_work */
- build_options->add(make_shared_ptr(new ELikePreserveWorkChoiceValue(
- shared_from_this(), _imp->environment, build_options, false)));
+ build_options->add(std::make_shared<ELikePreserveWorkChoiceValue>(
+ shared_from_this(), _imp->environment, build_options, false));
/* jobs */
if (! eapi()->supported()->ebuild_environment_variables()->env_jobs().empty())
@@ -1462,8 +1462,8 @@ EbuildID::add_build_options(const std::shared_ptr<Choices> & choices) const
if (! _imp->defined_phases)
throw InternalError(PALUDIS_HERE, "bug! no defined_phases yet");
- build_options->add(make_shared_ptr(new ELikeJobsChoiceValue(
- shared_from_this(), _imp->environment, build_options)));
+ build_options->add(std::make_shared<ELikeJobsChoiceValue>(
+ shared_from_this(), _imp->environment, build_options));
}
}
}
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index e860a940e..d78a3115c 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -38,7 +38,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/choice.hh>
#include <paludis/literal_metadata_key.hh>
#include <unordered_map>
@@ -647,8 +647,8 @@ std::shared_ptr<MetadataValueKey<FSEntry> >
ExheresLayout::accounts_repository_data_location_key() const
{
if ((_imp->tree_root / "metadata" / "accounts").exists())
- return make_shared_ptr(new LiteralMetadataValueKey<FSEntry>("accounts_repository_data_location",
- "AccountsRepository data location", mkt_internal, _imp->tree_root / "metadata" / "accounts"));
+ return std::make_shared<LiteralMetadataValueKey<FSEntry>>("accounts_repository_data_location",
+ "AccountsRepository data location", mkt_internal, _imp->tree_root / "metadata" / "accounts");
else
return make_null_shared_ptr();
}
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc
index 8b7fe0591..51234ceda 100644
--- a/paludis/repositories/e/exheres_profile.cc
+++ b/paludis/repositories/e/exheres_profile.cc
@@ -30,13 +30,13 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/config_file.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/map.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/set.hh>
#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/choice.hh>
#include <paludis/dep_tag.hh>
#include <paludis/environment.hh>
@@ -57,7 +57,7 @@ namespace
const FSEntry & f,
const LineConfigFileOptions & o)
{
- return make_shared_ptr(new LineConfigFile(f, o));
+ return std::make_shared<LineConfigFile>(f, o);
}
typedef std::unordered_map<std::string, std::string, Hash<std::string> > EnvironmentVariablesMap;
@@ -112,7 +112,7 @@ namespace paludis
use_expand_implicit(new Set<std::string>),
iuse_implicit(new Set<std::string>),
use_expand_values(new Set<std::string>),
- system_packages(new SetSpecTree(make_shared_ptr(new AllDepSpec))),
+ system_packages(new SetSpecTree(std::make_shared<AllDepSpec>())),
system_tag(new GeneralSetDepTag(SetName("system"), stringify(name)))
{
environment_variables["CONFIG_PROTECT"] = getenv_with_default("CONFIG_PROTECT", "/etc");
@@ -383,6 +383,6 @@ ExheresProfile::system_packages() const
const std::shared_ptr<const Map<QualifiedPackageName, PackageDepSpec> >
ExheresProfile::virtuals() const
{
- return make_shared_ptr(new Map<QualifiedPackageName, PackageDepSpec>);
+ return std::make_shared<Map<QualifiedPackageName, PackageDepSpec>>();
}
diff --git a/paludis/repositories/e/exndbam_id.cc b/paludis/repositories/e/exndbam_id.cc
index 28ab194dd..4b79c5092 100644
--- a/paludis/repositories/e/exndbam_id.cc
+++ b/paludis/repositories/e/exndbam_id.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 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
@@ -20,7 +20,6 @@
#include <paludis/repositories/e/exndbam_id.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/contents.hh>
@@ -117,7 +116,7 @@ ExndbamID::contents_filename() const
std::shared_ptr<MetadataValueKey<std::shared_ptr<const Contents> > >
ExndbamID::make_contents_key() const
{
- return make_shared_ptr(new ExndbamContentsKey(this, _ndbam));
+ return std::make_shared<ExndbamContentsKey>(this, _ndbam);
}
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 7942d2262..2d829064c 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -32,10 +32,10 @@
#include <paludis/util/cookie.hh>
#include <paludis/util/set.hh>
#include <paludis/util/dir_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#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/output_manager.hh>
#include <paludis/distribution.hh>
#include <paludis/environment.hh>
@@ -189,7 +189,7 @@ ExndbamRepository::repository_factory_dependencies(
const Environment * const,
const std::function<std::string (const std::string &)> &)
{
- return make_shared_ptr(new RepositoryNameSet);
+ return std::make_shared<RepositoryNameSet>();
}
void
@@ -574,7 +574,7 @@ ExndbamRepository::perform_uninstall(
n::ebuild_file() = ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"),
n::eclassdirs() = eclassdirs,
n::environment() = _imp->params.environment(),
- n::exlibsdirs() = make_shared_ptr(new FSEntrySequence),
+ n::exlibsdirs() = std::make_shared<FSEntrySequence>(),
n::files_dir() = ver_dir,
n::maybe_output_manager() = output_manager,
n::package_builddir() = package_builddir,
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
index 7dd869bd0..dd91dcbe3 100644
--- a/paludis/repositories/e/exndbam_repository_TEST.cc
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -25,7 +25,6 @@
#include <paludis/util/join.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/action.hh>
#include <paludis/filtered_generator.hh>
@@ -48,7 +47,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
diff --git a/paludis/repositories/e/extra_distribution_data.cc b/paludis/repositories/e/extra_distribution_data.cc
index 0ca917401..45c7df10a 100644
--- a/paludis/repositories/e/extra_distribution_data.cc
+++ b/paludis/repositories/e/extra_distribution_data.cc
@@ -19,7 +19,6 @@
#include <paludis/repositories/e/extra_distribution_data.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/wrapped_output_iterator.hh>
@@ -50,7 +49,7 @@ namespace paludis
static std::shared_ptr<EDistribution> make_data(const std::shared_ptr<const KeyValueConfigFile> & k)
{
- return make_shared_ptr(new EDistribution(make_named_values<EDistribution>(
+ return std::make_shared<EDistribution>(make_named_values<EDistribution>(
n::default_buildroot() = k->get("default_buildroot"),
n::default_distdir() = k->get("default_distdir"),
n::default_eapi_when_unknown() = k->get("default_eapi_when_unknown"),
@@ -68,7 +67,7 @@ namespace paludis
n::qa_package_id_checks() = make_set(k->get("qa_package_id_checks")),
n::qa_package_id_file_contents_checks() = make_set(k->get("qa_package_id_file_contents_checks")),
n::qa_tree_checks() = make_set(k->get("qa_tree_checks"))
- )));
+ ));
}
};
}
diff --git a/paludis/repositories/e/fetch_visitor.cc b/paludis/repositories/e/fetch_visitor.cc
index 267dd43f5..91b324398 100644
--- a/paludis/repositories/e/fetch_visitor.cc
+++ b/paludis/repositories/e/fetch_visitor.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 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
@@ -34,7 +34,6 @@
#include <paludis/util/log.hh>
#include <paludis/util/join.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/output_manager.hh>
#include <list>
diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc
index 6b1dad66a..92f3e2c15 100644
--- a/paludis/repositories/e/fetch_visitor_TEST.cc
+++ b/paludis/repositories/e/fetch_visitor_TEST.cc
@@ -24,7 +24,6 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/util/safe_ifstream.hh>
@@ -80,8 +79,8 @@ namespace test_cases
generator::Matches(parse_user_package_dep_spec("=cat/pkg-1",
&env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin(),
*eapi, FSEntry("fetch_visitor_TEST_dir/out"),
- false, false, "test", make_shared_ptr(new URIListedThenMirrorsLabel("listed-then-mirrors")), false,
- make_shared_ptr(new StandardOutputManager), get_mirrors_fn);
+ false, false, "test", std::make_shared<URIListedThenMirrorsLabel>("listed-then-mirrors"), false,
+ std::make_shared<StandardOutputManager>(), get_mirrors_fn);
parse_fetchable_uri("file:///" + stringify(FSEntry("fetch_visitor_TEST_dir/in/input1").realpath()), &env, id, *eapi)->root()->accept(v);
TEST_CHECK(FSEntry("fetch_visitor_TEST_dir/out/input1").is_regular_file());
diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index 21f6882b8..23570bdcf 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 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
@@ -22,7 +22,6 @@
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/options.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -62,7 +61,7 @@ namespace
const std::shared_ptr<const PackageID> id;
Fixer(const Environment * const e, const EAPI & a, const std::shared_ptr<const PackageID> & i) :
- result(new DependencySpecTree(make_shared_ptr(new AllDepSpec))),
+ result(new DependencySpecTree(std::make_shared<AllDepSpec>())),
env(e),
eapi(a),
id(i)
@@ -115,7 +114,7 @@ namespace
if ((*matches->last())->slot_key())
{
PackageDepSpec new_s(PartiallyMadePackageDepSpec(*node.spec()).slot_requirement(
- make_shared_ptr(new ELikeSlotExactRequirement((*matches->last())->slot_key()->value(), true))));
+ std::make_shared<ELikeSlotExactRequirement>((*matches->last())->slot_key()->value(), true)));
c.reset(new PackageDepSpec(new_s));
}
} while (false);
diff --git a/paludis/repositories/e/metadata_xml.cc b/paludis/repositories/e/metadata_xml.cc
index 8a7eac860..d98799987 100644
--- a/paludis/repositories/e/metadata_xml.cc
+++ b/paludis/repositories/e/metadata_xml.cc
@@ -25,7 +25,6 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/log.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/choice.hh>
diff --git a/paludis/repositories/e/myoptions_requirements_verifier.cc b/paludis/repositories/e/myoptions_requirements_verifier.cc
index b53859d6c..2ddfa4cc8 100644
--- a/paludis/repositories/e/myoptions_requirements_verifier.cc
+++ b/paludis/repositories/e/myoptions_requirements_verifier.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 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
@@ -27,8 +27,8 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/log.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/choice.hh>
#include <paludis/metadata_key.hh>
#include <algorithm>
diff --git a/paludis/repositories/e/pretend_fetch_visitor.cc b/paludis/repositories/e/pretend_fetch_visitor.cc
index c32304424..4b06ab0ce 100644
--- a/paludis/repositories/e/pretend_fetch_visitor.cc
+++ b/paludis/repositories/e/pretend_fetch_visitor.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 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
@@ -29,7 +29,6 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <list>
#include <set>
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 9b78a35db..19771d232 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -38,7 +38,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/choice.hh>
#include <paludis/literal_metadata_key.hh>
#include <functional>
@@ -670,8 +670,8 @@ std::shared_ptr<MetadataValueKey<FSEntry> >
TraditionalLayout::e_updates_location_key() const
{
if ((_imp->tree_root / "profiles" / "updates").exists())
- return make_shared_ptr(new LiteralMetadataValueKey<FSEntry>("e_updates_location",
- "VDBRepository updates data location", mkt_internal, _imp->tree_root / "profiles" / "updates"));
+ return std::make_shared<LiteralMetadataValueKey<FSEntry>>("e_updates_location",
+ "VDBRepository updates data location", mkt_internal, _imp->tree_root / "profiles" / "updates");
else
return make_null_shared_ptr();
}
diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc
index bd5e9a90c..33ebbe9f0 100644
--- a/paludis/repositories/e/traditional_profile.cc
+++ b/paludis/repositories/e/traditional_profile.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009, 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
@@ -39,7 +39,6 @@
#include <paludis/util/create_iterator-impl.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/map.hh>
#include <paludis/choice.hh>
@@ -195,7 +194,7 @@ namespace paludis
env(e),
repository(p),
profiles_with_parents(new FSEntrySequence),
- system_packages(new SetSpecTree(make_shared_ptr(new AllDepSpec))),
+ system_packages(new SetSpecTree(std::make_shared<AllDepSpec>())),
system_tag(new GeneralSetDepTag(SetName("system"), stringify(name))),
virtuals(new Map<QualifiedPackageName, PackageDepSpec>),
use_expand(new Set<std::string>),
@@ -787,7 +786,7 @@ Implementation<TraditionalProfile>::fish_out_use_expand_names()
{
std::string lower_x;
std::transform(x->begin(), x->end(), std::back_inserter(lower_x), &::tolower);
- known_choice_value_names.insert(std::make_pair(lower_x, make_shared_ptr(new Set<UnprefixedChoiceName>)));
+ known_choice_value_names.insert(std::make_pair(lower_x, std::make_shared<Set<UnprefixedChoiceName>>()));
}
for (std::set<std::pair<ChoicePrefixName, UnprefixedChoiceName> >::const_iterator u(use.begin()), u_end(use.end()) ;
diff --git a/paludis/repositories/e/vdb_id.cc b/paludis/repositories/e/vdb_id.cc
index b04346fb9..2f1688eba 100644
--- a/paludis/repositories/e/vdb_id.cc
+++ b/paludis/repositories/e/vdb_id.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * 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
@@ -19,7 +19,6 @@
#include <paludis/repositories/e/vdb_id.hh>
#include <paludis/repositories/e/e_key.hh>
-#include <paludis/util/make_shared_ptr.hh>
using namespace paludis;
using namespace paludis::erepository;
@@ -53,7 +52,7 @@ VDBID::contents_filename() const
std::shared_ptr<MetadataValueKey<std::shared_ptr<const Contents> > >
VDBID::make_contents_key() const
{
- return make_shared_ptr(new EContentsKey(shared_from_this(), "CONTENTS", "Contents",
- fs_location_key()->value() / "CONTENTS", mkt_internal));
+ return std::make_shared<EContentsKey>(shared_from_this(), "CONTENTS", "Contents",
+ fs_location_key()->value() / "CONTENTS", mkt_internal);
}
diff --git a/paludis/repositories/e/vdb_merger_TEST.cc b/paludis/repositories/e/vdb_merger_TEST.cc
index 497299ac8..4718e2069 100644
--- a/paludis/repositories/e/vdb_merger_TEST.cc
+++ b/paludis/repositories/e/vdb_merger_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/environments/test/test_environment.hh>
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/set.hh>
#include <paludis/standard_output_manager.hh>
@@ -86,9 +85,9 @@ namespace
n::environment() = &env,
n::fix_mtimes_before() = Timestamp(0, 0),
n::image() = FSEntry::cwd() / "vdb_merger_TEST_dir" / what / "image",
- n::merged_entries() = make_shared_ptr(new FSEntrySet),
+ n::merged_entries() = std::make_shared<FSEntrySet>(),
n::options() = MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs,
- n::output_manager() = make_shared_ptr(new StandardOutputManager),
+ n::output_manager() = std::make_shared<StandardOutputManager>(),
n::package_id() = std::shared_ptr<PackageID>(),
n::root() = root_dir
))
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 75066ed5c..c5fb32506 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -55,7 +55,6 @@
#include <paludis/filtered_generator.hh>
#include <paludis/filter.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fast_unique_copy.hh>
#include <paludis/util/mutex.hh>
@@ -71,6 +70,7 @@
#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/simple_visitor_cast.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/output_manager.hh>
@@ -118,7 +118,7 @@ namespace paludis
mutable bool tried_provides_cache, used_provides_cache;
std::shared_ptr<RepositoryNameCache> names_cache;
- Implementation(const VDBRepository * const, const VDBRepositoryParams &, std::shared_ptr<Mutex> = make_shared_ptr(new Mutex));
+ Implementation(const VDBRepository * const, const VDBRepositoryParams &, std::shared_ptr<Mutex> = std::make_shared<Mutex>());
~Implementation();
std::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
@@ -265,7 +265,7 @@ VDBRepository::package_names(const CategoryNamePart & c) const
need_category_names();
if (! has_category_named(c))
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
need_package_ids(c);
@@ -283,11 +283,11 @@ VDBRepository::package_ids(const QualifiedPackageName & n) const
need_category_names();
if (! has_category_named(n.category()))
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
need_package_ids(n.category());
if (! has_package_named(n))
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
return _imp->ids.find(n)->second;
}
@@ -379,7 +379,7 @@ VDBRepository::repository_factory_dependencies(
const Environment * const,
const std::function<std::string (const std::string &)> &)
{
- return make_shared_ptr(new RepositoryNameSet);
+ return std::make_shared<RepositoryNameSet>();
}
VDBRepositoryConfigurationError::VDBRepositoryConfigurationError(
@@ -495,7 +495,7 @@ VDBRepository::perform_uninstall(
n::ebuild_file() = pkg_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"),
n::eclassdirs() = eclassdirs,
n::environment() = _imp->params.environment(),
- n::exlibsdirs() = make_shared_ptr(new FSEntrySequence),
+ n::exlibsdirs() = std::make_shared<FSEntrySequence>(),
n::files_dir() = pkg_dir,
n::maybe_output_manager() = output_manager,
n::package_builddir() = package_builddir,
@@ -1110,7 +1110,7 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
q->insert(*p.package_ptr());
IDMap::iterator i(_imp->ids.find(*p.package_ptr()));
if (_imp->ids.end() == i)
- i = _imp->ids.insert(std::make_pair(*p.package_ptr(), make_shared_ptr(new PackageIDSequence))).first;
+ i = _imp->ids.insert(std::make_pair(*p.package_ptr(), std::make_shared<PackageIDSequence>())).first;
i->second->push_back(make_id(*p.package_ptr(), p.version_requirements_ptr()->begin()->version_spec(), *d));
}
}
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index acf0718a8..83e9a28b7 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -40,6 +40,7 @@
#include <paludis/choice.hh>
#include <paludis/util/indirect_iterator-impl.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -61,7 +62,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m,
@@ -354,7 +355,7 @@ namespace test_cases
n::destination() = vdb_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &do_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
@@ -484,7 +485,7 @@ namespace test_cases
n::destination() = vdb_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &do_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
@@ -1210,7 +1211,7 @@ namespace test_cases
n::destination() = vdb_repo,
n::make_output_manager() = &make_standard_output_manager,
n::perform_uninstall() = &do_uninstall,
- n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::replacing() = std::make_shared<PackageIDSequence>(),
n::want_phase() = &want_all_phases
));
diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc
index 462b67ac5..b6ed26399 100644
--- a/paludis/repositories/e/vdb_unmerger_TEST.cc
+++ b/paludis/repositories/e/vdb_unmerger_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/environments/test/test_environment.hh>
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/map.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/sequence.hh>
@@ -127,7 +126,7 @@ namespace
n::config_protect_mask() = "/protected_dir/unprotected_file /protected_dir/unprotected_dir",
n::environment() = &env,
n::ignore() = &ignore_nothing,
- n::output_manager() = make_shared_ptr(new StandardOutputManager),
+ n::output_manager() = std::make_shared<StandardOutputManager>(),
n::package_id() = *env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/" + fix(what), &env, UserPackageDepSpecOptions()),
MatchPackageOptions()))]->begin(),
diff --git a/paludis/repositories/e/xml_things.cc b/paludis/repositories/e/xml_things.cc
index 0813162e8..c8520be20 100644
--- a/paludis/repositories/e/xml_things.cc
+++ b/paludis/repositories/e/xml_things.cc
@@ -20,7 +20,6 @@
#include <paludis/repositories/e/xml_things.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/map.hh>
#include <paludis/util/tokeniser.hh>
@@ -286,10 +285,10 @@ paludis_xml_things_create_metadata_xml_from_xml_file(const FSEntry & filename)
{
std::shared_ptr<erepository::MetadataXML> result(new erepository::MetadataXML(
make_named_values<erepository::MetadataXML>(
- n::herds() = make_shared_ptr(new Sequence<std::string>),
+ n::herds() = std::make_shared<Sequence<std::string>>(),
n::long_description() = "",
- n::maintainers() = make_shared_ptr(new Sequence<std::string>),
- n::uses() = make_shared_ptr(new Map<ChoiceNameWithPrefix, std::string>)
+ n::maintainers() = std::make_shared<Sequence<std::string>>(),
+ n::uses() = std::make_shared<Map<ChoiceNameWithPrefix, std::string>>()
)));
std::shared_ptr<xmlDoc> doc(manage_libxml_ptr(xmlParseFile(stringify(filename).c_str()), &xmlFreeDoc));