aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 12:52:10 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 18:55:26 +0100
commitf7be9952e67a5cdad6f3531a22654db198e7d106 (patch)
tree54c8fae2eaaf89851c038d28ed6deb9096c87b4d /paludis/repositories
parent84f32a46c9bd03039af31be9626206ce891fa841 (diff)
downloadpaludis-f7be9952e67a5cdad6f3531a22654db198e7d106.tar.gz
paludis-f7be9952e67a5cdad6f3531a22654db198e7d106.tar.xz
Use std::make_shared<>
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.cc8
-rw-r--r--paludis/repositories/accounts/accounts_id.cc8
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc14
-rw-r--r--paludis/repositories/accounts/accounts_repository_store.cc23
-rw-r--r--paludis/repositories/accounts/installed_accounts_id.cc4
-rw-r--r--paludis/repositories/cran/cran_dep_parser.cc3
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc4
-rw-r--r--paludis/repositories/cran/cran_package_id.cc30
-rw-r--r--paludis/repositories/cran/cran_repository.cc6
-rw-r--r--paludis/repositories/cran/keys.cc3
-rw-r--r--paludis/repositories/cran/package_dep_spec.cc2
-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
-rw-r--r--paludis/repositories/fake/dep_parser.cc27
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc8
-rw-r--r--paludis/repositories/fake/fake_package_id.cc29
-rw-r--r--paludis/repositories/fake/fake_repository.cc2
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc1
-rw-r--r--paludis/repositories/fake/registration.cc3
-rw-r--r--paludis/repositories/gems/extra_distribution_data.cc5
-rw-r--r--paludis/repositories/gems/gem_specification.cc5
-rw-r--r--paludis/repositories/gems/gem_specifications.cc3
-rw-r--r--paludis/repositories/gems/gems_repository.cc20
-rw-r--r--paludis/repositories/gems/gems_repository_TEST.cc5
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc24
-rw-r--r--paludis/repositories/gems/registration.cc3
-rw-r--r--paludis/repositories/gems/yaml.cc3
-rw-r--r--paludis/repositories/repository/repository_id.cc4
-rw-r--r--paludis/repositories/repository/repository_repository.cc5
-rw-r--r--paludis/repositories/repository/repository_repository_store.cc11
-rw-r--r--paludis/repositories/unavailable/unavailable_package_id.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc5
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc3
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_id.cc6
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.cc20
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc16
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc10
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc9
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc12
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc7
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc14
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc6
-rw-r--r--paludis/repositories/unwritten/unwritten_id.cc4
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc5
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_file.cc3
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_store.cc15
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc12
-rw-r--r--paludis/repositories/virtuals/package_id.cc26
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc14
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc29
94 files changed, 482 insertions, 527 deletions
diff --git a/paludis/repositories/accounts/accounts_dep_key.cc b/paludis/repositories/accounts/accounts_dep_key.cc
index fafcb0ca9..6627343f5 100644
--- a/paludis/repositories/accounts/accounts_dep_key.cc
+++ b/paludis/repositories/accounts/accounts_dep_key.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009 Ciaran McCreesh
+ * Copyright (c) 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
@@ -48,7 +48,7 @@ namespace paludis
Implementation(const Environment * const e, const std::shared_ptr<const Set<std::string> > & s) :
env(e),
specs(new std::list<std::shared_ptr<PackageDepSpec> >),
- tree(new DependencySpecTree(make_shared_ptr(new AllDepSpec))),
+ tree(new DependencySpecTree(std::make_shared<AllDepSpec>())),
initial_labels(new DependenciesLabelSequence)
{
for (Set<std::string>::ConstIterator i(s->begin()), i_end(s->end()) ;
@@ -60,8 +60,8 @@ namespace paludis
tree->root()->append(spec);
}
- initial_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build", return_literal_function(true))));
- initial_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run", return_literal_function(true))));
+ initial_labels->push_back(std::make_shared<DependenciesBuildLabel>("build", return_literal_function(true)));
+ initial_labels->push_back(std::make_shared<DependenciesRunLabel>("run", return_literal_function(true)));
}
};
}
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index c84fac76f..40c00f58b 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -21,7 +21,6 @@
#include <paludis/repositories/accounts/accounts_dep_key.hh>
#include <paludis/repositories/accounts/accounts_installed_mask.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/options.hh>
#include <paludis/util/stringify.hh>
@@ -31,6 +30,7 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/output_manager.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
@@ -86,7 +86,7 @@ namespace paludis
repository(r),
fs_location_key(new LiteralMetadataValueKey<FSEntry>("location", "Location", mkt_internal, l)),
from_repositories_key(f),
- mask(m ? make_shared_ptr(new AccountsInstalledMask) : make_null_shared_ptr()),
+ mask(m ? std::make_shared<AccountsInstalledMask>() : make_null_shared_ptr()),
is_user(u),
has_file_keys(false),
has_metadata_keys(false)
@@ -424,7 +424,7 @@ AccountsID::slot_key() const
std::shared_ptr<const Set<std::string> >
AccountsID::breaks_portage() const
{
- return make_shared_ptr(new Set<std::string>);
+ return std::make_shared<Set<std::string>>();
}
bool
@@ -491,7 +491,7 @@ AccountsID::perform_action(Action & action) const
n::build_start_time() = build_start_time,
n::environment_file() = FSEntry("/dev/null"),
n::image_dir() = fs_location_key()->value(),
- 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() = output_manager,
n::package_id() = shared_from_this(),
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index 07aba8d75..ae53bffe8 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -24,12 +24,12 @@
#include <paludis/repositories/accounts/passwd_accounts_handler.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/active_object_ptr.hh>
#include <paludis/util/deferred_construction_ptr.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/dep_tag.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
@@ -49,9 +49,9 @@ namespace
std::shared_ptr<AccountsHandler> make_handler(const std::string & handler)
{
if (handler == "dummy")
- return make_shared_ptr(new DummyAccountsHandler);
+ return std::make_shared<DummyAccountsHandler>();
else if (handler == "passwd")
- return make_shared_ptr(new PasswdAccountsHandler);
+ return std::make_shared<PasswdAccountsHandler>();
else
throw AccountsRepositoryConfigurationError("Unknown accounts handler '" + handler + "'");
}
@@ -59,13 +59,13 @@ namespace
std::shared_ptr<AccountsRepositoryStore>
make_store(const AccountsRepository * const repo, const AccountsRepositoryParams & p)
{
- return make_shared_ptr(new AccountsRepositoryStore(p.environment(), repo, false));
+ return std::make_shared<AccountsRepositoryStore>(p.environment(), repo, false);
}
std::shared_ptr<AccountsRepositoryStore>
make_installed_store(const AccountsRepository * const repo, const InstalledAccountsRepositoryParams & p)
{
- return make_shared_ptr(new AccountsRepositoryStore(p.environment(), repo, true));
+ return std::make_shared<AccountsRepositoryStore>(p.environment(), repo, true);
}
}
@@ -236,7 +236,7 @@ AccountsRepository::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>();
}
std::shared_ptr<const RepositoryNameSet>
@@ -244,7 +244,7 @@ AccountsRepository::repository_factory_installed_dependencies(
const Environment * const,
const std::function<std::string (const std::string &)> &)
{
- return make_shared_ptr(new RepositoryNameSet);
+ return std::make_shared<RepositoryNameSet>();
}
const std::shared_ptr<const MetadataValueKey<std::string> >
diff --git a/paludis/repositories/accounts/accounts_repository_store.cc b/paludis/repositories/accounts/accounts_repository_store.cc
index 66f031597..4d00751ce 100644
--- a/paludis/repositories/accounts/accounts_repository_store.cc
+++ b/paludis/repositories/accounts/accounts_repository_store.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009 Ciaran McCreesh
+ * Copyright (c) 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
@@ -24,7 +24,6 @@
#include <paludis/repositories/accounts/accounts_exceptions.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/sequence.hh>
@@ -201,20 +200,20 @@ AccountsRepositoryStore::_load_one_user(
PackageNames::iterator p(_imp->package_names.find(cat));
if (p == _imp->package_names.end())
- p = _imp->package_names.insert(std::make_pair(cat, make_shared_ptr(new QualifiedPackageNameSet))).first;
+ p = _imp->package_names.insert(std::make_pair(cat, std::make_shared<QualifiedPackageNameSet>())).first;
p->second->insert(qpn);
IDs::iterator q(_imp->ids.find(qpn));
if (q == _imp->ids.end())
- q = _imp->ids.insert(std::make_pair(qpn, make_shared_ptr(new PackageIDSequence))).first;
+ q = _imp->ids.insert(std::make_pair(qpn, std::make_shared<PackageIDSequence>())).first;
else
q->second.reset(new PackageIDSequence);
if (_imp->installed)
- q->second->push_back(make_shared_ptr(new InstalledAccountsID(_imp->env, qpn, repo, true)));
+ q->second->push_back(std::make_shared<InstalledAccountsID>(_imp->env, qpn, repo, true));
else
- q->second->push_back(make_shared_ptr(new AccountsID(_imp->env, qpn, repo, from_repo, filename, true, masked)));
+ q->second->push_back(std::make_shared<AccountsID>(_imp->env, qpn, repo, from_repo, filename, true, masked));
}
void
@@ -257,20 +256,20 @@ AccountsRepositoryStore::_load_one_group(
PackageNames::iterator p(_imp->package_names.find(cat));
if (p == _imp->package_names.end())
- p = _imp->package_names.insert(std::make_pair(cat, make_shared_ptr(new QualifiedPackageNameSet))).first;
+ p = _imp->package_names.insert(std::make_pair(cat, std::make_shared<QualifiedPackageNameSet>())).first;
p->second->insert(qpn);
IDs::iterator q(_imp->ids.find(qpn));
if (q == _imp->ids.end())
- q = _imp->ids.insert(std::make_pair(qpn, make_shared_ptr(new PackageIDSequence))).first;
+ q = _imp->ids.insert(std::make_pair(qpn, std::make_shared<PackageIDSequence>())).first;
else
q->second.reset(new PackageIDSequence);
if (_imp->installed)
- q->second->push_back(make_shared_ptr(new InstalledAccountsID(_imp->env, qpn, repo, false)));
+ q->second->push_back(std::make_shared<InstalledAccountsID>(_imp->env, qpn, repo, false));
else
- q->second->push_back(make_shared_ptr(new AccountsID(_imp->env, qpn, repo, from_repo, filename, false, masked)));
+ q->second->push_back(std::make_shared<AccountsID>(_imp->env, qpn, repo, from_repo, filename, false, masked));
}
bool
@@ -302,7 +301,7 @@ AccountsRepositoryStore::package_names(const CategoryNamePart & c) const
{
PackageNames::iterator p(_imp->package_names.find(c));
if (_imp->package_names.end() == p)
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
else
return p->second;
}
@@ -312,7 +311,7 @@ AccountsRepositoryStore::package_ids(const QualifiedPackageName & p) const
{
IDs::iterator i(_imp->ids.find(p));
if (_imp->ids.end() == i)
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
else
return i->second;
}
diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc
index f1ba85513..1305da39c 100644
--- a/paludis/repositories/accounts/installed_accounts_id.cc
+++ b/paludis/repositories/accounts/installed_accounts_id.cc
@@ -20,7 +20,6 @@
#include <paludis/repositories/accounts/installed_accounts_id.hh>
#include <paludis/repositories/accounts/accounts_dep_key.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/options.hh>
#include <paludis/util/stringify.hh>
@@ -30,6 +29,7 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/literal_metadata_key.hh>
@@ -356,7 +356,7 @@ InstalledAccountsID::slot_key() const
std::shared_ptr<const Set<std::string> >
InstalledAccountsID::breaks_portage() const
{
- return make_shared_ptr(new Set<std::string>);
+ return std::make_shared<Set<std::string> >();
}
bool
diff --git a/paludis/repositories/cran/cran_dep_parser.cc b/paludis/repositories/cran/cran_dep_parser.cc
index bf46ef1b7..73d84f5a2 100644
--- a/paludis/repositories/cran/cran_dep_parser.cc
+++ b/paludis/repositories/cran/cran_dep_parser.cc
@@ -25,7 +25,6 @@
#include <paludis/util/strip.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <string>
#include <list>
@@ -37,7 +36,7 @@ cranrepository::parse_depends(const std::string & s)
{
Context context("When parsing CRAN 'Depends:' string: '" + s + "':");
- std::shared_ptr<DependencySpecTree> result(new DependencySpecTree(make_shared_ptr(new AllDepSpec)));
+ std::shared_ptr<DependencySpecTree> result(new DependencySpecTree(std::make_shared<AllDepSpec>()));
std::list<std::string> specs;
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index e64fe2542..7faffb2c8 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -37,7 +37,6 @@
#include <paludis/repositories/cran/cran_dep_parser.hh>
#include <paludis/repositories/cran/cran_installed_repository.hh>
#include <paludis/repositories/cran/package_dep_spec.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/sequence.hh>
@@ -51,6 +50,7 @@
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <unordered_map>
#include <functional>
#include <algorithm>
@@ -413,7 +413,7 @@ CRANInstalledRepository::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>();
}
CRANInstalledRepositoryConfigurationError::CRANInstalledRepositoryConfigurationError(
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index 8f79e6bca..7ddb4d3bc 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -31,9 +31,9 @@
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/return_literal_function.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
@@ -86,8 +86,8 @@ namespace paludis
suggests_labels(new DependenciesLabelSequence),
depends_labels(new DependenciesLabelSequence)
{
- suggests_labels->push_back(make_shared_ptr(new DependenciesSuggestionLabel("Suggests", return_literal_function(true))));
- depends_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("Depends", return_literal_function(true))));
+ suggests_labels->push_back(std::make_shared<DependenciesSuggestionLabel>("Suggests", return_literal_function(true)));
+ depends_labels->push_back(std::make_shared<DependenciesBuildLabel>("Depends", return_literal_function(true)));
}
Implementation(const Environment * const e,
@@ -101,8 +101,8 @@ namespace paludis
suggests_labels(new DependenciesLabelSequence),
depends_labels(new DependenciesLabelSequence)
{
- suggests_labels->push_back(make_shared_ptr(new DependenciesSuggestionLabel("Suggests", return_literal_function(true))));
- depends_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("Depends", return_literal_function(true))));
+ suggests_labels->push_back(std::make_shared<DependenciesSuggestionLabel>("Suggests", return_literal_function(true)));
+ depends_labels->push_back(std::make_shared<DependenciesBuildLabel>("Depends", return_literal_function(true)));
}
};
}
@@ -115,7 +115,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
if (! f.is_regular_file())
{
- add_mask(make_shared_ptr(new BrokenMask('B', "Broken", "DESCRIPTION file not a file")));
+ add_mask(std::make_shared<BrokenMask>('B', "Broken", "DESCRIPTION file not a file"));
Log::get_instance()->message("cran.id.not_a_file", ll_warning, lc_context) << "Unexpected irregular file: '" << stringify(f) << "'";
return;
}
@@ -144,7 +144,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
else
{
Log::get_instance()->message("cran.id.broken", ll_warning, lc_context) << "No Package: or Bundle: key in '" << stringify(f) << "'";
- add_mask(make_shared_ptr(new BrokenMask('B', "Broken", "No Package: or Bundle: key")));
+ add_mask(std::make_shared<BrokenMask>('B', "Broken", "No Package: or Bundle: key"));
return;
}
@@ -153,7 +153,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
Context local_context("When handling Version: key:");
Log::get_instance()->message("cran.id.broken", ll_warning, lc_context) << "No Version: key in '" << stringify(f) << "'";
_imp->version = VersionSpec("0", VersionSpecOptions());
- add_mask(make_shared_ptr(new BrokenMask('B', "Broken", "No Version: key")));
+ add_mask(std::make_shared<BrokenMask>('B', "Broken", "No Version: key"));
return;
}
else
@@ -202,19 +202,19 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
{
Context local_context("When handling Date: key:");
/* no guarantee on the format */
- add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("Date", "Date", mkt_normal, file.get("Date"))));
+ add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("Date", "Date", mkt_normal, file.get("Date")));
}
if (! file.get("Author").empty())
{
Context local_context("When handling Author: key:");
- add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("Author", "Author", mkt_author, file.get("Author"))));
+ add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("Author", "Author", mkt_author, file.get("Author")));
}
if (! file.get("Maintainer").empty())
{
Context local_context("When handling Maintainer: key:");
- add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("Maintainer", "Maintainer", mkt_author, file.get("Maintainer"))));
+ add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("Maintainer", "Maintainer", mkt_author, file.get("Maintainer")));
}
if (! file.get("Contains").empty())
@@ -228,7 +228,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
t != t_end ; ++t)
{
if (*t != stringify(name().package()))
- _imp->contains_key->push_back(make_shared_ptr(new CRANPackageID(_imp->env, _imp->cran_repository, this, *t)));
+ _imp->contains_key->push_back(std::make_shared<CRANPackageID>(_imp->env, _imp->cran_repository, this, *t));
else
{
/* yay CRAN... */
@@ -249,8 +249,8 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
if (! file.get("SystemRequirements").empty())
{
Context local_context("When handling SystemRequirements: key:");
- add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("SystemRequirements", "System Requirements", mkt_normal,
- file.get("SystemRequirements"))));
+ add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("SystemRequirements", "System Requirements", mkt_normal,
+ file.get("SystemRequirements")));
}
if (! file.get("Depends").empty())
@@ -271,7 +271,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
{
Log::get_instance()->message("cran.id.broken", ll_warning, lc_context) << "Broken CRAN description file '" << stringify(f) << "': '"
<< e.message() << "' (" << e.what() << ")";
- add_mask(make_shared_ptr(new BrokenMask('B', "Broken", "Got exception '" + stringify(e.message()) + "' (" + e.what() + "')")));
+ add_mask(std::make_shared<BrokenMask>('B', "Broken", "Got exception '" + stringify(e.message()) + "' (" + e.what() + "')"));
}
}
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index d4fc874de..d6cc72a80 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -34,7 +34,6 @@
#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
@@ -47,6 +46,7 @@
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/extract_host_from_url.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/output_manager.hh>
#include <paludis/syncer.hh>
#include <paludis/hook.hh>
@@ -117,7 +117,7 @@ CRANRepository::CRANRepository(const CRANRepositoryParams & p) :
n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
- PrivateImplementationPattern<CRANRepository>(new Implementation<CRANRepository>(p, make_shared_ptr(new Mutex))),
+ PrivateImplementationPattern<CRANRepository>(new Implementation<CRANRepository>(p, std::make_shared<Mutex>())),
_imp(PrivateImplementationPattern<CRANRepository>::_imp)
{
_add_metadata_keys();
@@ -446,7 +446,7 @@ CRANRepository::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>();
}
CRANRepositoryConfigurationError::CRANRepositoryConfigurationError(
diff --git a/paludis/repositories/cran/keys.cc b/paludis/repositories/cran/keys.cc
index c3adc4b64..3a005570d 100644
--- a/paludis/repositories/cran/keys.cc
+++ b/paludis/repositories/cran/keys.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/cran/cran_package_id.hh>
#include <paludis/repositories/cran/cran_dep_parser.hh>
#include <paludis/repositories/cran/dep_spec_pretty_printer.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/join.hh>
diff --git a/paludis/repositories/cran/package_dep_spec.cc b/paludis/repositories/cran/package_dep_spec.cc
index f38d8b7cf..442ac2917 100644
--- a/paludis/repositories/cran/package_dep_spec.cc
+++ b/paludis/repositories/cran/package_dep_spec.cc
@@ -23,9 +23,9 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/options.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/dep_spec.hh>
#include <paludis/version_operator.hh>
#include <paludis/version_spec.hh>
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));
diff --git a/paludis/repositories/fake/dep_parser.cc b/paludis/repositories/fake/dep_parser.cc
index 973444a46..d2e3465b0 100644
--- a/paludis/repositories/fake/dep_parser.cc
+++ b/paludis/repositories/fake/dep_parser.cc
@@ -18,7 +18,6 @@
*/
#include <paludis/repositories/fake/dep_parser.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/options.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/make_named_values.hh>
@@ -58,7 +57,7 @@ namespace
+ epdso_strict_parsing,
user_version_spec_options(),
id));
- (*h.begin())->append(make_shared_ptr(new PackageDepSpec(p)));
+ (*h.begin())->append(std::make_shared<PackageDepSpec>(p));
}
template <typename T_>
@@ -67,14 +66,14 @@ namespace
{
if ((! s.empty()) && ('!' == s.at(0)))
{
- (*h.begin())->append(make_shared_ptr(new BlockDepSpec(s,
+ (*h.begin())->append(std::make_shared<BlockDepSpec>(s,
parse_elike_package_dep_spec(s.substr(1),
ELikePackageDepSpecOptions() + epdso_allow_slot_deps
+ epdso_allow_slot_star_deps + epdso_allow_slot_equal_deps + epdso_allow_repository_deps
+ epdso_allow_use_deps + epdso_allow_ranged_deps + epdso_allow_tilde_greater_deps
+ epdso_strict_parsing,
user_version_spec_options(),
- id), false)));
+ id), false));
}
else
package_dep_spec_string_handler<T_>(h, s, id);
@@ -83,19 +82,19 @@ namespace
template <typename T_>
void license_handler(const typename ParseStackTypes<T_>::Stack & h, const std::string & s)
{
- (*h.begin())->append(make_shared_ptr(new LicenseDepSpec(s)));
+ (*h.begin())->append(std::make_shared<LicenseDepSpec>(s));
}
template <typename T_>
void simple_uri_handler(const typename ParseStackTypes<T_>::Stack & h, const std::string & s)
{
- (*h.begin())->append(make_shared_ptr(new SimpleURIDepSpec(s)));
+ (*h.begin())->append(std::make_shared<SimpleURIDepSpec>(s));
}
template <typename T_>
void arrow_handler(const typename ParseStackTypes<T_>::Stack & h, const std::string & s, const std::string & t)
{
- (*h.begin())->append(make_shared_ptr(new FetchableURIDepSpec(t.empty() ? s : s + " -> " + t)));
+ (*h.begin())->append(std::make_shared<FetchableURIDepSpec>(t.empty() ? s : s + " -> " + t));
}
void any_not_allowed_handler(const std::string & s) PALUDIS_ATTRIBUTE((noreturn));
@@ -129,7 +128,7 @@ namespace
template <typename T_, typename A_>
void any_all_handler(typename ParseStackTypes<T_>::Stack & stack)
{
- stack.push_front((*stack.begin())->append(make_shared_ptr(new A_)));
+ stack.push_front((*stack.begin())->append(std::make_shared<A_>()));
}
template <typename T_>
@@ -137,7 +136,7 @@ namespace
const Environment * const env, const std::shared_ptr<const PackageID> & id)
{
stack.push_front((*stack.begin())->append(
- make_shared_ptr(new ConditionalDepSpec(parse_elike_conditional_dep_spec(u, env, id, false)))));
+ std::make_shared<ConditionalDepSpec>(parse_elike_conditional_dep_spec(u, env, id, false))));
}
template <typename T_>
@@ -171,7 +170,7 @@ paludis::fakerepository::parse_depend(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<DependencySpecTree>::Stack stack;
- std::shared_ptr<DependencySpecTree> top(make_shared_ptr(new DependencySpecTree(make_shared_ptr(new AllDepSpec))));
+ std::shared_ptr<DependencySpecTree> top(std::make_shared<DependencySpecTree>(std::make_shared<AllDepSpec>()));
stack.push_front(top->root());
ELikeDepParserCallbacks callbacks(
@@ -201,7 +200,7 @@ paludis::fakerepository::parse_provide(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<ProvideSpecTree>::Stack stack;
- std::shared_ptr<ProvideSpecTree> top(make_shared_ptr(new ProvideSpecTree(make_shared_ptr(new AllDepSpec))));
+ std::shared_ptr<ProvideSpecTree> top(std::make_shared<ProvideSpecTree>(std::make_shared<AllDepSpec>()));
stack.push_front(top->root());
ELikeDepParserCallbacks callbacks(
@@ -231,7 +230,7 @@ paludis::fakerepository::parse_fetchable_uri(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<FetchableURISpecTree>::Stack stack;
- std::shared_ptr<FetchableURISpecTree> top(make_shared_ptr(new FetchableURISpecTree(make_shared_ptr(new AllDepSpec))));
+ std::shared_ptr<FetchableURISpecTree> top(std::make_shared<FetchableURISpecTree>(std::make_shared<AllDepSpec>()));
stack.push_front(top->root());
ELikeDepParserCallbacks callbacks(
@@ -261,7 +260,7 @@ paludis::fakerepository::parse_simple_uri(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<SimpleURISpecTree>::Stack stack;
- std::shared_ptr<SimpleURISpecTree> top(make_shared_ptr(new SimpleURISpecTree(make_shared_ptr(new AllDepSpec))));
+ std::shared_ptr<SimpleURISpecTree> top(std::make_shared<SimpleURISpecTree>(std::make_shared<AllDepSpec>()));
stack.push_front(top->root());
ELikeDepParserCallbacks callbacks(
@@ -291,7 +290,7 @@ paludis::fakerepository::parse_license(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<LicenseSpecTree>::Stack stack;
- std::shared_ptr<LicenseSpecTree> top(make_shared_ptr(new LicenseSpecTree(make_shared_ptr(new AllDepSpec))));
+ std::shared_ptr<LicenseSpecTree> top(std::make_shared<LicenseSpecTree>(std::make_shared<AllDepSpec>()));
stack.push_front(top->root());
ELikeDepParserCallbacks callbacks(
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 48f23a144..a13d7bcd4 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -21,8 +21,8 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/set.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/util/wrapped_forward_iterator.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
@@ -237,12 +237,12 @@ FakeInstalledRepository::repository_factory_create(
Context context("When creating FakeInstalledRepository:");
RepositoryName name(f("name"));
- return make_shared_ptr(new FakeInstalledRepository(make_named_values<FakeInstalledRepositoryParams>(
+ return std::make_shared<FakeInstalledRepository>(make_named_values<FakeInstalledRepositoryParams>(
n::environment() = env,
n::name() = name,
n::suitable_destination() = true,
n::supports_uninstall() = true
- )));
+ ));
}
std::shared_ptr<const RepositoryNameSet>
@@ -250,7 +250,7 @@ FakeInstalledRepository::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>();
}
const std::shared_ptr<const MetadataValueKey<std::string> >
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index ae2981b0c..db1ac5af2 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -40,6 +40,7 @@
#include <paludis/util/tribool.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/return_literal_function.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <map>
@@ -578,8 +579,8 @@ FakeMetadataChoicesKey::add(const std::string & n, const std::string & v)
_imp->choices.insert(std::make_pair(n, c));
}
- _imp->choices.find(n)->second->add(make_shared_ptr(new FakeChoiceValue(_imp->env, _imp->id,
- _imp->choices.find(n)->second, UnprefixedChoiceName(v))));
+ _imp->choices.find(n)->second->add(std::make_shared<FakeChoiceValue>(_imp->env, _imp->id,
+ _imp->choices.find(n)->second, UnprefixedChoiceName(v)));
}
const std::shared_ptr<const Choices>
@@ -733,14 +734,14 @@ namespace paludis
behaviours_set(new Set<std::string>),
has_masks(false)
{
- 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))));
- suggested_dependencies_labels->push_back(make_shared_ptr(new DependenciesSuggestionLabel("SDEPEND",
- 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)));
+ suggested_dependencies_labels->push_back(std::make_shared<DependenciesSuggestionLabel>("SDEPEND",
+ return_literal_function(true)));
}
};
}
@@ -1140,14 +1141,14 @@ FakePackageID::need_masks_added() const
if (keywords_key())
if (! _imp->env->accept_keywords(keywords_key()->value(), *this))
- add_mask(make_shared_ptr(new FakeUnacceptedMask('K', "keywords", keywords_key())));
+ add_mask(std::make_shared<FakeUnacceptedMask>('K', "keywords", keywords_key()));
if (license_key())
{
LicenceChecker c(_imp->env, &Environment::accept_license, this);
license_key()->value()->root()->accept(c);
if (! c.ok)
- add_mask(make_shared_ptr(new FakeUnacceptedMask('L', "license", license_key())));
+ add_mask(std::make_shared<FakeUnacceptedMask>('L', "license", license_key()));
}
if (! _imp->env->unmasked_by_user(*this))
@@ -1160,11 +1161,11 @@ FakePackageID::need_masks_added() const
{
std::shared_ptr<const Mask> user_mask(_imp->env->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
- ))));
+ )));
}
std::shared_ptr<const Mask> breaks_mask(_imp->env->mask_for_breakage(*this));
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index a4273975b..d8e2d484e 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -21,10 +21,10 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/distribution.hh>
#include <paludis/environment.hh>
#include <paludis/package_id.hh>
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 692221e32..7ef36f1a6 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -22,7 +22,6 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_output_iterator.hh>
diff --git a/paludis/repositories/fake/registration.cc b/paludis/repositories/fake/registration.cc
index 056b2ae23..afe87e926 100644
--- a/paludis/repositories/fake/registration.cc
+++ b/paludis/repositories/fake/registration.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
@@ -19,7 +19,6 @@
#include <paludis/repository_factory.hh>
#include <paludis/repositories/fake/fake_installed_repository.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/destringify.hh>
#include <paludis/util/set.hh>
#include <paludis/environment.hh>
diff --git a/paludis/repositories/gems/extra_distribution_data.cc b/paludis/repositories/gems/extra_distribution_data.cc
index 4a1edc98e..031e1ed81 100644
--- a/paludis/repositories/gems/extra_distribution_data.cc
+++ b/paludis/repositories/gems/extra_distribution_data.cc
@@ -19,7 +19,6 @@
#include <paludis/repositories/gems/extra_distribution_data.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/singleton-impl.hh>
#include <paludis/distribution-impl.hh>
@@ -38,9 +37,9 @@ namespace paludis
static std::shared_ptr<GemsDistribution> make_data(const std::shared_ptr<const KeyValueConfigFile> & k)
{
- return make_shared_ptr(new GemsDistribution(make_named_values<GemsDistribution>(
+ return std::make_shared<GemsDistribution>(make_named_values<GemsDistribution>(
n::default_buildroot() = k->get("default_buildroot")
- )));
+ ));
}
};
}
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index d8cc15d0e..3f6fe70c9 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -23,6 +23,7 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/repository.hh>
@@ -607,11 +608,11 @@ GemSpecification::need_masks_added() const
{
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
- ))));
+ )));
}
/* break portage */
diff --git a/paludis/repositories/gems/gem_specifications.cc b/paludis/repositories/gems/gem_specifications.cc
index 3d0faaacb..0df3021e8 100644
--- a/paludis/repositories/gems/gem_specifications.cc
+++ b/paludis/repositories/gems/gem_specifications.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
@@ -25,7 +25,6 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/hashes.hh>
#include <unordered_map>
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 9a9ea0450..848bd57ac 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -26,7 +26,6 @@
#include <paludis/repositories/gems/extra_distribution_data.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/system.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
@@ -34,6 +33,7 @@
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/safe_ifstream.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/action.hh>
#include <paludis/metadata_key.hh>
#include <paludis/literal_metadata_key.hh>
@@ -67,7 +67,7 @@ namespace paludis
std::shared_ptr<const MetadataValueKey<std::string> > sync_options_key;
std::shared_ptr<const MetadataValueKey<std::string> > format_key;
- Implementation(const gems::RepositoryParams p, std::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
+ Implementation(const gems::RepositoryParams p, std::shared_ptr<Mutex> m = std::make_shared<Mutex>()) :
params(p),
big_nasty_mutex(m),
has_category_names(false),
@@ -179,14 +179,14 @@ GemsRepository::package_names(const CategoryNamePart & c) const
Lock l(*_imp->big_nasty_mutex);
if (! has_category_named(c))
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
need_ids();
std::unordered_map<CategoryNamePart, std::shared_ptr<const QualifiedPackageNameSet>, Hash<CategoryNamePart> >::const_iterator i(
_imp->package_names.find(c));
if (i == _imp->package_names.end())
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
return i->second;
}
@@ -196,14 +196,14 @@ GemsRepository::package_ids(const QualifiedPackageName & q) const
Lock l(*_imp->big_nasty_mutex);
if (! has_package_named(q))
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
need_ids();
std::unordered_map<QualifiedPackageName, std::shared_ptr<PackageIDSequence>, Hash<QualifiedPackageName> >::const_iterator i(
_imp->ids.find(q));
if (i == _imp->ids.end())
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
return i->second;
}
@@ -252,7 +252,7 @@ GemsRepository::need_ids() const
std::unordered_map<QualifiedPackageName, std::shared_ptr<PackageIDSequence>, Hash<QualifiedPackageName> >::iterator
v(_imp->ids.find(i->first.first));
if (_imp->ids.end() == v)
- v = _imp->ids.insert(std::make_pair(i->first.first, make_shared_ptr(new PackageIDSequence))).first;
+ v = _imp->ids.insert(std::make_pair(i->first.first, std::make_shared<PackageIDSequence>())).first;
v->second->push_back(i->second);
}
@@ -382,14 +382,14 @@ GemsRepository::repository_factory_create(
builddir = gems::GemsExtraDistributionData::get_instance()->data_from_distribution(
*DistributionData::get_instance()->distribution_from_string(env->distribution()))->default_buildroot();
- return make_shared_ptr(new GemsRepository(make_named_values<gems::RepositoryParams>(
+ return std::make_shared<GemsRepository>(make_named_values<gems::RepositoryParams>(
n::builddir() = builddir,
n::environment() = env,
n::install_dir() = install_dir,
n::location() = location,
n::sync() = sync,
n::sync_options() = sync_options
- )));
+ ));
}
RepositoryName
@@ -405,7 +405,7 @@ GemsRepository::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
diff --git a/paludis/repositories/gems/gems_repository_TEST.cc b/paludis/repositories/gems/gems_repository_TEST.cc
index 858d953ba..d228075ad 100644
--- a/paludis/repositories/gems/gems_repository_TEST.cc
+++ b/paludis/repositories/gems/gems_repository_TEST.cc
@@ -21,7 +21,6 @@
#include <paludis/repositories/gems/gems_repository.hh>
#include <paludis/repositories/gems/params.hh>
#include <paludis/package_database.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -38,7 +37,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- env.package_database()->add_repository(1, make_shared_ptr(new GemsRepository(
+ env.package_database()->add_repository(1, std::make_shared<GemsRepository>(
make_named_values<gems::RepositoryParams>(
n::builddir() = FSEntry("gems_repository_TEST_dir/build"),
n::environment() = &env,
@@ -46,7 +45,7 @@ namespace test_cases
n::location() = FSEntry("gems_repository_TEST_dir/repo"),
n::sync() = "",
n::sync_options() = ""
- ))));
+ )));
}
} test_creation;
}
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index caebd7ca6..1c71e3f6a 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -31,13 +31,13 @@
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/is_file_with_extension.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/system.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/distribution.hh>
#include <paludis/action.hh>
@@ -75,7 +75,7 @@ namespace paludis
std::shared_ptr<const MetadataValueKey<std::string> > format_key;
Implementation(const gems::InstalledRepositoryParams p,
- std::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
+ std::shared_ptr<Mutex> m = std::make_shared<Mutex>()) :
big_nasty_mutex(m),
params(p),
has_category_names(false),
@@ -173,14 +173,14 @@ InstalledGemsRepository::package_names(const CategoryNamePart & c) const
Lock l(*_imp->big_nasty_mutex);
if (! has_category_named(c))
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
need_ids();
std::unordered_map<CategoryNamePart, std::shared_ptr<const QualifiedPackageNameSet>, Hash<CategoryNamePart> >::const_iterator i(
_imp->package_names.find(c));
if (i == _imp->package_names.end())
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
return i->second;
}
@@ -190,13 +190,13 @@ InstalledGemsRepository::package_ids(const QualifiedPackageName & q) const
Lock l(*_imp->big_nasty_mutex);
if (! has_package_named(q))
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
need_ids();
IDMap::const_iterator i(_imp->ids.find(q));
if (i == _imp->ids.end())
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
return i->second;
}
@@ -252,9 +252,9 @@ InstalledGemsRepository::need_ids() const
pkgs->insert(gems + p);
if (_imp->ids.end() == _imp->ids.find(gems + p))
- _imp->ids.insert(std::make_pair(gems + p, make_shared_ptr(new PackageIDSequence)));
- _imp->ids.find(gems + p)->second->push_back(make_shared_ptr(new gems::GemSpecification(
- _imp->params.environment(), shared_from_this(), p, v, *d)));
+ _imp->ids.insert(std::make_pair(gems + p, std::make_shared<PackageIDSequence>()));
+ _imp->ids.find(gems + p)->second->push_back(std::make_shared<gems::GemSpecification>(
+ _imp->params.environment(), shared_from_this(), p, v, *d));
}
}
@@ -396,7 +396,7 @@ InstalledGemsRepository::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>();
}
std::shared_ptr<Repository>
@@ -417,12 +417,12 @@ InstalledGemsRepository::repository_factory_create(
if (root.empty())
root = "/";
- return make_shared_ptr(new InstalledGemsRepository(make_named_values<gems::InstalledRepositoryParams>(
+ return std::make_shared<InstalledGemsRepository>(make_named_values<gems::InstalledRepositoryParams>(
n::builddir() = builddir,
n::environment() = env,
n::install_dir() = install_dir,
n::root() = root
- )));
+ ));
}
void
diff --git a/paludis/repositories/gems/registration.cc b/paludis/repositories/gems/registration.cc
index fbe81b661..d0698360e 100644
--- a/paludis/repositories/gems/registration.cc
+++ b/paludis/repositories/gems/registration.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
@@ -22,7 +22,6 @@
#include <paludis/repositories/gems/installed_gems_repository.hh>
#include <paludis/repositories/gems/params.hh>
#include <paludis/repositories/gems/exceptions.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/destringify.hh>
diff --git a/paludis/repositories/gems/yaml.cc b/paludis/repositories/gems/yaml.cc
index 6bcd6fa2b..824d38cb4 100644
--- a/paludis/repositories/gems/yaml.cc
+++ b/paludis/repositories/gems/yaml.cc
@@ -20,7 +20,6 @@
#include "yaml.hh"
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/singleton-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <functional>
#include <syck.h>
@@ -389,7 +388,7 @@ NodeManager::manage_node(const void * const d, const Node * const n)
std::map<const void *, std::list<std::shared_ptr<const Node> > >::iterator i(_imp->store.find(d));
if (i == _imp->store.end())
throw InternalError(PALUDIS_HERE, "no such document");
- i->second.push_back(make_shared_ptr(n));
+ i->second.push_back(std::shared_ptr<const Node>(n));
}
ParseError::ParseError(const std::string & s) throw () :
diff --git a/paludis/repositories/repository/repository_id.cc b/paludis/repositories/repository/repository_id.cc
index b504a8126..edf29f601 100644
--- a/paludis/repositories/repository/repository_id.cc
+++ b/paludis/repositories/repository/repository_id.cc
@@ -23,9 +23,9 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/metadata_key.hh>
@@ -161,7 +161,7 @@ RepositoryID::perform_action(Action & a) const
std::shared_ptr<const Set<std::string> >
RepositoryID::breaks_portage() const
{
- return make_shared_ptr(new Set<std::string>);
+ return std::make_shared<Set<std::string>>();
}
bool
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index 7ff8a40ae..0f153d408 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -29,6 +29,7 @@
#include <paludis/util/simple_parser.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/syncer.hh>
@@ -46,7 +47,7 @@ namespace
std::shared_ptr<RepositoryRepositoryStore>
make_store(const RepositoryRepository * const repo, const RepositoryRepositoryParams & p)
{
- return make_shared_ptr(new RepositoryRepositoryStore(p.environment(), repo));
+ return std::make_shared<RepositoryRepositoryStore>(p.environment(), repo);
}
}
@@ -316,7 +317,7 @@ RepositoryRepository::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
diff --git a/paludis/repositories/repository/repository_repository_store.cc b/paludis/repositories/repository/repository_repository_store.cc
index fb8a76ccf..96ae6171c 100644
--- a/paludis/repositories/repository/repository_repository_store.cc
+++ b/paludis/repositories/repository/repository_repository_store.cc
@@ -25,7 +25,6 @@
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_named_values.hh>
@@ -104,12 +103,12 @@ RepositoryRepositoryStore::_populate_one(const RepositoryName & repo_name)
PackageNames::iterator p(_imp->package_names.find(id->name().category()));
if (_imp->package_names.end() == p)
p = _imp->package_names.insert(std::make_pair(id->name().category(),
- make_shared_ptr(new QualifiedPackageNameSet))).first;
+ std::make_shared<QualifiedPackageNameSet>())).first;
p->second->insert(id->name());
IDs::iterator i(_imp->ids.find(id->name()));
if (_imp->ids.end() == i)
- i = _imp->ids.insert(std::make_pair(id->name(), make_shared_ptr(new PackageIDSequence))).first;
+ i = _imp->ids.insert(std::make_pair(id->name(), std::make_shared<PackageIDSequence>())).first;
i->second->push_back(id);
}
@@ -134,7 +133,7 @@ RepositoryRepositoryStore::category_names() const
std::shared_ptr<const CategoryNamePartSet>
RepositoryRepositoryStore::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("repository"));
return result;
}
@@ -144,7 +143,7 @@ RepositoryRepositoryStore::package_names(const CategoryNamePart & c) const
{
PackageNames::iterator p(_imp->package_names.find(c));
if (_imp->package_names.end() == p)
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
else
return p->second;
}
@@ -154,7 +153,7 @@ RepositoryRepositoryStore::package_ids(const QualifiedPackageName & p) const
{
IDs::iterator i(_imp->ids.find(p));
if (_imp->ids.end() == i)
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
else
return i->second;
}
diff --git a/paludis/repositories/unavailable/unavailable_package_id.cc b/paludis/repositories/unavailable/unavailable_package_id.cc
index 21c99eb28..179122533 100644
--- a/paludis/repositories/unavailable/unavailable_package_id.cc
+++ b/paludis/repositories/unavailable/unavailable_package_id.cc
@@ -23,9 +23,9 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/metadata_key.hh>
@@ -173,7 +173,7 @@ UnavailablePackageID::perform_action(Action & a) const
std::shared_ptr<const Set<std::string> >
UnavailablePackageID::breaks_portage() const
{
- return make_shared_ptr(new Set<std::string>);
+ return std::make_shared<Set<std::string>>();
}
bool
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index 59ac8fe58..d04a2eecc 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -26,6 +26,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/extract_host_from_url.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/syncer.hh>
@@ -40,7 +41,7 @@ namespace
std::shared_ptr<UnavailableRepositoryStore>
make_store(const UnavailableRepository * const repo, const UnavailableRepositoryParams & p)
{
- return make_shared_ptr(new UnavailableRepositoryStore(p.environment(), repo, p.location()));
+ return std::make_shared<UnavailableRepositoryStore>(p.environment(), repo, p.location());
}
}
@@ -348,7 +349,7 @@ UnavailableRepository::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
diff --git a/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc b/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
index 5b134a403..d603bf877 100644
--- a/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
@@ -20,7 +20,6 @@
#include <paludis/repositories/unavailable/unavailable_repository_dependencies_key.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/fs_entry.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/return_literal_function.hh>
@@ -55,7 +54,7 @@ namespace paludis
human_name(h),
type(t)
{
- labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build", return_literal_function(true))));
+ labels->push_back(std::make_shared<DependenciesBuildLabel>("build", return_literal_function(true)));
}
};
}
diff --git a/paludis/repositories/unavailable/unavailable_repository_id.cc b/paludis/repositories/unavailable/unavailable_repository_id.cc
index 58b4a6b07..882d65acc 100644
--- a/paludis/repositories/unavailable/unavailable_repository_id.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_id.cc
@@ -23,10 +23,10 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/metadata_key.hh>
@@ -207,7 +207,7 @@ UnavailableRepositoryID::perform_action(Action & action) const
n::build_start_time() = build_start_time,
n::environment_file() = FSEntry("/dev/null"),
n::image_dir() = FSEntry("/dev/null"),
- n::merged_entries() = make_shared_ptr(new FSEntrySet),
+ n::merged_entries() = std::make_shared<FSEntrySet>(),
n::options() = MergerOptions(),
n::output_manager() = output_manager,
n::package_id() = shared_from_this(),
@@ -251,7 +251,7 @@ UnavailableRepositoryID::perform_action(Action & action) const
std::shared_ptr<const Set<std::string> >
UnavailableRepositoryID::breaks_portage() const
{
- return make_shared_ptr(new Set<std::string>);
+ return std::make_shared<Set<std::string>>();
}
bool
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc
index e1fa9b5f4..aa170b74f 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_store.cc
@@ -30,10 +30,10 @@
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/literal_metadata_key.hh>
@@ -157,7 +157,7 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
PackageNames::iterator p(_imp->package_names.find((*i).name().category()));
if (_imp->package_names.end() == p)
p = _imp->package_names.insert(std::make_pair((*i).name().category(),
- make_shared_ptr(new QualifiedPackageNameSet))).first;
+ std::make_shared<QualifiedPackageNameSet>())).first;
pkgs = p->second;
}
@@ -167,12 +167,12 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
IDs::iterator p(_imp->ids.find((*i).name()));
if (_imp->ids.end() == p)
p = _imp->ids.insert(std::make_pair((*i).name(),
- make_shared_ptr(new PackageIDSequence))).first;
+ std::make_shared<PackageIDSequence>())).first;
ids = p->second;
}
- ids->push_back(make_shared_ptr(new UnavailablePackageID(make_named_values<UnavailablePackageIDParams>(
+ ids->push_back(std::make_shared<UnavailablePackageID>(make_named_values<UnavailablePackageIDParams>(
n::description() = (*i).description(),
n::environment() = env,
n::from_repositories() = from_repositories,
@@ -183,7 +183,7 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
n::repository_homepage() = repository_homepage,
n::slot() = (*i).slot(),
n::version() = (*i).version()
- ))));
+ )));
old_name = (*i).name();
}
@@ -215,12 +215,12 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
PackageNames::iterator p(_imp->package_names.find(id->name().category()));
if (_imp->package_names.end() == p)
p = _imp->package_names.insert(std::make_pair(id->name().category(),
- make_shared_ptr(new QualifiedPackageNameSet))).first;
+ std::make_shared<QualifiedPackageNameSet>())).first;
p->second->insert(id->name());
IDs::iterator i(_imp->ids.find(id->name()));
if (_imp->ids.end() == i)
- i = _imp->ids.insert(std::make_pair(id->name(), make_shared_ptr(new PackageIDSequence))).first;
+ i = _imp->ids.insert(std::make_pair(id->name(), std::make_shared<PackageIDSequence>())).first;
i->second->push_back(id);
}
}
@@ -246,7 +246,7 @@ UnavailableRepositoryStore::category_names() const
std::shared_ptr<const CategoryNamePartSet>
UnavailableRepositoryStore::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"));
result->insert(CategoryNamePart("repository"));
return result;
@@ -257,7 +257,7 @@ UnavailableRepositoryStore::package_names(const CategoryNamePart & c) const
{
PackageNames::iterator p(_imp->package_names.find(c));
if (_imp->package_names.end() == p)
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
else
return p->second;
}
@@ -267,7 +267,7 @@ UnavailableRepositoryStore::package_ids(const QualifiedPackageName & p) const
{
IDs::iterator i(_imp->ids.find(p));
if (_imp->ids.end() == i)
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
else
return i->second;
}
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 5579489de..20b1fd34b 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -26,7 +26,6 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/dir_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
@@ -34,6 +33,7 @@
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/return_literal_function.hh>
#include <paludis/util/timestamp.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/output_manager.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
@@ -94,17 +94,17 @@ namespace
void create_file(Contents & c, const FSEntry & f)
{
- c.add(make_shared_ptr(new ContentsFileEntry(stringify(f))));
+ c.add(std::make_shared<ContentsFileEntry>(stringify(f)));
}
void create_dir(Contents & c, const FSEntry & f)
{
- c.add(make_shared_ptr(new ContentsDirEntry(stringify(f))));
+ c.add(std::make_shared<ContentsDirEntry>(stringify(f)));
}
void create_sym(Contents & c, const FSEntry & f, const FSEntry & t)
{
- c.add(make_shared_ptr(new ContentsSymEntry(stringify(f), stringify(t))));
+ c.add(std::make_shared<ContentsSymEntry>(stringify(f), stringify(t)));
}
class InstalledUnpackagedContentsKey :
@@ -430,10 +430,10 @@ namespace paludis
fs_location_key(new InstalledUnpackagedFSEntryKey(l)),
behaviours_key(new LiteralMetadataStringSetKey("behaviours", "behaviours", mkt_internal, behaviours_set))
{
- build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build_dependencies",
- return_literal_function(true))));
- run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run_dependencies",
- return_literal_function(true))));
+ build_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build_dependencies",
+ return_literal_function(true)));
+ run_dependencies_labels->push_back(std::make_shared<DependenciesRunLabel>("run_dependencies",
+ return_literal_function(true)));
if ((l / "contents").exists())
{
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 74e532bb6..29cd3d81a 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -24,7 +24,6 @@
#include <paludis/ndbam_merger.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/set.hh>
#include <paludis/util/dir_iterator.hh>
@@ -35,6 +34,7 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/safe_ofstream.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/stringify_formatter.hh>
#include <paludis/action.hh>
#include <paludis/environment.hh>
@@ -364,7 +364,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
_imp->params.environment(), rewrite_ids_over_to_root, _1),
n::image() = m.image_dir(),
n::install_under() = install_under,
- n::merged_entries() = make_shared_ptr(new FSEntrySet),
+ n::merged_entries() = std::make_shared<FSEntrySet>(),
n::options() = m.options(),
n::output_manager() = m.output_manager(),
n::package_id() = m.package_id(),
@@ -465,12 +465,12 @@ InstalledUnpackagedRepository::repository_factory_create(
if (root.empty())
throw unpackaged_repositories::RepositoryConfigurationError("Key 'root' not specified or empty");
- return make_shared_ptr(new InstalledUnpackagedRepository(RepositoryName("installed-unpackaged"),
+ return std::make_shared<InstalledUnpackagedRepository>(RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = env,
n::location() = location,
n::root() = root
- )));
+ ));
}
RepositoryName
@@ -486,7 +486,7 @@ InstalledUnpackagedRepository::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
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index fd1cc5a79..c6ea02103 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -35,6 +35,7 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/standard_output_manager.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>
#include <algorithm>
@@ -53,7 +54,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
struct ContentsDumper
@@ -410,7 +411,7 @@ namespace test_cases
n::destination() = 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
));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -467,7 +468,7 @@ namespace test_cases
n::destination() = 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
));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -527,7 +528,7 @@ namespace test_cases
n::destination() = 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
));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index ff23b0b8f..70a8045d2 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -24,11 +24,11 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/simple_visitor_cast.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/log.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/return_literal_function.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/output_manager.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
@@ -89,10 +89,10 @@ namespace paludis
description_key(new LiteralMetadataValueKey<std::string> ("description", "Description", mkt_significant, d)),
choices_key(new UnpackagedChoicesKey(env, "choices", "Choices", mkt_normal, id))
{
- build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build_dependencies",
- return_literal_function(true))));
- run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run_dependencies",
- return_literal_function(true))));
+ build_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build_dependencies",
+ return_literal_function(true)));
+ run_dependencies_labels->push_back(std::make_shared<DependenciesRunLabel>("run_dependencies",
+ return_literal_function(true)));
}
};
}
@@ -411,7 +411,7 @@ UnpackagedID::perform_action(Action & action) const
n::build_start_time() = build_start_time,
n::environment_file() = FSEntry("/dev/null"),
n::image_dir() = fs_location_key()->value(),
- 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)
| extra_merger_options,
n::output_manager() = output_manager,
diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc
index b62d27460..52551d5e0 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.cc
+++ b/paludis/repositories/unpackaged/unpackaged_key.cc
@@ -22,7 +22,6 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/mutex.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/choice.hh>
@@ -172,9 +171,9 @@ UnpackagedChoicesKey::value() const
n::raw_name() = canonical_build_options_raw_name(),
n::show_with_no_prefix() = false
)));
- build_options->add(make_shared_ptr(new ELikeSplitChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options)));
- build_options->add(make_shared_ptr(new ELikeStripChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options)));
- build_options->add(make_shared_ptr(new ELikePreserveWorkChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options, true)));
+ build_options->add(std::make_shared<ELikeSplitChoiceValue>(_imp->id->shared_from_this(), _imp->env, build_options));
+ build_options->add(std::make_shared<ELikeStripChoiceValue>(_imp->id->shared_from_this(), _imp->env, build_options));
+ build_options->add(std::make_shared<ELikePreserveWorkChoiceValue>(_imp->id->shared_from_this(), _imp->env, build_options, true));
_imp->value->add(build_options);
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index b3611295f..b0a963e7c 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -23,10 +23,10 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/set.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/destringify.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
#include <paludis/action.hh>
@@ -130,13 +130,13 @@ UnpackagedRepository::_add_metadata_keys() const
std::shared_ptr<const PackageIDSequence>
UnpackagedRepository::package_ids(const QualifiedPackageName & n) const
{
- return n == _imp->id->name() ? _imp->ids : make_shared_ptr(new PackageIDSequence);
+ return n == _imp->id->name() ? _imp->ids : std::make_shared<PackageIDSequence>();
}
std::shared_ptr<const QualifiedPackageNameSet>
UnpackagedRepository::package_names(const CategoryNamePart & c) const
{
- return c == _imp->id->name().category() ? _imp->package_names : make_shared_ptr(new QualifiedPackageNameSet);
+ return c == _imp->id->name().category() ? _imp->package_names : std::make_shared<QualifiedPackageNameSet>();
}
std::shared_ptr<const CategoryNamePartSet>
@@ -148,7 +148,7 @@ UnpackagedRepository::category_names() const
std::shared_ptr<const CategoryNamePartSet>
UnpackagedRepository::category_names_containing_package(const PackageNamePart & p) const
{
- return p == _imp->id->name().package() ? _imp->category_names : make_shared_ptr(new CategoryNamePartSet);
+ return p == _imp->id->name().package() ? _imp->category_names : std::make_shared<CategoryNamePartSet>();
}
bool
@@ -254,7 +254,7 @@ UnpackagedRepository::repository_factory_create(
rewrite_ids_over_to_root = destringify<int>(f("rewrite_ids_over_to_root"));
}
- return make_shared_ptr(new UnpackagedRepository(RepositoryName("unpackaged"),
+ return std::make_shared<UnpackagedRepository>(RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = build_dependencies,
n::description() = description,
@@ -266,7 +266,7 @@ UnpackagedRepository::repository_factory_create(
n::run_dependencies() = run_dependencies,
n::slot() = SlotName(slot),
n::version() = VersionSpec(version, user_version_spec_options())
- )));
+ ));
}
RepositoryName
@@ -282,7 +282,7 @@ UnpackagedRepository::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
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index 117a51e55..38155785d 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -50,7 +50,7 @@ namespace
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
void dummy_used_this_for_config_protect(const std::string &)
@@ -242,7 +242,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
));
id->perform_action(action);
@@ -298,7 +298,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
));
id->perform_action(action);
diff --git a/paludis/repositories/unwritten/unwritten_id.cc b/paludis/repositories/unwritten/unwritten_id.cc
index 72bb97818..61270f34f 100644
--- a/paludis/repositories/unwritten/unwritten_id.cc
+++ b/paludis/repositories/unwritten/unwritten_id.cc
@@ -23,8 +23,8 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/hashes.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/metadata_key.hh>
@@ -178,7 +178,7 @@ UnwrittenID::perform_action(Action & a) const
std::shared_ptr<const Set<std::string> >
UnwrittenID::breaks_portage() const
{
- return make_shared_ptr(new Set<std::string>);
+ return std::make_shared<Set<std::string>>();
}
bool
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 641e20548..8e979b141 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -26,6 +26,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/extract_host_from_url.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/syncer.hh>
@@ -40,7 +41,7 @@ namespace
std::shared_ptr<UnwrittenRepositoryStore>
make_store(const UnwrittenRepository * const repo, const UnwrittenRepositoryParams & p)
{
- return make_shared_ptr(new UnwrittenRepositoryStore(p.environment(), repo, p.location()));
+ return std::make_shared<UnwrittenRepositoryStore>(p.environment(), repo, p.location());
}
}
@@ -348,7 +349,7 @@ UnwrittenRepository::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
diff --git a/paludis/repositories/unwritten/unwritten_repository_file.cc b/paludis/repositories/unwritten/unwritten_repository_file.cc
index 676500412..28184c446 100644
--- a/paludis/repositories/unwritten/unwritten_repository_file.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_file.cc
@@ -24,7 +24,6 @@
#include <paludis/util/simple_parser.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/tokeniser.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/join.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
@@ -310,7 +309,7 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
tokenise_whitespace(token2, std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
- tree->root()->append(make_shared_ptr(new SimpleURIDepSpec(*t)));
+ tree->root()->append(std::make_shared<SimpleURIDepSpec>(*t));
entry->homepage().reset(new UnwrittenHomepageKey("homepage", "Homepage", mkt_normal, tree));
}
else if (token == "comment")
diff --git a/paludis/repositories/unwritten/unwritten_repository_store.cc b/paludis/repositories/unwritten/unwritten_repository_store.cc
index 08e45301d..bbb5d4e1d 100644
--- a/paludis/repositories/unwritten/unwritten_repository_store.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_store.cc
@@ -28,7 +28,6 @@
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_named_values.hh>
@@ -118,7 +117,7 @@ UnwrittenRepositoryStore::_populate_one(const Environment * const env, const FSE
PackageNames::iterator p(_imp->package_names.find((*i).name().category()));
if (_imp->package_names.end() == p)
p = _imp->package_names.insert(std::make_pair((*i).name().category(),
- make_shared_ptr(new QualifiedPackageNameSet))).first;
+ std::make_shared<QualifiedPackageNameSet>())).first;
pkgs = p->second;
}
@@ -128,12 +127,12 @@ UnwrittenRepositoryStore::_populate_one(const Environment * const env, const FSE
IDs::iterator p(_imp->ids.find((*i).name()));
if (_imp->ids.end() == p)
p = _imp->ids.insert(std::make_pair((*i).name(),
- make_shared_ptr(new PackageIDSequence))).first;
+ std::make_shared<PackageIDSequence>())).first;
ids = p->second;
}
- ids->push_back(make_shared_ptr(new UnwrittenID(make_named_values<UnwrittenIDParams>(
+ ids->push_back(std::make_shared<UnwrittenID>(make_named_values<UnwrittenIDParams>(
n::added_by() = (*i).added_by(),
n::bug_ids() = (*i).bug_ids(),
n::comment() = (*i).comment(),
@@ -146,7 +145,7 @@ UnwrittenRepositoryStore::_populate_one(const Environment * const env, const FSE
n::repository() = _imp->repo,
n::slot() = (*i).slot(),
n::version() = (*i).version()
- ))));
+ )));
old_name = (*i).name();
}
@@ -173,7 +172,7 @@ UnwrittenRepositoryStore::category_names() const
std::shared_ptr<const CategoryNamePartSet>
UnwrittenRepositoryStore::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;
}
@@ -183,7 +182,7 @@ UnwrittenRepositoryStore::package_names(const CategoryNamePart & c) const
{
PackageNames::iterator p(_imp->package_names.find(c));
if (_imp->package_names.end() == p)
- return make_shared_ptr(new QualifiedPackageNameSet);
+ return std::make_shared<QualifiedPackageNameSet>();
else
return p->second;
}
@@ -193,7 +192,7 @@ UnwrittenRepositoryStore::package_ids(const QualifiedPackageName & p) const
{
IDs::iterator i(_imp->ids.find(p));
if (_imp->ids.end() == i)
- return make_shared_ptr(new PackageIDSequence);
+ return std::make_shared<PackageIDSequence>();
else
return i->second;
}
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 981517f41..614114ad0 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -25,7 +25,6 @@
#include <paludis/package_database.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/sequence.hh>
@@ -36,6 +35,7 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <functional>
#include <unordered_map>
@@ -61,7 +61,7 @@ namespace paludis
std::shared_ptr<const MetadataValueKey<FSEntry> > root_key;
std::shared_ptr<const MetadataValueKey<std::string> > format_key;
- Implementation(const Environment * const e, const FSEntry & r, std::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
+ Implementation(const Environment * const e, const FSEntry & r, std::shared_ptr<Mutex> m = std::make_shared<Mutex>()) :
env(e),
root(r),
ids_mutex(m),
@@ -154,7 +154,7 @@ InstalledVirtualsRepository::need_ids() const
{
IDMap::iterator i(_imp->ids.find((*p).virtual_name()));
if (i == _imp->ids.end())
- i = _imp->ids.insert(std::make_pair((*p).virtual_name(), make_shared_ptr(new PackageIDSequence))).first;
+ i = _imp->ids.insert(std::make_pair((*p).virtual_name(), std::make_shared<PackageIDSequence>())).first;
std::shared_ptr<const PackageID> id(new virtuals::VirtualsPackageID(
_imp->env, shared_from_this(), (*p).virtual_name(), (*p).provided_by(), false));
@@ -309,7 +309,7 @@ InstalledVirtualsRepository::some_ids_might_not_be_masked() const
std::shared_ptr<const CategoryNamePartSet>
InstalledVirtualsRepository::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;
}
@@ -353,7 +353,7 @@ InstalledVirtualsRepository::repository_factory_create(
if (f("root").empty())
throw ConfigurationError("Key 'root' unspecified or empty");
- return make_shared_ptr(new InstalledVirtualsRepository(env, f("root")));
+ return std::make_shared<InstalledVirtualsRepository>(env, f("root"));
}
std::shared_ptr<const RepositoryNameSet>
@@ -361,7 +361,7 @@ InstalledVirtualsRepository::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>();
}
bool
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 90a1b12c6..de93cc4f7 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -21,12 +21,12 @@
#include <paludis/repositories/virtuals/installed_virtuals_repository.hh>
#include <paludis/repositories/virtuals/virtuals_repository.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/return_literal_function.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/name.hh>
#include <paludis/dep_spec.hh>
#include <paludis/version_spec.hh>
@@ -64,23 +64,23 @@ namespace paludis
const std::shared_ptr<const DependenciesLabelSequence> & l,
bool exact, const std::string & h, const std::string & r) :
env(e),
- value(new DependencySpecTree(make_shared_ptr(new AllDepSpec))),
+ value(new DependencySpecTree(std::make_shared<AllDepSpec>())),
labels(l),
spec(exact ?
- make_shared_ptr(new PackageDepSpec(
+ std::make_shared<PackageDepSpec>(
make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(v->name())
.version_requirement(make_named_values<VersionRequirement>(
n::version_operator() = vo_equal,
n::version_spec() = v->version()))
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(
- v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN"))))
- .in_repository(v->repository()->name())))
+ .slot_requirement(std::make_shared<UserSlotExactRequirement>(
+ v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN")))
+ .in_repository(v->repository()->name()))
:
- make_shared_ptr(new PackageDepSpec(
+ std::make_shared<PackageDepSpec>(
make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(v->name())
- ))
+ )
),
raw_name(r),
human_name(h)
@@ -191,10 +191,10 @@ namespace paludis
rdep(new virtuals::VirtualsDepKey(e, "RDEPEND", "Run dependencies", p, rdep_labels, b)),
has_masks(false)
{
- bdep_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("DEPEND",
- return_literal_function(true))));
- rdep_labels->push_back(make_shared_ptr(new DependenciesRunLabel("RDEPEND",
- return_literal_function(true))));
+ bdep_labels->push_back(std::make_shared<DependenciesBuildLabel>("DEPEND",
+ return_literal_function(true)));
+ rdep_labels->push_back(std::make_shared<DependenciesRunLabel>("RDEPEND",
+ return_literal_function(true)));
}
};
}
@@ -498,7 +498,7 @@ VirtualsPackageID::need_masks_added() const
return;
if (_imp->virtual_for->value()->masked())
- add_mask(make_shared_ptr(new VirtualsAssociationMask(_imp->virtual_for->value())));
+ add_mask(std::make_shared<VirtualsAssociationMask>(_imp->virtual_for->value()));
_imp->has_masks = true;
}
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index e680ae502..4b2d84b57 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -32,7 +32,6 @@
#include <paludis/hook.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/operators.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/map.hh>
@@ -43,6 +42,7 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <functional>
#include <unordered_map>
@@ -71,7 +71,7 @@ namespace paludis
std::shared_ptr<const MetadataValueKey<std::string> > format_key;
- Implementation(const Environment * const e, std::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
+ Implementation(const Environment * const e, std::shared_ptr<Mutex> m = std::make_shared<Mutex>()) :
env(e),
big_nasty_mutex(m),
has_names(false),
@@ -236,7 +236,7 @@ VirtualsRepository::need_ids() const
{
IDMap::iterator i(my_ids.find(v->first));
if (my_ids.end() == i)
- i = my_ids.insert(std::make_pair(v->first, make_shared_ptr(new PackageIDSequence))).first;
+ i = my_ids.insert(std::make_pair(v->first, std::make_shared<PackageIDSequence>())).first;
std::shared_ptr<const PackageID> id(make_virtual_package_id(QualifiedPackageName(v->first), *m));
if (stringify(id->name().category()) != "virtual")
@@ -337,7 +337,7 @@ VirtualsRepository::make_virtual_package_id(
throw InternalError(PALUDIS_HERE, "tried to make a virtual package id using '" + stringify(virtual_name) + "', '"
+ stringify(*provider) + "'");
- return make_shared_ptr(new virtuals::VirtualsPackageID(_imp->env, shared_from_this(), virtual_name, provider, true));
+ return std::make_shared<virtuals::VirtualsPackageID>(_imp->env, shared_from_this(), virtual_name, provider, true);
}
bool
@@ -409,7 +409,7 @@ VirtualsRepository::some_ids_might_not_be_masked() const
std::shared_ptr<const CategoryNamePartSet>
VirtualsRepository::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;
}
@@ -450,7 +450,7 @@ VirtualsRepository::repository_factory_create(
const Environment * const env,
const std::function<std::string (const std::string &)> &)
{
- return make_shared_ptr(new VirtualsRepository(env));
+ return std::make_shared<VirtualsRepository>(env);
}
std::shared_ptr<const RepositoryNameSet>
@@ -458,7 +458,7 @@ VirtualsRepository::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
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index 11d574f0c..e7aece21f 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -33,7 +33,6 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/options.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/user_dep_spec.hh>
@@ -71,8 +70,8 @@ namespace test_cases
repo->add_version("cat", "pkg", "1")->provide_key()->set_from_string("virtual/pkg");
repo->add_version("cat", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
- repo->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
+ repo->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
TEST_CHECK(repo->virtual_packages());
TEST_CHECK_EQUAL(std::distance(repo->virtual_packages()->begin(), repo->virtual_packages()->end()), 1);
@@ -117,15 +116,15 @@ namespace test_cases
repo1->add_version("cat", "pkg", "1")->provide_key()->set_from_string("virtual/pkg");
repo1->add_version("cat", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
- repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(
- new PackageDepSpec(parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
- repo1->add_virtual_package(QualifiedPackageName("virtual/foo"), make_shared_ptr(
- new PackageDepSpec(parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
+ repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
+ repo1->add_virtual_package(QualifiedPackageName("virtual/foo"), std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
- repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
- repo2->add_virtual_package(QualifiedPackageName("virtual/foo"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec("<=cat/pkg-1", &env, UserPackageDepSpecOptions()))));
+ repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
+ repo2->add_virtual_package(QualifiedPackageName("virtual/foo"), std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec("<=cat/pkg-1", &env, UserPackageDepSpecOptions())));
TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));
@@ -161,12 +160,12 @@ namespace test_cases
env.package_database()->add_repository(4, virtuals);
repo1->add_version("virtual", "gkp", "1")->provide_key()->set_from_string("virtual/pkg");
- repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(
- new PackageDepSpec(parse_user_package_dep_spec("virtual/gkp", &env, UserPackageDepSpecOptions()))));
+ repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec("virtual/gkp", &env, UserPackageDepSpecOptions())));
repo2->add_version("virtual", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
- repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec("virtual/pkg", &env, UserPackageDepSpecOptions()))));
+ repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec("virtual/pkg", &env, UserPackageDepSpecOptions())));
TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));