aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-23 21:14:33 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-23 21:15:08 +0100
commit1e88d3f531a7d9cac4cd08db1484a3a87679af3c (patch)
tree9c2852177fbfc30366d24947658bf52a5c9e6d0c /paludis/repositories
parentc3802f0aec7d89a518cf74145aa73bf2ea688e35 (diff)
downloadpaludis-1e88d3f531a7d9cac4cd08db1484a3a87679af3c.tar.gz
paludis-1e88d3f531a7d9cac4cd08db1484a3a87679af3c.tar.xz
Avoid more explicit newage
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.cc8
-rw-r--r--paludis/repositories/accounts/accounts_id.cc6
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc16
-rw-r--r--paludis/repositories/accounts/accounts_repository_TEST.cc2
-rw-r--r--paludis/repositories/accounts/accounts_repository_store.cc6
-rw-r--r--paludis/repositories/accounts/installed_accounts_id.cc6
-rw-r--r--paludis/repositories/accounts/registration.cc6
-rw-r--r--paludis/repositories/cran/cran_dep_parser.cc4
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc24
-rw-r--r--paludis/repositories/cran/cran_installed_repository_TEST.cc4
-rw-r--r--paludis/repositories/cran/cran_package_id.cc12
-rw-r--r--paludis/repositories/cran/cran_repository.cc24
-rw-r--r--paludis/repositories/cran/cran_repository_TEST.cc6
-rw-r--r--paludis/repositories/cran/keys.cc2
-rw-r--r--paludis/repositories/cran/package_dep_spec.cc2
-rw-r--r--paludis/repositories/cran/registration.cc6
-rw-r--r--paludis/repositories/e/aa_visitor_TEST.cc2
-rw-r--r--paludis/repositories/e/check_fetched_files_visitor.cc4
-rw-r--r--paludis/repositories/e/dep_parser.cc36
-rw-r--r--paludis/repositories/e/dep_parser_TEST.cc32
-rw-r--r--paludis/repositories/e/dep_spec_pretty_printer_TEST.cc4
-rw-r--r--paludis/repositories/e/depend_rdepend_TEST.cc8
-rw-r--r--paludis/repositories/e/dependencies_rewriter.cc4
-rw-r--r--paludis/repositories/e/e_choices_key.cc10
-rw-r--r--paludis/repositories/e/e_installed_repository.cc8
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc12
-rw-r--r--paludis/repositories/e/e_key.cc10
-rw-r--r--paludis/repositories/e/e_repository.cc85
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc55
-rw-r--r--paludis/repositories/e/e_repository_TEST_0.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_1.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_2.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_3.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc3
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_exheres_0.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_pbin.cc6
-rw-r--r--paludis/repositories/e/e_repository_TEST_phases.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_replacing.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc2
-rw-r--r--paludis/repositories/e/e_repository_id.cc4
-rw-r--r--paludis/repositories/e/e_repository_mask_file.cc6
-rw-r--r--paludis/repositories/e/e_repository_sets.cc12
-rw-r--r--paludis/repositories/e/e_repository_sets_TEST.cc13
-rw-r--r--paludis/repositories/e/eapi.cc4
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc86
-rw-r--r--paludis/repositories/e/ebuild_id.cc12
-rw-r--r--paludis/repositories/e/exheres_layout.cc34
-rw-r--r--paludis/repositories/e/exheres_profile.cc22
-rw-r--r--paludis/repositories/e/exndbam_repository.cc18
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc6
-rw-r--r--paludis/repositories/e/extra_distribution_data.cc2
-rw-r--r--paludis/repositories/e/fetch_visitor_TEST.cc4
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc2
-rw-r--r--paludis/repositories/e/fix_locked_dependencies_TEST.cc4
-rw-r--r--paludis/repositories/e/info_metadata_key.cc2
-rw-r--r--paludis/repositories/e/layout.cc2
-rw-r--r--paludis/repositories/e/myoptions_requirements_verifier.cc2
-rw-r--r--paludis/repositories/e/pipe_command_handler.cc4
-rw-r--r--paludis/repositories/e/profile.cc4
-rw-r--r--paludis/repositories/e/registration.cc6
-rw-r--r--paludis/repositories/e/source_uri_finder_TEST.cc6
-rw-r--r--paludis/repositories/e/traditional_layout.cc34
-rw-r--r--paludis/repositories/e/traditional_profile.cc30
-rw-r--r--paludis/repositories/e/vdb_repository.cc38
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc33
-rw-r--r--paludis/repositories/e/vdb_unmerger_TEST.cc2
-rw-r--r--paludis/repositories/e/xml_things.cc6
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc6
-rw-r--r--paludis/repositories/fake/fake_installed_repository_TEST.cc2
-rw-r--r--paludis/repositories/fake/fake_package_id.cc22
-rw-r--r--paludis/repositories/fake/fake_repository.cc4
-rw-r--r--paludis/repositories/fake/fake_repository_TEST.cc2
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc14
-rw-r--r--paludis/repositories/fake/registration.cc2
-rw-r--r--paludis/repositories/gems/gem_specification.cc4
-rw-r--r--paludis/repositories/gems/gem_specifications.cc2
-rw-r--r--paludis/repositories/gems/gems_repository.cc16
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc12
-rw-r--r--paludis/repositories/gems/installed_gems_repository_TEST.cc4
-rw-r--r--paludis/repositories/gems/registration.cc4
-rw-r--r--paludis/repositories/repository/registration.cc2
-rw-r--r--paludis/repositories/repository/repository_id.cc4
-rw-r--r--paludis/repositories/repository/repository_repository.cc10
-rw-r--r--paludis/repositories/repository/repository_repository_store.cc4
-rw-r--r--paludis/repositories/unavailable/registration.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_package_id.cc2
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc12
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_TEST.cc6
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc2
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_file.cc2
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.cc12
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc14
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc8
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc30
-rw-r--r--paludis/repositories/unpackaged/registration.cc6
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc18
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc2
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc26
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc16
-rw-r--r--paludis/repositories/unwritten/registration.cc4
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc12
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_TEST.cc4
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_file.cc8
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_store.cc4
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc16
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository_TEST.cc4
-rw-r--r--paludis/repositories/virtuals/package_id.cc12
-rw-r--r--paludis/repositories/virtuals/registration.cc6
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc15
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc20
113 files changed, 615 insertions, 633 deletions
diff --git a/paludis/repositories/accounts/accounts_dep_key.cc b/paludis/repositories/accounts/accounts_dep_key.cc
index dc8d8d9cf..25e1cc740 100644
--- a/paludis/repositories/accounts/accounts_dep_key.cc
+++ b/paludis/repositories/accounts/accounts_dep_key.cc
@@ -47,14 +47,14 @@ namespace paludis
Imp(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(std::make_shared<AllDepSpec>())),
- initial_labels(new DependenciesLabelSequence)
+ specs(std::make_shared<std::list<std::shared_ptr<PackageDepSpec> >>()),
+ tree(std::make_shared<DependencySpecTree>(std::make_shared<AllDepSpec>())),
+ initial_labels(std::make_shared<DependenciesLabelSequence>())
{
for (Set<std::string>::ConstIterator i(s->begin()), i_end(s->end()) ;
i != i_end ; ++i)
{
- std::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(CategoryNamePart("group") + PackageNamePart(*i))));
specs->push_back(spec);
tree->root()->append(spec);
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index 2929580e2..9d62949e2 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -84,7 +84,7 @@ namespace paludis
name(q),
version("0", VersionSpecOptions()),
repository(r),
- fs_location_key(new LiteralMetadataValueKey<FSEntry>("location", "Location", mkt_internal, l)),
+ fs_location_key(std::make_shared<LiteralMetadataValueKey<FSEntry>>("location", "Location", mkt_internal, l)),
from_repositories_key(f),
mask(m ? std::make_shared<AccountsInstalledMask>() : make_null_shared_ptr()),
is_user(u),
@@ -180,11 +180,11 @@ AccountsID::_need_file_keys() const
_imp->home_key = std::make_shared<LiteralMetadataValueKey<std::string>>("home", "Home Directory",
mkt_normal, k.get("home"));
- std::shared_ptr<Set<std::string> > all_groups_s(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > all_groups_s(std::make_shared<Set<std::string>>());
if (! k.get("extra_groups").empty())
{
- std::shared_ptr<Set<std::string> > groups_s(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > groups_s(std::make_shared<Set<std::string>>());
tokenise_whitespace(k.get("extra_groups"), groups_s->inserter());
std::copy(groups_s->begin(), groups_s->end(), all_groups_s->inserter());
_imp->extra_groups_key = std::make_shared<LiteralMetadataStringSetKey>("extra_groups", "Extra Groups",
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index a0367bb43..c475be425 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -85,19 +85,19 @@ namespace paludis
const ActiveObjectPtr<DeferredConstructionPtr<std::shared_ptr<AccountsRepositoryStore> > > store;
Imp(AccountsRepository * const repo, const AccountsRepositoryParams & p) :
- params_if_not_installed(new AccountsRepositoryParams(p)),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format", mkt_significant, "accounts")),
+ params_if_not_installed(std::make_shared<AccountsRepositoryParams>(p)),
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format", mkt_significant, "accounts")),
store(DeferredConstructionPtr<std::shared_ptr<AccountsRepositoryStore> > (
std::bind(&make_store, repo, std::cref(*params_if_not_installed))))
{
}
Imp(AccountsRepository * const repo, const InstalledAccountsRepositoryParams & p) :
- params_if_installed(new InstalledAccountsRepositoryParams(p)),
+ params_if_installed(std::make_shared<InstalledAccountsRepositoryParams>(p)),
handler_if_installed(make_handler(p.handler())),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format", mkt_significant, "installed-accounts")),
- handler_key(new LiteralMetadataValueKey<std::string> ("handler", "handler", mkt_normal, p.handler())),
- installed_root_key(new LiteralMetadataValueKey<FSEntry>("root", "root", mkt_normal, p.root())),
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format", mkt_significant, "installed-accounts")),
+ handler_key(std::make_shared<LiteralMetadataValueKey<std::string> >("handler", "handler", mkt_normal, p.handler())),
+ installed_root_key(std::make_shared<LiteralMetadataValueKey<FSEntry>>("root", "root", mkt_normal, p.root())),
store(DeferredConstructionPtr<std::shared_ptr<AccountsRepositoryStore> > (
std::bind(&make_installed_store, repo, std::cref(*params_if_installed))))
{
@@ -171,7 +171,7 @@ AccountsRepository::repository_factory_create(
if (name_str.empty())
name_str = "accounts";
- return std::shared_ptr<AccountsRepository>(new AccountsRepository(
+ return std::shared_ptr<AccountsRepository>(std::make_shared<AccountsRepository>(
make_named_values<AccountsRepositoryParams>(
n::environment() = env,
n::name() = RepositoryName(name_str)
@@ -200,7 +200,7 @@ AccountsRepository::repository_factory_installed_create(
if (root_str != "/")
throw AccountsRepositoryConfigurationError("Values other than '/' for 'root' not yet supported");
- return std::shared_ptr<AccountsRepository>(new AccountsRepository(
+ return std::shared_ptr<AccountsRepository>(std::make_shared<AccountsRepository>(
make_named_values<InstalledAccountsRepositoryParams>(
n::environment() = env,
n::handler() = handler,
diff --git a/paludis/repositories/accounts/accounts_repository_TEST.cc b/paludis/repositories/accounts/accounts_repository_TEST.cc
index ea5581a93..9c45e5934 100644
--- a/paludis/repositories/accounts/accounts_repository_TEST.cc
+++ b/paludis/repositories/accounts/accounts_repository_TEST.cc
@@ -47,7 +47,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<AccountsRepository> repo(new AccountsRepository(
+ std::shared_ptr<AccountsRepository> repo(std::make_shared<AccountsRepository>(
make_named_values<AccountsRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("accounts")
diff --git a/paludis/repositories/accounts/accounts_repository_store.cc b/paludis/repositories/accounts/accounts_repository_store.cc
index 029f887d5..18f552775 100644
--- a/paludis/repositories/accounts/accounts_repository_store.cc
+++ b/paludis/repositories/accounts/accounts_repository_store.cc
@@ -74,7 +74,7 @@ namespace paludis
env(e),
repo(r),
installed(i),
- categories(new CategoryNamePartSet)
+ categories(std::make_shared<CategoryNamePartSet>())
{
categories->insert(CategoryNamePart("user"));
categories->insert(CategoryNamePart("group"));
@@ -130,9 +130,9 @@ AccountsRepositoryStore::_load(const std::shared_ptr<const Repository> & repo)
continue;
}
- std::shared_ptr<Set<std::string> > r_set(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > r_set(std::make_shared<Set<std::string>>());
r_set->insert(stringify((*r)->name()));
- std::shared_ptr<LiteralMetadataStringSetKey> r_key(new LiteralMetadataStringSetKey("defined_by", "Defined by repository", mkt_internal, r_set));
+ std::shared_ptr<LiteralMetadataStringSetKey> r_key(std::make_shared<LiteralMetadataStringSetKey>("defined_by", "Defined by repository", mkt_internal, r_set));
_load_one(repo, r_key, dir);
}
}
diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc
index 017f8589d..b674f6210 100644
--- a/paludis/repositories/accounts/installed_accounts_id.cc
+++ b/paludis/repositories/accounts/installed_accounts_id.cc
@@ -72,7 +72,7 @@ namespace paludis
name(q),
version("0", VersionSpecOptions()),
repository(r),
- behaviours_key(new LiteralMetadataStringSetKey("behaviours", "Behaviours", mkt_internal,
+ behaviours_key(std::make_shared<LiteralMetadataStringSetKey>("behaviours", "Behaviours", mkt_internal,
behaviours_set)),
is_user(u)
{
@@ -84,7 +84,7 @@ namespace
{
std::shared_ptr<Set<std::string> > make_behaviours()
{
- std::shared_ptr<Set<std::string> > result(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > result(std::make_shared<Set<std::string>>());
result->insert("transient");
result->insert("used");
return result;
@@ -112,7 +112,7 @@ InstalledAccountsID::need_keys_added() const
if (_imp->is_user && ! _imp->dependencies_key)
{
- std::shared_ptr<Set<std::string> > groups(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > groups(std::make_shared<Set<std::string>>());
/* depend upon our primary group */
{
diff --git a/paludis/repositories/accounts/registration.cc b/paludis/repositories/accounts/registration.cc
index 2be47da47..d51abeb40 100644
--- a/paludis/repositories/accounts/registration.cc
+++ b/paludis/repositories/accounts/registration.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
void register_repositories<repository_groups::accounts>(const repository_groups::accounts * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > accounts_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > accounts_formats(std::make_shared<Set<std::string>>());
accounts_formats->insert("accounts");
factory->add_repository_format(accounts_formats,
@@ -58,7 +58,7 @@ namespace paludis
&AccountsRepository::repository_factory_dependencies
);
- std::shared_ptr<Set<std::string> > installed_accounts_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > installed_accounts_formats(std::make_shared<Set<std::string>>());
installed_accounts_formats->insert("installed_accounts");
installed_accounts_formats->insert("installed-accounts");
diff --git a/paludis/repositories/cran/cran_dep_parser.cc b/paludis/repositories/cran/cran_dep_parser.cc
index 73d84f5a2..e96d4886f 100644
--- a/paludis/repositories/cran/cran_dep_parser.cc
+++ b/paludis/repositories/cran/cran_dep_parser.cc
@@ -36,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(std::make_shared<AllDepSpec>()));
+ std::shared_ptr<DependencySpecTree> result(std::make_shared<DependencySpecTree>(std::make_shared<AllDepSpec>()));
std::list<std::string> specs;
@@ -66,7 +66,7 @@ cranrepository::parse_depends(const std::string & s)
{
Context local_context("When processing token '" + *a + "':");
- std::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(cranrepository::parse_cran_package_dep_spec(
+ std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(cranrepository::parse_cran_package_dep_spec(
strip_leading(strip_trailing(*a, " \r\n\t"), " \r\n\t"))));
result->root()->append(spec);
}
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index f5644bc86..e77229459 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -84,9 +84,9 @@ namespace paludis
Imp<CRANInstalledRepository>::Imp(const CRANInstalledRepositoryParams & p) :
params(p),
has_ids(false),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location", mkt_significant, params.location())),
- installed_root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root", mkt_normal, params.root())),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format", mkt_significant, "installed_cran"))
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location", mkt_significant, params.location())),
+ installed_root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("root", "root", mkt_normal, params.root())),
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format", mkt_significant, "installed_cran"))
{
}
@@ -217,7 +217,7 @@ CRANInstalledRepository::has_package_named(const QualifiedPackageName & q) const
std::shared_ptr<const CategoryNamePartSet>
CRANInstalledRepository::category_names() const
{
- std::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
+ std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("cran"));
return result;
}
@@ -228,7 +228,7 @@ CRANInstalledRepository::package_names(const CategoryNamePart & c) const
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
if (! has_category_named(c))
return result;
@@ -246,7 +246,7 @@ CRANInstalledRepository::package_ids(const QualifiedPackageName & n) const
Context context("When fetching versions of '" + stringify(n) + "' in "
+ stringify(name()) + ":");
- std::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
if (! has_package_named(n))
return result;
@@ -264,7 +264,7 @@ CRANInstalledRepository::do_contents(const Package ID & id) const
{
Context context("When fetching contents for " + stringify(id) + ":");
- std::shared_ptr<Contents> result(new Contents);
+ std::shared_ptr<Contents> result(std::make_shared<Contents>());
if (! _imp->entries_valid)
_imp->load_entries();
@@ -308,11 +308,11 @@ CRANInstalledRepository::do_contents(const Package ID & id) const
}
if ("obj" == tokens.at(0))
- result->add(std::shared_ptr<ContentsEntry>(new ContentsFileEntry(tokens.at(1))));
+ result->add(std::shared_ptr<ContentsEntry>(std::make_shared<ContentsFileEntry>(tokens.at(1))));
else if ("dir" == tokens.at(0))
- result->add(std::shared_ptr<ContentsEntry>(new ContentsDirEntry(tokens.at(1))));
+ result->add(std::shared_ptr<ContentsEntry>(std::make_shared<ContentsDirEntry>(tokens.at(1))));
else if ("misc" == tokens.at(0))
- result->add(std::shared_ptr<ContentsEntry>(new ContentsMiscEntry(tokens.at(1))));
+ result->add(std::shared_ptr<ContentsEntry>(std::make_shared<ContentsMiscEntry>(tokens.at(1))));
else if ("sym" == tokens.at(0))
{
if (tokens.size() < 4)
@@ -324,7 +324,7 @@ CRANInstalledRepository::do_contents(const Package ID & id) const
continue;
}
- result->add(std::shared_ptr<ContentsEntry>(new ContentsSymEntry(
+ result->add(std::shared_ptr<ContentsEntry>(std::make_shared<ContentsSymEntry>(
tokens.at(1), tokens.at(3))));
}
}
@@ -393,7 +393,7 @@ CRANInstalledRepository::repository_factory_create(
if (! f("world").empty())
throw CRANInstalledRepositoryConfigurationError("Key 'world' is no longer supported.");
- return std::shared_ptr<Repository>(new CRANInstalledRepository(make_named_values<CRANInstalledRepositoryParams>(
+ return std::shared_ptr<Repository>(std::make_shared<CRANInstalledRepository>(make_named_values<CRANInstalledRepositoryParams>(
n::environment() = env,
n::location() = location,
n::root() = root
diff --git a/paludis/repositories/cran/cran_installed_repository_TEST.cc b/paludis/repositories/cran/cran_installed_repository_TEST.cc
index 3c0351f17..0f7a4b766 100644
--- a/paludis/repositories/cran/cran_installed_repository_TEST.cc
+++ b/paludis/repositories/cran/cran_installed_repository_TEST.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
@@ -54,7 +54,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "cran_installed");
keys->insert("library", "cran_installed_repository_TEST_dir/library");
keys->insert("location", "cran_installed_repository_TEST_dir/repo1");
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index 66fc6a5fe..323388238 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -83,8 +83,8 @@ namespace paludis
cran_repository(r),
name("cran/" + cran_name_to_internal(strip_trailing_string(f.basename(), ".DESCRIPTION"))),
version("0", VersionSpecOptions()),
- suggests_labels(new DependenciesLabelSequence),
- depends_labels(new DependenciesLabelSequence)
+ suggests_labels(std::make_shared<DependenciesLabelSequence>()),
+ depends_labels(std::make_shared<DependenciesLabelSequence>())
{
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)));
@@ -97,9 +97,9 @@ namespace paludis
cran_repository(c),
name("cran/" + cran_name_to_internal(t)),
version(r->version()),
- contained_in_key(new PackageIDKey("Contained", "Contained in", r, mkt_normal)),
- suggests_labels(new DependenciesLabelSequence),
- depends_labels(new DependenciesLabelSequence)
+ contained_in_key(std::make_shared<PackageIDKey>("Contained", "Contained in", r, mkt_normal)),
+ suggests_labels(std::make_shared<DependenciesLabelSequence>()),
+ depends_labels(std::make_shared<DependenciesLabelSequence>())
{
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)));
@@ -429,7 +429,7 @@ CRANPackageID::arbitrary_less_than_comparison(const PackageID &) const
std::shared_ptr<const Set<std::string> >
CRANPackageID::breaks_portage() const
{
- std::shared_ptr<Set<std::string> > why(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > why(std::make_shared<Set<std::string>>());
why->insert("format");
return why;
}
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 83a520422..125b0b84b 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -90,13 +90,13 @@ Imp<CRANRepository>::Imp(const CRANRepositoryParams & p, const std::shared_ptr<M
params(p),
big_nasty_mutex(m),
has_ids(false),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location", mkt_significant, params.location())),
- distdir_key(new LiteralMetadataValueKey<FSEntry> ("distdir", "distdir", mkt_normal, params.distdir())),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format", mkt_significant, "cran")),
- builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir", mkt_normal, params.builddir())),
- library_key(new LiteralMetadataValueKey<FSEntry> ("library", "library", mkt_normal, params.library())),
- sync_key(new LiteralMetadataValueKey<std::string> ("sync", "sync", mkt_normal, params.sync())),
- sync_host_key(new LiteralMetadataValueKey<std::string> ("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync())))
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location", mkt_significant, params.location())),
+ distdir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("distdir", "distdir", mkt_normal, params.distdir())),
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format", mkt_significant, "cran")),
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("builddir", "builddir", mkt_normal, params.builddir())),
+ library_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("library", "library", mkt_normal, params.library())),
+ sync_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync", "sync", mkt_normal, params.sync())),
+ sync_host_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync())))
{
}
@@ -165,7 +165,7 @@ CRANRepository::category_names() const
Context context("When fetching category names in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
- std::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
+ std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("cran"));
return result;
@@ -178,7 +178,7 @@ CRANRepository::package_names(const CategoryNamePart & c) const
+ "' in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
if (! has_category_named(c))
return result;
@@ -197,7 +197,7 @@ CRANRepository::package_ids(const QualifiedPackageName & n) const
+ stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
- std::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
if (! has_package_named(n))
return result;
@@ -222,7 +222,7 @@ CRANRepository::need_ids() const
for (DirIterator d(_imp->params.location()), d_end ; d != d_end ; ++d)
if (is_file_with_extension(*d, ".DESCRIPTION", IsFileWithOptions()))
{
- std::shared_ptr<cranrepository::CRANPackageID> id(new cranrepository::CRANPackageID(_imp->params.environment(),
+ std::shared_ptr<cranrepository::CRANPackageID> id(std::make_shared<cranrepository::CRANPackageID>(_imp->params.environment(),
shared_from_this(), *d));
if (! _imp->ids.insert(std::make_pair(id->name(), id)).second)
Log::get_instance()->message("cran.id.duplicate", ll_warning, lc_context)
@@ -420,7 +420,7 @@ CRANRepository::repository_factory_create(
if (builddir.empty())
builddir = "/var/tmp/paludis";
- return std::shared_ptr<Repository>(new CRANRepository(make_named_values<CRANRepositoryParams>(
+ return std::shared_ptr<Repository>(std::make_shared<CRANRepository>(make_named_values<CRANRepositoryParams>(
n::builddir() = builddir,
n::distdir() = distdir,
n::environment() = env,
diff --git a/paludis/repositories/cran/cran_repository_TEST.cc b/paludis/repositories/cran/cran_repository_TEST.cc
index cefa23ea0..6f11f2cfb 100644
--- a/paludis/repositories/cran/cran_repository_TEST.cc
+++ b/paludis/repositories/cran/cran_repository_TEST.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006 Danny van Dyk
- * 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
@@ -55,7 +55,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "cran");
keys->insert("library", "cran_repository_TEST_dir/library");
keys->insert("location", "cran_repository_TEST_dir/repo1");
@@ -75,7 +75,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "cran");
keys->insert("library", "cran_repository_TEST_dir/library");
keys->insert("location", "cran_repository_TEST_dir/repo2");
diff --git a/paludis/repositories/cran/keys.cc b/paludis/repositories/cran/keys.cc
index 10d4d1f9d..1aee8aaea 100644
--- a/paludis/repositories/cran/keys.cc
+++ b/paludis/repositories/cran/keys.cc
@@ -40,7 +40,7 @@ using namespace paludis::cranrepository;
PackageIDSequenceKey::PackageIDSequenceKey(const Environment * const e,
const std::string & r, const std::string & h, const MetadataKeyType t) :
_env(e),
- _v(new PackageIDSequence),
+ _v(std::make_shared<PackageIDSequence>()),
_r(r),
_h(h),
_t(t)
diff --git a/paludis/repositories/cran/package_dep_spec.cc b/paludis/repositories/cran/package_dep_spec.cc
index 939ad0e43..e96b03913 100644
--- a/paludis/repositories/cran/package_dep_spec.cc
+++ b/paludis/repositories/cran/package_dep_spec.cc
@@ -164,7 +164,7 @@ paludis::cranrepository::parse_cran_package_dep_spec(const std::string & ss)
{
Context context("When parsing CRAN package dep spec '" + ss + "':");
- std::shared_ptr<CRANPackageDepSpecData> data(new CRANPackageDepSpecData);
+ std::shared_ptr<CRANPackageDepSpecData> data(std::make_shared<CRANPackageDepSpecData>());
std::string s(ss);
std::string::size_type p(s.find('('));
diff --git a/paludis/repositories/cran/registration.cc b/paludis/repositories/cran/registration.cc
index 1d178ba8a..811cb89a4 100644
--- a/paludis/repositories/cran/registration.cc
+++ b/paludis/repositories/cran/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 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
@@ -47,7 +47,7 @@ namespace paludis
template <>
void register_repositories<repository_groups::cran>(const repository_groups::cran * const, RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > cran_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > cran_formats(std::make_shared<Set<std::string>>());
cran_formats->insert("cran");
factory->add_repository_format(
@@ -58,7 +58,7 @@ namespace paludis
&CRANRepository::repository_factory_dependencies
);
- std::shared_ptr<Set<std::string> > installed_cran_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > installed_cran_formats(std::make_shared<Set<std::string>>());
installed_cran_formats->insert("installed_cran");
installed_cran_formats->insert("installed-cran");
diff --git a/paludis/repositories/e/aa_visitor_TEST.cc b/paludis/repositories/e/aa_visitor_TEST.cc
index 9e5d40a8d..6b39e3337 100644
--- a/paludis/repositories/e/aa_visitor_TEST.cc
+++ b/paludis/repositories/e/aa_visitor_TEST.cc
@@ -42,7 +42,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo"))));
env.package_database()->add_repository(1, repo);
diff --git a/paludis/repositories/e/check_fetched_files_visitor.cc b/paludis/repositories/e/check_fetched_files_visitor.cc
index 03fe76781..0b6cfa98f 100644
--- a/paludis/repositories/e/check_fetched_files_visitor.cc
+++ b/paludis/repositories/e/check_fetched_files_visitor.cc
@@ -95,10 +95,10 @@ namespace paludis
exclude_unmirrorable(x),
ignore_unfetched(u),
ignore_not_in_manifest(nm),
- failures(new Sequence<FetchActionFailure>),
+ failures(std::make_shared<Sequence<FetchActionFailure>>()),
need_nofetch(false),
in_nofetch(n),
- m2r(new Manifest2Reader(m2)),
+ m2r(std::make_shared<Manifest2Reader>(m2)),
use_manifest(um),
output_manager(md)
{
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index b200d6bab..ab225ac05 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -85,7 +85,7 @@ namespace
const EAPI & eapi,
const std::shared_ptr<const PackageID> & id)
{
- std::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
+ std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_elike_package_dep_spec(s, eapi.supported()->package_dep_spec_parse_options(),
eapi.supported()->version_spec_options(), id)));
h.begin()->item()->append(spec);
@@ -117,7 +117,7 @@ namespace
strong = true;
}
- std::shared_ptr<BlockDepSpec> spec(new BlockDepSpec(
+ std::shared_ptr<BlockDepSpec> spec(std::make_shared<BlockDepSpec>(
s,
parse_elike_package_dep_spec(s.substr(specstart),
eapi.supported()->package_dep_spec_parse_options(),
@@ -137,7 +137,7 @@ namespace
const typename ParseStackTypes<T_>::AnnotationsGoHere & annotations_go_here,
const std::string & s)
{
- std::shared_ptr<LicenseDepSpec> spec(new LicenseDepSpec(s));
+ std::shared_ptr<LicenseDepSpec> spec(std::make_shared<LicenseDepSpec>(s));
h.begin()->item()->append(spec);
annotations_go_here(spec);
}
@@ -148,7 +148,7 @@ namespace
const typename ParseStackTypes<T_>::AnnotationsGoHere & annotations_go_here,
const std::string & s)
{
- std::shared_ptr<PlainTextDepSpec> spec(new PlainTextDepSpec(s));
+ std::shared_ptr<PlainTextDepSpec> spec(std::make_shared<PlainTextDepSpec>(s));
h.begin()->item()->append(spec);
annotations_go_here(spec);
}
@@ -159,7 +159,7 @@ namespace
const typename ParseStackTypes<T_>::AnnotationsGoHere & annotations_go_here,
const std::string & s)
{
- std::shared_ptr<SimpleURIDepSpec> spec(new SimpleURIDepSpec(s));
+ std::shared_ptr<SimpleURIDepSpec> spec(std::make_shared<SimpleURIDepSpec>(s));
h.begin()->item()->append(spec);
annotations_go_here(spec);
}
@@ -175,7 +175,7 @@ namespace
{
if (t.empty() || eapi.supported()->dependency_spec_tree_parse_options()[dstpo_uri_supports_arrow])
{
- std::shared_ptr<FetchableURIDepSpec> spec(new FetchableURIDepSpec(t.empty() ? f : f + " -> " + t));
+ std::shared_ptr<FetchableURIDepSpec> spec(std::make_shared<FetchableURIDepSpec>(t.empty() ? f : f + " -> " + t));
h.begin()->item()->append(spec);
annotations_go_here(spec);
}
@@ -250,7 +250,7 @@ namespace
template <typename T_, typename A_>
void any_all_handler(typename ParseStackTypes<T_>::Stack & stack)
{
- std::shared_ptr<A_> spec(new A_);
+ std::shared_ptr<A_> spec(std::make_shared<A_>());
stack.push_front(make_named_values<typename ParseStackTypes<T_>::Item>(
n::item() = stack.begin()->item()->append(spec),
n::spec() = spec
@@ -264,7 +264,7 @@ namespace
const Environment * const env,
const std::shared_ptr<const PackageID> & id)
{
- std::shared_ptr<ConditionalDepSpec> spec(new ConditionalDepSpec(parse_elike_conditional_dep_spec(
+ std::shared_ptr<ConditionalDepSpec> spec(std::make_shared<ConditionalDepSpec>(parse_elike_conditional_dep_spec(
u, env, id, bool(id->repository()->installed_root_key()))));
stack.push_front(make_named_values<typename ParseStackTypes<T_>::Item>(
n::item() = stack.begin()->item()->append(spec),
@@ -303,7 +303,7 @@ namespace
void set_annotations(std::shared_ptr<DepSpec> & spec, const std::shared_ptr<const Map<std::string, std::string> > & m)
{
- std::shared_ptr<ELikeAnnotations> key(new ELikeAnnotations(m));
+ std::shared_ptr<ELikeAnnotations> key(std::make_shared<ELikeAnnotations>(m));
spec->set_annotations_key(key);
}
@@ -320,7 +320,7 @@ paludis::erepository::parse_depend(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<DependencySpecTree>::Stack stack;
- std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
+ std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>());
std::shared_ptr<DepSpec> thing_to_annotate(spec);
std::shared_ptr<DependencySpecTree> top(std::make_shared<DependencySpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<DependencySpecTree>::Item>(
@@ -363,7 +363,7 @@ paludis::erepository::parse_provide(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<ProvideSpecTree>::Stack stack;
- std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
+ std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>());
std::shared_ptr<DepSpec> thing_to_annotate(spec);
std::shared_ptr<ProvideSpecTree> top(std::make_shared<ProvideSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<ProvideSpecTree>::Item>(
@@ -402,7 +402,7 @@ paludis::erepository::parse_fetchable_uri(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<FetchableURISpecTree>::Stack stack;
- std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
+ std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>());
std::shared_ptr<DepSpec> thing_to_annotate(spec);
std::shared_ptr<FetchableURISpecTree> top(std::make_shared<FetchableURISpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<FetchableURISpecTree>::Item>(
@@ -445,7 +445,7 @@ paludis::erepository::parse_simple_uri(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<SimpleURISpecTree>::Stack stack;
- std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
+ std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>());
std::shared_ptr<DepSpec> thing_to_annotate(spec);
std::shared_ptr<SimpleURISpecTree> top(std::make_shared<SimpleURISpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<SimpleURISpecTree>::Item>(
@@ -484,7 +484,7 @@ paludis::erepository::parse_license(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<LicenseSpecTree>::Stack stack;
- std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
+ std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>());
std::shared_ptr<DepSpec> thing_to_annotate(spec);
std::shared_ptr<LicenseSpecTree> top(std::make_shared<LicenseSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<LicenseSpecTree>::Item>(
@@ -523,7 +523,7 @@ paludis::erepository::parse_plain_text(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<PlainTextSpecTree>::Stack stack;
- std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
+ std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>());
std::shared_ptr<DepSpec> thing_to_annotate(spec);
std::shared_ptr<PlainTextSpecTree> top(std::make_shared<PlainTextSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<PlainTextSpecTree>::Item>(
@@ -562,7 +562,7 @@ paludis::erepository::parse_myoptions(const std::string & s,
using namespace std::placeholders;
ParseStackTypes<PlainTextSpecTree>::Stack stack;
- std::shared_ptr<AllDepSpec> spec(new AllDepSpec);
+ std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>());
std::shared_ptr<DepSpec> thing_to_annotate(spec);
std::shared_ptr<PlainTextSpecTree> top(std::make_shared<PlainTextSpecTree>(spec));
stack.push_front(make_named_values<ParseStackTypes<PlainTextSpecTree>::Item>(
@@ -608,7 +608,7 @@ paludis::erepository::parse_uri_label(const std::string & s, const EAPI & e)
if (c.empty())
throw EDepParseError(s, "Unknown label");
- std::shared_ptr<URILabelsDepSpec> l(new URILabelsDepSpec);
+ std::shared_ptr<URILabelsDepSpec> l(std::make_shared<URILabelsDepSpec>());
if (c == "URIMirrorsThenListedLabel")
l->add_label(std::make_shared<URIMirrorsThenListedLabel>(s.substr(0, s.length() - 1)));
@@ -688,7 +688,7 @@ paludis::erepository::parse_dependency_label(
std::string label(s.substr(0, s.length() - 1));
tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(label, "+", "", std::inserter(labels, labels.end()));
- std::shared_ptr<DependenciesLabelsDepSpec> l(new DependenciesLabelsDepSpec);
+ std::shared_ptr<DependenciesLabelsDepSpec> l(std::make_shared<DependenciesLabelsDepSpec>());
for (std::set<std::string>::iterator it = labels.begin(), it_e = labels.end(); it != it_e; ++it)
{
diff --git a/paludis/repositories/e/dep_parser_TEST.cc b/paludis/repositories/e/dep_parser_TEST.cc
index 0e5f9d89c..579081dbb 100644
--- a/paludis/repositories/e/dep_parser_TEST.cc
+++ b/paludis/repositories/e/dep_parser_TEST.cc
@@ -52,7 +52,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -78,7 +78,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -104,7 +104,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -131,7 +131,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -167,7 +167,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -189,7 +189,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -211,7 +211,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -245,7 +245,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -271,7 +271,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -296,7 +296,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -317,7 +317,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -349,7 +349,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -382,7 +382,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -437,7 +437,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -461,7 +461,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -484,7 +484,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
diff --git a/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc b/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc
index 33c6c7883..7fb6a36e0 100644
--- a/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc
+++ b/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc
@@ -43,7 +43,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -85,7 +85,7 @@ namespace test_cases
{
StringifyFormatter ff;
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
diff --git a/paludis/repositories/e/depend_rdepend_TEST.cc b/paludis/repositories/e/depend_rdepend_TEST.cc
index d63e6d970..0e409c667 100644
--- a/paludis/repositories/e/depend_rdepend_TEST.cc
+++ b/paludis/repositories/e/depend_rdepend_TEST.cc
@@ -107,7 +107,7 @@ namespace
FSEntry root(FSEntry::cwd() / "depend_rdepend_TEST_dir" / "root");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "depend_rdepend_TEST_dir" / "repo"));
@@ -123,7 +123,7 @@ namespace
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "vdb");
v_keys->insert("names_cache", "/var/empty");
v_keys->insert("provides_cache", "/var/empty");
@@ -134,12 +134,12 @@ namespace
env.package_database()->add_repository(1, v_repo);
#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
iv_keys->insert("root", "/");
iv_keys->insert("format", "installed_virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
diff --git a/paludis/repositories/e/dependencies_rewriter.cc b/paludis/repositories/e/dependencies_rewriter.cc
index ef91959d3..95543ca81 100644
--- a/paludis/repositories/e/dependencies_rewriter.cc
+++ b/paludis/repositories/e/dependencies_rewriter.cc
@@ -72,7 +72,7 @@ namespace paludis
LabelsStack labels;
Imp() :
- default_labels(new DependenciesLabelSequence)
+ default_labels(std::make_shared<DependenciesLabelSequence>())
{
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)));
@@ -133,7 +133,7 @@ DependenciesRewriter::visit(const DependencySpecTree::NodeType<DependenciesLabel
_imp->rdepend.append(" " + stringify(*node.spec()) + get_annotations(*node.spec()));
_imp->pdepend.append(" " + stringify(*node.spec()) + get_annotations(*node.spec()));
- std::shared_ptr<DependenciesLabelSequence> labels(new DependenciesLabelSequence);
+ std::shared_ptr<DependenciesLabelSequence> labels(std::make_shared<DependenciesLabelSequence>());
std::copy(node.spec()->begin(), node.spec()->end(), labels->back_inserter());
*_imp->labels.begin() = labels;
}
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 144c74c51..395249d33 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -293,7 +293,7 @@ EChoicesKey::populate_myoptions() const
{
Context local_context("When using raw_myoptions_key to populate choices:");
- std::shared_ptr<Choice> options(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> options(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = true,
n::contains_every_value() = false,
n::hidden() = false,
@@ -321,7 +321,7 @@ EChoicesKey::populate_myoptions() const
std::string lower_u;
std::transform(u->begin(), u->end(), std::back_inserter(lower_u), &::tolower);
- std::shared_ptr<Choice> exp(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> exp(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = true,
n::contains_every_value() = false,
n::hidden() = hidden ? hidden->end() != hidden->find(*u) : false,
@@ -367,7 +367,7 @@ EChoicesKey::populate_iuse() const
{
Context local_context("When using raw_iuse_key and raw_use_key to populate choices:");
- std::shared_ptr<Choice> use(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> use(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = true,
n::contains_every_value() = false,
n::hidden() = false,
@@ -475,7 +475,7 @@ EChoicesKey::populate_iuse() const
std::string env_arch(_imp->id->eapi()->supported()->ebuild_environment_variables()->env_arch());
if ((! env_arch.empty()) && _imp->maybe_e_repository && ! _imp->id->eapi()->supported()->ebuild_options()->require_use_expand_in_iuse())
{
- std::shared_ptr<Choice> arch(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> arch(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = false,
n::contains_every_value() = false,
n::hidden() = true,
@@ -499,7 +499,7 @@ EChoicesKey::populate_iuse() const
{
std::string lower_u;
std::transform(u->begin(), u->end(), std::back_inserter(lower_u), &::tolower);
- std::shared_ptr<Choice> exp(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> exp(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = true,
n::contains_every_value() = ! _imp->id->eapi()->supported()->ebuild_options()->require_use_expand_in_iuse(),
n::hidden() = hidden ? hidden->end() != hidden->find(*u) : false,
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 01754ad3a..5881861ee 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -232,10 +232,10 @@ EInstalledRepository::perform_config(
FSEntry ver_dir(id->fs_location_key()->value());
- std::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> eclassdirs(std::make_shared<FSEntrySequence>());
eclassdirs->push_back(ver_dir);
- std::shared_ptr<FSEntry> load_env(new FSEntry(ver_dir / "environment.bz2"));
+ std::shared_ptr<FSEntry> load_env(std::make_shared<FSEntry>(ver_dir / "environment.bz2"));
EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_config());
for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
@@ -287,10 +287,10 @@ EInstalledRepository::perform_info(
FSEntry ver_dir(id->fs_location_key()->value());
- std::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> eclassdirs(std::make_shared<FSEntrySequence>());
eclassdirs->push_back(ver_dir);
- std::shared_ptr<FSEntry> load_env(new FSEntry(ver_dir / "environment.bz2"));
+ std::shared_ptr<FSEntry> load_env(std::make_shared<FSEntry>(ver_dir / "environment.bz2"));
EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_info());
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index 9afdf7c45..1c276c13e 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -139,10 +139,10 @@ namespace paludis
environment(e),
repository(r),
dir(f),
- raw_dependencies_labels(new DependenciesLabelSequence),
- build_dependencies_labels(new DependenciesLabelSequence),
- run_dependencies_labels(new DependenciesLabelSequence),
- post_dependencies_labels(new DependenciesLabelSequence)
+ raw_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ build_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ run_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ post_dependencies_labels(std::make_shared<DependenciesLabelSequence>())
{
raw_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build",
return_literal_function(true)));
@@ -497,7 +497,7 @@ EInstalledRepositoryID::need_keys_added() const
add_metadata_key(_imp->keys->choices);
- std::shared_ptr<Set<std::string> > from_repositories_value(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > from_repositories_value(std::make_shared<Set<std::string>>());
if ((_imp->dir / "REPOSITORY").exists())
from_repositories_value->insert(file_contents(_imp->dir / "REPOSITORY"));
if ((_imp->dir / "repository").exists())
@@ -1037,7 +1037,7 @@ EInstalledRepositoryID::add_build_options(const std::shared_ptr<Choices> & choic
{
if (eapi()->supported())
{
- std::shared_ptr<Choice> build_options(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> build_options(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = false,
n::contains_every_value() = false,
n::hidden() = false,
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index c567aff92..0e468383e 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -824,7 +824,7 @@ EKeywordsKey::pretty_print_flat(const Formatter<KeywordName> & f) const
if (! result.empty())
result.append(" ");
- std::shared_ptr<KeywordNameSet> k(new KeywordNameSet);
+ std::shared_ptr<KeywordNameSet> k(std::make_shared<KeywordNameSet>());
k->insert(*i);
if (_imp->env->accept_keywords(k, *_imp->id))
result.append(f.format(*i, format::Accepted()));
@@ -1010,7 +1010,7 @@ EContentsKey::value() const
if ("obj" == tokens.at(0))
{
- std::shared_ptr<ContentsEntry> e(new ContentsFileEntry(tokens.at(1)));
+ std::shared_ptr<ContentsEntry> e(std::make_shared<ContentsFileEntry>(tokens.at(1)));
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)));
@@ -1018,18 +1018,18 @@ EContentsKey::value() const
}
else if ("dir" == tokens.at(0))
{
- std::shared_ptr<ContentsEntry> e(new ContentsDirEntry(tokens.at(1)));
+ std::shared_ptr<ContentsEntry> e(std::make_shared<ContentsDirEntry>(tokens.at(1)));
_imp->value->add(e);
}
else if ("sym" == tokens.at(0))
{
- std::shared_ptr<ContentsEntry> e(new ContentsSymEntry(tokens.at(1), tokens.at(2)));
+ std::shared_ptr<ContentsEntry> e(std::make_shared<ContentsSymEntry>(tokens.at(1), tokens.at(2)));
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))
- _imp->value->add(std::shared_ptr<ContentsEntry>(new ContentsOtherEntry(tokens.at(1))));
+ _imp->value->add(std::shared_ptr<ContentsEntry>(std::make_shared<ContentsOtherEntry>(tokens.at(1))));
else
Log::get_instance()->message("e.contents.unknown", ll_warning, lc_context) << "CONTENTS has unsupported entry type '" <<
tokens.at(0) << "', skipping";
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 81f5916dd..a3748968a 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -266,61 +266,61 @@ namespace paludis
repo(r),
params(p),
mutexes(m),
- names_cache(new RepositoryNameCache(p.names_cache(), r)),
+ names_cache(std::make_shared<RepositoryNameCache>(p.names_cache(), r)),
has_repo_mask(false),
has_mirrors(false),
- sets_ptr(new ERepositorySets(params.environment(), r, p)),
+ sets_ptr(std::make_shared<ERepositorySets>(params.environment(), r, p)),
layout(LayoutFactory::get_instance()->create(params.layout(), r, params.location(), get_master_locations(
params.master_repositories()))),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, params.entry_format())),
- layout_key(new LiteralMetadataValueKey<std::string> ("layout", "layout",
+ layout_key(std::make_shared<LiteralMetadataValueKey<std::string> >("layout", "layout",
mkt_normal, params.layout())),
- profile_layout_key(new LiteralMetadataValueKey<std::string> ("profile_layout", "profile_layout",
+ profile_layout_key(std::make_shared<LiteralMetadataValueKey<std::string> >("profile_layout", "profile_layout",
mkt_normal, params.profile_layout())),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- profiles_key(new LiteralMetadataFSEntrySequenceKey(
+ profiles_key(std::make_shared<LiteralMetadataFSEntrySequenceKey>(
"profiles", "profiles", mkt_normal, params.profiles())),
- cache_key(new LiteralMetadataValueKey<FSEntry> ("cache", "cache",
+ cache_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("cache", "cache",
mkt_normal, params.cache())),
- write_cache_key(new LiteralMetadataValueKey<FSEntry> ("write_cache", "write_cache",
+ write_cache_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("write_cache", "write_cache",
mkt_normal, params.write_cache())),
- append_repository_name_to_write_cache_key(new LiteralMetadataValueKey<std::string> (
+ append_repository_name_to_write_cache_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"append_repository_name_to_write_cache", "append_repository_name_to_write_cache",
mkt_internal, stringify(params.append_repository_name_to_write_cache()))),
- ignore_deprecated_profiles(new LiteralMetadataValueKey<std::string> (
+ ignore_deprecated_profiles(std::make_shared<LiteralMetadataValueKey<std::string> >(
"ignore_deprecated_profiles", "ignore_deprecated_profiles",
mkt_internal, stringify(params.ignore_deprecated_profiles()))),
- names_cache_key(new LiteralMetadataValueKey<FSEntry> (
+ names_cache_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"names_cache", "names_cache", mkt_normal, params.names_cache())),
- distdir_key(new LiteralMetadataValueKey<FSEntry> (
+ distdir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"distdir", "distdir", mkt_normal, params.distdir())),
- eclassdirs_key(new LiteralMetadataFSEntrySequenceKey(
+ eclassdirs_key(std::make_shared<LiteralMetadataFSEntrySequenceKey>(
"eclassdirs", "eclassdirs", mkt_normal, params.eclassdirs())),
- securitydir_key(new LiteralMetadataValueKey<FSEntry> (
+ securitydir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"securitydir", "securitydir", mkt_normal, params.securitydir())),
- setsdir_key(new LiteralMetadataValueKey<FSEntry> (
+ setsdir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"setsdir", "setsdir", mkt_normal, params.setsdir())),
- newsdir_key(new LiteralMetadataValueKey<FSEntry> (
+ newsdir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"newsdir", "newsdir", mkt_normal, params.newsdir())),
- sync_key(new LiteralMetadataValueKey<std::string> (
+ sync_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync", "sync", mkt_normal, params.sync())),
- sync_options_key(new LiteralMetadataValueKey<std::string> (
+ sync_options_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync_options", "sync_options", mkt_normal, params.sync_options())),
- builddir_key(new LiteralMetadataValueKey<FSEntry> (
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"builddir", "builddir", mkt_normal, params.builddir())),
master_repositories_key(params.master_repositories() ?
- std::shared_ptr<MetadataCollectionKey<Sequence<std::string> > >(new LiteralMetadataStringSequenceKey(
+ std::shared_ptr<MetadataCollectionKey<Sequence<std::string> > >(std::make_shared<LiteralMetadataStringSequenceKey>(
"master_repository", "master_repository", mkt_normal, get_master_names(params.master_repositories()))) :
std::shared_ptr<MetadataCollectionKey<Sequence<std::string> > >()),
- eapi_when_unknown_key(new LiteralMetadataValueKey<std::string> (
+ eapi_when_unknown_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"eapi_when_unknown", "eapi_when_unknown", mkt_normal, params.eapi_when_unknown())),
- eapi_when_unspecified_key(new LiteralMetadataValueKey<std::string> (
+ eapi_when_unspecified_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"eapi_when_unspecified", "eapi_when_unspecified", mkt_normal, params.eapi_when_unspecified())),
- profile_eapi_when_unspecified_key(new LiteralMetadataValueKey<std::string> (
+ profile_eapi_when_unspecified_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"profile_eapi_when_unspecified", "profile_eapi_when_unspecified", mkt_normal, params.profile_eapi_when_unspecified())),
- use_manifest_key(new LiteralMetadataValueKey<std::string> (
+ use_manifest_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"use_manifest", "use_manifest", mkt_normal, stringify(params.use_manifest()))),
info_pkgs_key(layout->info_packages_files()->end() != std::find_if(layout->info_packages_files()->begin(),
layout->info_packages_files()->end(),
@@ -337,20 +337,20 @@ namespace paludis
std::shared_ptr<InfoVarsMetadataKey>()
),
#ifdef ENABLE_PBINS
- binary_destination_key(new LiteralMetadataValueKey<std::string> (
+ binary_destination_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"binary_destination", "binary_destination", params.binary_destination() ? mkt_normal : mkt_internal,
stringify(params.binary_destination()))),
- binary_src_uri_prefix_key(new LiteralMetadataValueKey<std::string> (
+ binary_src_uri_prefix_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"binary_uri_prefix", "binary_uri_prefix", params.binary_destination() ? mkt_normal : mkt_internal,
params.binary_uri_prefix())),
- binary_keywords(new LiteralMetadataValueKey<std::string> (
+ binary_keywords(std::make_shared<LiteralMetadataValueKey<std::string> >(
"binary_keywords", "binary_keywords", params.binary_destination() ? mkt_normal : mkt_internal,
params.binary_keywords())),
#endif
accounts_repository_data_location_key(layout->accounts_repository_data_location_key()),
e_updates_location_key(layout->e_updates_location_key()),
- sync_host_key(new LiteralMetadataValueKey<std::string> ("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync()))),
- eclass_mtimes(new EclassMtimes(r, params.eclassdirs())),
+ sync_host_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync()))),
+ eclass_mtimes(std::make_shared<EclassMtimes>(r, params.eclassdirs())),
master_mtime(0)
{
@@ -404,7 +404,7 @@ namespace paludis
if (f->is_regular_file_or_symlink_to_regular_file())
profiles_desc = *f;
- std::shared_ptr<FSEntrySequence> auto_profiles(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> auto_profiles(std::make_shared<FSEntrySequence>());
if (profiles_desc == FSEntry("/dev/null"))
{
@@ -616,7 +616,7 @@ ERepository::repository_masked(const PackageID & id) const
{
try
{
- std::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(parse_elike_package_dep_spec(
+ std::shared_ptr<const PackageDepSpec> a(std::make_shared<PackageDepSpec>(parse_elike_package_dep_spec(
line->second.first, line->first->supported()->package_dep_spec_parse_options(),
line->first->supported()->version_spec_options(),
std::shared_ptr<const PackageID>())));
@@ -714,7 +714,7 @@ ERepository::need_mirrors() const
if (ee.size() > 6)
ee.resize(6);
- std::shared_ptr<MirrorsSequence> ms(new MirrorsSequence);
+ std::shared_ptr<MirrorsSequence> ms(std::make_shared<MirrorsSequence>());
for (std::vector<std::string>::const_iterator e(next(ee.begin())),
e_end(ee.end()) ; e != e_end ; ++e)
ms->push_back(*e);
@@ -806,7 +806,7 @@ ERepository::purge_invalid_cache() const
const std::shared_ptr<const EAPI> eapi(EAPIData::get_instance()->eapi_from_string(
_imp->params.eapi_when_unknown()));
- std::shared_ptr<EclassMtimes> eclass_mtimes(new EclassMtimes(this, _imp->params.eclassdirs()));
+ std::shared_ptr<EclassMtimes> eclass_mtimes(std::make_shared<EclassMtimes>(this, _imp->params.eclassdirs()));
time_t master_mtime(0);
FSEntry master_mtime_file(_imp->params.location() / "metadata" / "timestamp");
if (master_mtime_file.exists())
@@ -925,7 +925,7 @@ ERepository::virtual_packages() const
_imp->need_profiles();
- std::shared_ptr<VirtualsSequence> result(new VirtualsSequence);
+ std::shared_ptr<VirtualsSequence> result(std::make_shared<VirtualsSequence>());
for (Map<QualifiedPackageName, PackageDepSpec>::ConstIterator i(_imp->profile_ptr->virtuals()->begin()),
i_end(_imp->profile_ptr->virtuals()->end()) ; i != i_end ; ++i)
@@ -1297,7 +1297,7 @@ ERepository::repository_factory_create(
}
}
- std::shared_ptr<FSEntrySequence> profiles(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> profiles(std::make_shared<FSEntrySequence>());
bool profiles_explicitly_set(false), auto_profiles(false);
tokenise_whitespace(f("profiles"), create_inserter<FSEntry>(std::back_inserter(*profiles)));
if (profiles->empty())
@@ -1318,7 +1318,7 @@ ERepository::repository_factory_create(
else
profiles_explicitly_set = true;
- std::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> eclassdirs(std::make_shared<FSEntrySequence>());
tokenise_whitespace(f("eclassdirs"), create_inserter<FSEntry>(std::back_inserter(*eclassdirs)));
if (eclassdirs->empty())
{
@@ -1501,7 +1501,7 @@ ERepository::repository_factory_create(
throw ERepositoryConfigurationError("binary_destination = true, but binary_keywords is unset or empty");
}
- return std::shared_ptr<ERepository>(new ERepository(make_named_values<ERepositoryParams>(
+ return std::shared_ptr<ERepository>(std::make_shared<ERepository>(make_named_values<ERepositoryParams>(
n::append_repository_name_to_write_cache() = append_repository_name_to_write_cache,
n::auto_profiles() = auto_profiles,
n::binary_destination() = binary_destination,
@@ -1541,7 +1541,7 @@ ERepository::repository_factory_dependencies(
const Environment * const,
const std::function<std::string (const std::string &)> & f)
{
- std::shared_ptr<RepositoryNameSet> result(new RepositoryNameSet);
+ std::shared_ptr<RepositoryNameSet> result(std::make_shared<RepositoryNameSet>());
if (! f("master_repository").empty())
result->insert(RepositoryName(f("master_repository")));
else
@@ -1714,7 +1714,7 @@ ERepository::make_id(const QualifiedPackageName & q, const FSEntry & f) const
{
Context context("When creating ID for '" + stringify(q) + "' from '" + stringify(f) + "':");
- std::shared_ptr<EbuildID> result(new EbuildID(q, extract_package_file_version(q, f),
+ std::shared_ptr<EbuildID> result(std::make_shared<EbuildID>(q, extract_package_file_version(q, f),
_imp->params.environment(),
shared_from_this(), f, _guess_eapi(q, f),
_imp->master_mtime, _imp->eclass_mtimes));
@@ -1824,8 +1824,7 @@ namespace
const ERepositoryID & e,
std::shared_ptr<const Profile> profile)
{
- std::shared_ptr<Map<std::string, std::string> > expand_vars(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > expand_vars(std::make_shared<Map<std::string, std::string> >());
if (! e.eapi()->supported())
{
@@ -2335,7 +2334,7 @@ ERepository::install(const std::shared_ptr<const ERepositoryID> & id,
stringify(id->name().package()) + "-" + stringify(id->version())));
std::string used_config_protect;
- std::shared_ptr<FSEntrySet> merged_entries(new FSEntrySet);
+ std::shared_ptr<FSEntrySet> merged_entries(std::make_shared<FSEntrySet>());
std::shared_ptr<const ChoiceValue> preserve_work_choice(
id->choices_key()->value()->find_by_name_with_prefix(
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index fe5dc0db4..6ef25fcea 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -98,7 +98,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo1"));
@@ -118,7 +118,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo2"));
@@ -138,7 +138,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo3"));
@@ -158,7 +158,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo1"));
@@ -187,7 +187,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo1"));
@@ -218,7 +218,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo4"));
@@ -255,7 +255,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo4"));
@@ -296,7 +296,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo4"));
@@ -346,7 +346,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo5"));
@@ -379,8 +379,7 @@ namespace test_cases
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo4"));
@@ -425,7 +424,7 @@ namespace test_cases
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo8"));
@@ -477,8 +476,7 @@ namespace test_cases
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("write_cache", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo7/metadata/cache"));
@@ -560,8 +558,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo7"));
@@ -605,8 +602,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo9"));
@@ -687,8 +683,7 @@ namespace test_cases
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys18(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys18(std::make_shared<Map<std::string, std::string>>());
keys18->insert("format", "e");
keys18->insert("names_cache", "/var/empty");
keys18->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo18"));
@@ -698,8 +693,7 @@ namespace test_cases
std::bind(from_keys, keys18, std::placeholders::_1)));
env.package_database()->add_repository(1, repo18);
- std::shared_ptr<Map<std::string, std::string> > keys19(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys19(std::make_shared<Map<std::string, std::string>>());
keys19->insert("format", "e");
keys19->insert("names_cache", "/var/empty");
keys19->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo19"));
@@ -745,8 +739,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo10"));
@@ -781,8 +774,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo15"));
@@ -824,8 +816,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo15"));
@@ -873,8 +864,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo11"));
@@ -919,7 +909,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "exheres");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo12"));
@@ -1032,8 +1022,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "repo11"));
diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc
index 7d4c73a5d..fa3b7bfc6 100644
--- a/paludis/repositories/e/e_repository_TEST_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_0.cc
@@ -111,7 +111,7 @@ namespace test_cases
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_0_dir" / "repo"));
@@ -126,7 +126,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
@@ -138,12 +138,12 @@ namespace test_cases
env.package_database()->add_repository(2, installed_repo);
#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
iv_keys->insert("root", "/");
iv_keys->insert("format", "installed_virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
diff --git a/paludis/repositories/e/e_repository_TEST_1.cc b/paludis/repositories/e/e_repository_TEST_1.cc
index 291a36600..b2bf570a1 100644
--- a/paludis/repositories/e/e_repository_TEST_1.cc
+++ b/paludis/repositories/e/e_repository_TEST_1.cc
@@ -104,7 +104,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_1_dir" / "repo"));
@@ -119,7 +119,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/e_repository_TEST_2.cc b/paludis/repositories/e/e_repository_TEST_2.cc
index a1b5cdb64..ef6abb309 100644
--- a/paludis/repositories/e/e_repository_TEST_2.cc
+++ b/paludis/repositories/e/e_repository_TEST_2.cc
@@ -104,7 +104,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_2_dir" / "repo"));
@@ -119,7 +119,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/e_repository_TEST_3.cc b/paludis/repositories/e/e_repository_TEST_3.cc
index a7aa0fb5b..9ddd48169 100644
--- a/paludis/repositories/e/e_repository_TEST_3.cc
+++ b/paludis/repositories/e/e_repository_TEST_3.cc
@@ -104,7 +104,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_3_dir" / "repo"));
@@ -119,7 +119,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index dc597c914..6b1d96660 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -104,7 +104,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_4_dir" / "repo"));
@@ -119,7 +119,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc b/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
index 338f4a498..42b4471a7 100644
--- a/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
+++ b/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
@@ -94,8 +94,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_dependencies_rewriter_dir" / "repo"));
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index a3a573e2f..94c33e2b7 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -112,7 +112,7 @@ namespace
#endif
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_ever_dir" / "repo1"));
@@ -127,7 +127,7 @@ namespace
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
@@ -139,12 +139,12 @@ namespace
env.package_database()->add_repository(2, installed_repo);
#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
iv_keys->insert("root", "/");
iv_keys->insert("format", "installed_virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
index 55f4f5be5..773fe6e83 100644
--- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
@@ -109,7 +109,7 @@ namespace test_cases
#endif
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_exheres_0_dir" / "repo"));
@@ -124,7 +124,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
@@ -136,12 +136,12 @@ namespace test_cases
env.package_database()->add_repository(2, installed_repo);
#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
iv_keys->insert("root", "/");
iv_keys->insert("format", "installed_virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index 4d79a9ff8..518f376e6 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -120,7 +120,7 @@ namespace
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_exlibs_dir" / "repo1"));
@@ -135,7 +135,7 @@ namespace
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc
index ecc420060..39148346a 100644
--- a/paludis/repositories/e/e_repository_TEST_pbin.cc
+++ b/paludis/repositories/e/e_repository_TEST_pbin.cc
@@ -112,7 +112,7 @@ namespace test_cases
env.set_paludis_command("/bin/false");
FSEntry root(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / "root");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / ("repo" + base_eapi)));
@@ -128,7 +128,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<Map<std::string, std::string> > b_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > b_keys(std::make_shared<Map<std::string, std::string>>());
b_keys->insert("format", "e");
b_keys->insert("names_cache", "/var/empty");
b_keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / ("binrepo" + base_eapi)));
@@ -148,7 +148,7 @@ namespace test_cases
std::bind(from_keys, b_keys, std::placeholders::_1)));
env.package_database()->add_repository(2, b_repo);
- std::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "vdb");
v_keys->insert("names_cache", "/var/empty");
v_keys->insert("provides_cache", "/var/empty");
diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc
index e0aaaeb0a..f090ce493 100644
--- a/paludis/repositories/e/e_repository_TEST_phases.cc
+++ b/paludis/repositories/e/e_repository_TEST_phases.cc
@@ -120,7 +120,7 @@ namespace
#endif
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_phases_dir" / "repo1"));
@@ -135,7 +135,7 @@ namespace
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
@@ -147,12 +147,12 @@ namespace
env.package_database()->add_repository(2, installed_repo);
#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
iv_keys->insert("root", "/");
iv_keys->insert("format", "installed_virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "virtuals");
env.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
diff --git a/paludis/repositories/e/e_repository_TEST_replacing.cc b/paludis/repositories/e/e_repository_TEST_replacing.cc
index 3cf207605..f9a8f2f15 100644
--- a/paludis/repositories/e/e_repository_TEST_replacing.cc
+++ b/paludis/repositories/e/e_repository_TEST_replacing.cc
@@ -113,7 +113,7 @@ namespace
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_replacing_dir" / repo_path));
@@ -129,7 +129,7 @@ namespace
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
index 4d232ad07..6ad4bb402 100644
--- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
+++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
@@ -105,7 +105,7 @@ namespace test_cases
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_symlink_rewriting_dir" / "repo"));
diff --git a/paludis/repositories/e/e_repository_id.cc b/paludis/repositories/e/e_repository_id.cc
index 5f9ef1854..8f208bcf3 100644
--- a/paludis/repositories/e/e_repository_id.cc
+++ b/paludis/repositories/e/e_repository_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
@@ -28,7 +28,7 @@ using namespace paludis::erepository;
std::shared_ptr<const Set<std::string> >
ERepositoryID::breaks_portage() const
{
- std::shared_ptr<Set<std::string> > why(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > why(std::make_shared<Set<std::string>>());
if (version().has_try_part() || version().has_scm_part() || version().has_local_revision())
why->insert("version");
if ((! eapi()->supported()) || eapi()->supported()->breaks_portage())
diff --git a/paludis/repositories/e/e_repository_mask_file.cc b/paludis/repositories/e/e_repository_mask_file.cc
index e46400a15..c8201c3ee 100644
--- a/paludis/repositories/e/e_repository_mask_file.cc
+++ b/paludis/repositories/e/e_repository_mask_file.cc
@@ -59,7 +59,7 @@ MaskFile::MaskFile(const FSEntry & f, const LineConfigFileOptions & opts) :
myopts += lcfo_no_skip_blank_lines;
LineConfigFile file(f, myopts);
- std::shared_ptr<Sequence<std::string> > comment(new Sequence<std::string>);
+ std::shared_ptr<Sequence<std::string> > comment(std::make_shared<Sequence<std::string>>());
bool comment_used(false);
for (LineConfigFile::ConstIterator it(file.begin()), it_end(file.end()); it_end != it; ++it)
{
@@ -74,7 +74,7 @@ MaskFile::MaskFile(const FSEntry & f, const LineConfigFileOptions & opts) :
{
if (comment_used)
{
- std::shared_ptr<Sequence<std::string> > cpy(new Sequence<std::string>);
+ std::shared_ptr<Sequence<std::string> > cpy(std::make_shared<Sequence<std::string>>());
std::copy(comment->begin(), comment->end(), cpy->back_inserter());
comment = cpy;
comment_used = false;
@@ -83,7 +83,7 @@ MaskFile::MaskFile(const FSEntry & f, const LineConfigFileOptions & opts) :
continue;
}
- _imp->lines.push_back(std::make_pair(*it, std::shared_ptr<RepositoryMaskInfo>(new RepositoryMaskInfo(
+ _imp->lines.push_back(std::make_pair(*it, std::shared_ptr<RepositoryMaskInfo>(std::make_shared<RepositoryMaskInfo>(
make_named_values<RepositoryMaskInfo>(n::comment() = comment, n::mask_file() = f)))));
comment_used = true;
}
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 0b3ba46e7..0bf7847fb 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -113,7 +113,7 @@ ERepositorySets::package_set(const SetName & ss) const
if ((_imp->params.setsdir() / (stringify(s.first) + ".conf")).exists())
{
- std::shared_ptr<GeneralSetDepTag> tag(new GeneralSetDepTag(ss, stringify(_imp->e_repository->name())));
+ std::shared_ptr<GeneralSetDepTag> tag(std::make_shared<GeneralSetDepTag>(ss, stringify(_imp->e_repository->name())));
FSEntry ff(_imp->params.setsdir() / (stringify(s.first) + ".conf"));
Context context("When loading package set '" + stringify(s.first) + "' from '" + stringify(ff) + "':");
@@ -138,7 +138,7 @@ ERepositorySets::sets_list() const
{
Context context("While generating the list of sets:");
- std::shared_ptr<SetNameSet> result(new SetNameSet);
+ std::shared_ptr<SetNameSet> result(std::make_shared<SetNameSet>());
result->insert(SetName("insecurity"));
result->insert(SetName("security"));
result->insert(SetName("system"));
@@ -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(std::make_shared<AllDepSpec>()));
+ std::shared_ptr<SetSpecTree> security_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>()));
if (!_imp->params.securitydir().is_directory_or_symlink_to_directory())
return security_packages;
@@ -303,11 +303,11 @@ ERepositorySets::security_set(bool insecurity) const
if (glsa_tags.end() == glsa_tags.find(glsa->id()))
glsa_tags.insert(std::make_pair(glsa->id(), std::shared_ptr<GLSADepTag>(
- new GLSADepTag(glsa->id(), glsa->title(), *f))));
+ std::make_shared<GLSADepTag>(glsa->id(), glsa->title(), *f))));
if (insecurity)
{
- std::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
+ std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package((*c)->name())
.version_requirement(make_named_values<VersionRequirement>(
@@ -341,7 +341,7 @@ ERepositorySets::security_set(bool insecurity) const
continue;
}
- std::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package((*r)->name())
.version_requirement(make_named_values<VersionRequirement>(
n::version_operator() = vo_equal,
diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc
index 40d58df4c..308214c00 100644
--- a/paludis/repositories/e/e_repository_sets_TEST.cc
+++ b/paludis/repositories/e/e_repository_sets_TEST.cc
@@ -56,7 +56,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_sets_TEST_dir/repo1"));
@@ -83,14 +83,14 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_sets_TEST_dir/repo1"));
keys->insert("profiles", "e_repository_sets_TEST_dir/repo1/profiles/profile");
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- std::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
@@ -123,7 +123,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_sets_TEST_dir/repo1"));
@@ -154,8 +154,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string> >());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "e_repository_sets_TEST_dir/repo1"));
@@ -163,7 +162,7 @@ namespace test_cases
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index c4993cb7b..ce9d36c8d 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -149,7 +149,7 @@ namespace
std::shared_ptr<Set<std::string> > make_set(const std::string & s)
{
- std::shared_ptr<Set<std::string> > result(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > result(std::make_shared<Set<std::string>>());
tokenise_whitespace(s, result->inserter());
return result;
}
@@ -357,7 +357,7 @@ namespace paludis
std::bind(&predefined, stringify(d->dirname()), std::placeholders::_1, std::placeholders::_2),
&KeyValueConfigFile::no_transformation);
- std::shared_ptr<EAPI> eapi(new EAPI(make_named_values<EAPI>(
+ std::shared_ptr<EAPI> eapi(std::make_shared<EAPI>(make_named_values<EAPI>(
n::exported_name() = check_get(k, "exported_name"),
n::name() = strip_trailing_string(d->basename(), ".conf"),
n::supported() = make_supported_eapi(k)
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
index 0c98360c5..27c1eedbe 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
@@ -64,7 +64,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -92,7 +92,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -120,7 +120,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -149,7 +149,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -180,7 +180,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -208,7 +208,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -236,7 +236,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -264,7 +264,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -292,7 +292,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -320,7 +320,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -349,7 +349,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -377,7 +377,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -405,7 +405,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -434,7 +434,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -462,7 +462,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -490,7 +490,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -518,7 +518,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -546,7 +546,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -574,7 +574,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -602,7 +602,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -633,7 +633,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -661,7 +661,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -689,7 +689,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -716,7 +716,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -747,7 +747,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -778,7 +778,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -806,7 +806,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -834,7 +834,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -862,7 +862,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -897,7 +897,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -925,7 +925,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -953,7 +953,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -985,7 +985,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1017,7 +1017,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1046,7 +1046,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1075,7 +1075,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1104,7 +1104,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1140,7 +1140,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1169,7 +1169,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1204,7 +1204,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1240,7 +1240,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1276,7 +1276,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
@@ -1314,7 +1314,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "ebuild_flat_metadata_cache_TEST_dir/repo"));
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 03e55c52e..a35c128f4 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -133,10 +133,10 @@ namespace paludis
eclass_mtimes(m),
has_keys(false),
has_masks(false),
- raw_dependencies_labels(new DependenciesLabelSequence),
- build_dependencies_labels(new DependenciesLabelSequence),
- run_dependencies_labels(new DependenciesLabelSequence),
- post_dependencies_labels(new DependenciesLabelSequence)
+ raw_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ build_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ run_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ post_dependencies_labels(std::make_shared<DependenciesLabelSequence>())
{
raw_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build",
return_literal_function(true)));
@@ -335,7 +335,7 @@ EbuildID::need_keys_added() const
if (_imp->eapi->supported()->choices_options()->profile_iuse_injection())
{
- std::shared_ptr<Set<std::string> > iuse_effective(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > iuse_effective(std::make_shared<Set<std::string>>());
if (! _imp->raw_iuse)
throw InternalError(PALUDIS_HERE, "no raw_iuse?");
@@ -1382,7 +1382,7 @@ EbuildID::add_build_options(const std::shared_ptr<Choices> & choices) const
{
if (eapi()->supported())
{
- std::shared_ptr<Choice> build_options(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> build_options(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = false,
n::contains_every_value() = false,
n::hidden() = false,
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index b97918ea8..c323f28a4 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -82,13 +82,13 @@ namespace paludis
repository(n),
tree_root(t),
has_category_names(false),
- arch_list_files(new FSEntrySequence),
- repository_mask_files(new FSEntrySequence),
- profiles_desc_files(new FSEntrySequence),
- mirror_files(new FSEntrySequence),
- info_variables_files(new FSEntrySequence),
- info_packages_files(new FSEntrySequence),
- use_desc_files(new UseDescFileInfoSequence)
+ arch_list_files(std::make_shared<FSEntrySequence>()),
+ repository_mask_files(std::make_shared<FSEntrySequence>()),
+ profiles_desc_files(std::make_shared<FSEntrySequence>()),
+ mirror_files(std::make_shared<FSEntrySequence>()),
+ info_variables_files(std::make_shared<FSEntrySequence>()),
+ info_packages_files(std::make_shared<FSEntrySequence>()),
+ use_desc_files(std::make_shared<UseDescFileInfoSequence>())
{
}
};
@@ -231,7 +231,7 @@ ExheresLayout::need_package_ids(const QualifiedPackageName & n) const
Context context("When loading versions for '" + stringify(n) + "' in "
+ stringify(_imp->repository->name()) + ":");
- std::shared_ptr<PackageIDSequence> v(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> v(std::make_shared<PackageIDSequence>());
FSEntry path(_imp->tree_root / "packages" / stringify(n.category()) / stringify(n.package()));
@@ -359,7 +359,7 @@ ExheresLayout::package_names(const CategoryNamePart & c) const
need_category_names();
if (_imp->category_names.end() == _imp->category_names.find(c))
- return std::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
+ return std::shared_ptr<QualifiedPackageNameSet>(std::make_shared<QualifiedPackageNameSet>());
if ((_imp->tree_root / "packages" / stringify(c)).is_directory_or_symlink_to_directory())
for (DirIterator d(_imp->tree_root / "packages" / stringify(c)), d_end ; d != d_end ; ++d)
@@ -384,7 +384,7 @@ ExheresLayout::package_names(const CategoryNamePart & c) const
_imp->category_names[c] = true;
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
for (PackagesMap::const_iterator p(_imp->package_names.begin()), p_end(_imp->package_names.end()) ;
p != p_end ; ++p)
@@ -407,7 +407,7 @@ ExheresLayout::package_ids(const QualifiedPackageName & n) const
return _imp->ids.find(n)->second;
}
else
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
}
const std::shared_ptr<const FSEntrySequence>
@@ -476,7 +476,7 @@ ExheresLayout::profiles_base_dir() const
std::shared_ptr<const FSEntrySequence>
ExheresLayout::exlibsdirs(const QualifiedPackageName & q) const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
std::shared_ptr<const FSEntrySequence> global(exlibsdirs_global());
std::copy(global->begin(), global->end(), result->back_inserter());
@@ -493,7 +493,7 @@ ExheresLayout::exlibsdirs(const QualifiedPackageName & q) const
std::shared_ptr<const FSEntrySequence>
ExheresLayout::exlibsdirs_global() const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -512,7 +512,7 @@ ExheresLayout::exlibsdirs_global() const
std::shared_ptr<const FSEntrySequence>
ExheresLayout::exlibsdirs_category(const CategoryNamePart & c) const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -531,7 +531,7 @@ ExheresLayout::exlibsdirs_category(const CategoryNamePart & c) const
std::shared_ptr<const FSEntrySequence>
ExheresLayout::exlibsdirs_package(const QualifiedPackageName & q) const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -550,7 +550,7 @@ ExheresLayout::exlibsdirs_package(const QualifiedPackageName & q) const
std::shared_ptr<const FSEntrySequence>
ExheresLayout::licenses_dirs() const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -602,7 +602,7 @@ namespace
std::shared_ptr<Map<FSEntry, std::string> >
ExheresLayout::manifest_files(const QualifiedPackageName & qpn) const
{
- std::shared_ptr<Map<FSEntry, std::string> > result(new Map<FSEntry, std::string>);
+ std::shared_ptr<Map<FSEntry, std::string> > result(std::make_shared<Map<FSEntry, std::string>>());
FSEntry package_dir = _imp->repository->layout()->package_directory(qpn);
std::list<FSEntry> package_files((DirIterator(package_dir)),
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc
index 3550a61ed..7796de6c0 100644
--- a/paludis/repositories/e/exheres_profile.cc
+++ b/paludis/repositories/e/exheres_profile.cc
@@ -98,7 +98,7 @@ namespace paludis
const std::string &, const bool) :
env(e),
repository(p),
- profiles_with_parents(new FSEntrySequence),
+ profiles_with_parents(std::make_shared<FSEntrySequence>()),
options_conf(make_named_values<PaludisLikeOptionsConfParams>(
n::allow_locking() = true,
n::environment() = e,
@@ -106,14 +106,14 @@ namespace paludis
)),
package_mask_file(p),
packages_file(p),
- use_expand(new Set<std::string>),
- use_expand_hidden(new Set<std::string>),
- use_expand_unprefixed(new Set<std::string>),
- use_expand_implicit(new Set<std::string>),
- iuse_implicit(new Set<std::string>),
- use_expand_values(new Set<std::string>),
- system_packages(new SetSpecTree(std::make_shared<AllDepSpec>())),
- system_tag(new GeneralSetDepTag(SetName("system"), stringify(name)))
+ use_expand(std::make_shared<Set<std::string>>()),
+ use_expand_hidden(std::make_shared<Set<std::string>>()),
+ use_expand_unprefixed(std::make_shared<Set<std::string>>()),
+ use_expand_implicit(std::make_shared<Set<std::string>>()),
+ iuse_implicit(std::make_shared<Set<std::string>>()),
+ use_expand_values(std::make_shared<Set<std::string>>()),
+ system_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>())),
+ system_tag(std::make_shared<GeneralSetDepTag>(SetName("system"), stringify(name)))
{
environment_variables["CONFIG_PROTECT"] = getenv_with_default("CONFIG_PROTECT", "/etc");
environment_variables["CONFIG_PROTECT_MASK"] = getenv_with_default("CONFIG_PROTECT_MASK", "");
@@ -155,7 +155,7 @@ ExheresProfile::ExheresProfile(
continue;
Context context_spec("When parsing '" + i->second + "':");
- std::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
+ std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_elike_package_dep_spec(i->second.substr(1),
i->first->supported()->package_dep_spec_parse_options(),
i->first->supported()->version_spec_options(),
@@ -173,7 +173,7 @@ ExheresProfile::ExheresProfile(
try
{
- std::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(
+ std::shared_ptr<const PackageDepSpec> a(std::make_shared<PackageDepSpec>(
parse_elike_package_dep_spec(line->second.first,
line->first->supported()->package_dep_spec_parse_options(),
line->first->supported()->version_spec_options(),
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 300d368b1..68aaa9c7c 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -78,15 +78,15 @@ namespace paludis
ndbam(params.location(), &supported_exndbam, "exndbam-1",
EAPIData::get_instance()->eapi_from_string(
params.eapi_when_unknown())->supported()->version_spec_options()),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
+ root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("root", "root",
mkt_normal, params.root())),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "vdb")),
- builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("builddir", "builddir",
mkt_normal, params.builddir())),
- eapi_when_unknown_key(new LiteralMetadataValueKey<std::string> (
+ eapi_when_unknown_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"eapi_when_unknown", "eapi_when_unknown", mkt_normal, params.eapi_when_unknown()))
{
}
@@ -160,7 +160,7 @@ ExndbamRepository::repository_factory_create(
*DistributionData::get_instance()->distribution_from_string(
env->distribution()))->default_eapi_when_unknown();
- return std::shared_ptr<Repository>(new ExndbamRepository(
+ return std::shared_ptr<Repository>(std::make_shared<ExndbamRepository>(
RepositoryName(name),
make_named_values<ExndbamRepositoryParams>(
n::builddir() = builddir,
@@ -208,7 +208,7 @@ std::shared_ptr<const PackageIDSequence>
ExndbamRepository::package_ids(const QualifiedPackageName & q) const
{
std::shared_ptr<NDBAMEntrySequence> entries(_imp->ndbam.entries(q));
- std::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
for (IndirectIterator<NDBAMEntrySequence::ConstIterator> e(entries->begin()), e_end(entries->end()) ;
e != e_end ; ++e)
@@ -496,9 +496,9 @@ ExndbamRepository::perform_uninstall(
std::shared_ptr<OutputManager> output_manager(a.options.make_output_manager()(a));
FSEntry ver_dir(id->fs_location_key()->value().realpath());
- std::shared_ptr<FSEntry> load_env(new FSEntry(ver_dir / "environment.bz2"));
+ std::shared_ptr<FSEntry> load_env(std::make_shared<FSEntry>(ver_dir / "environment.bz2"));
- std::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> eclassdirs(std::make_shared<FSEntrySequence>());
eclassdirs->push_back(ver_dir);
EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_uninstall());
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
index 614d4bbb9..660a51f45 100644
--- a/paludis/repositories/e/exndbam_repository_TEST.cc
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -75,7 +75,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "exndbam");
keys->insert("location", stringify(FSEntry::cwd() / "exndbam_repository_TEST_dir" / "repo1"));
keys->insert("builddir", stringify(FSEntry::cwd() / "exndbam_repository_TEST_dir" / "build"));
@@ -104,7 +104,7 @@ namespace test_cases
const std::string & chosen_one,
const std::string & victim) const
{
- std::shared_ptr<PackageIDSequence> replacing(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> replacing(std::make_shared<PackageIDSequence>());
if (! victim.empty())
replacing->push_back(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec(victim,
@@ -125,7 +125,7 @@ namespace test_cases
{
TestEnvironment env(FSEntry("exndbam_repository_TEST_dir/root").realpath());
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "exndbam_repository_TEST_dir" / "postinsttest_src1"));
diff --git a/paludis/repositories/e/extra_distribution_data.cc b/paludis/repositories/e/extra_distribution_data.cc
index 45c7df10a..4cfd6ecac 100644
--- a/paludis/repositories/e/extra_distribution_data.cc
+++ b/paludis/repositories/e/extra_distribution_data.cc
@@ -31,7 +31,7 @@ namespace
{
std::shared_ptr<const Set<std::string> > make_set(const std::string & s)
{
- std::shared_ptr<Set<std::string> > result(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > result(std::make_shared<Set<std::string>>());
tokenise_whitespace(s, result->inserter());
return result;
}
diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc
index 92f3e2c15..273a74506 100644
--- a/paludis/repositories/e/fetch_visitor_TEST.cc
+++ b/paludis/repositories/e/fetch_visitor_TEST.cc
@@ -46,7 +46,7 @@ namespace
const std::shared_ptr<const MirrorsSequence>
get_mirrors_fn(const std::string & m)
{
- const std::shared_ptr<MirrorsSequence> result(new MirrorsSequence);
+ const std::shared_ptr<MirrorsSequence> result(std::make_shared<MirrorsSequence>());
if (m == "repo")
result->push_back("http://fake-repo/fake-repo/");
if (m == "example")
@@ -64,7 +64,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index d38f35e4e..570b5fe98 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -61,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(std::make_shared<AllDepSpec>())),
+ result(std::make_shared<DependencySpecTree>(std::make_shared<AllDepSpec>())),
env(e),
eapi(a),
id(i)
diff --git a/paludis/repositories/e/fix_locked_dependencies_TEST.cc b/paludis/repositories/e/fix_locked_dependencies_TEST.cc
index 54f5ce016..56f8709f3 100644
--- a/paludis/repositories/e/fix_locked_dependencies_TEST.cc
+++ b/paludis/repositories/e/fix_locked_dependencies_TEST.cc
@@ -44,14 +44,14 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
env.package_database()->add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
- std::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
diff --git a/paludis/repositories/e/info_metadata_key.cc b/paludis/repositories/e/info_metadata_key.cc
index 7beddfa34..b8eee1ae8 100644
--- a/paludis/repositories/e/info_metadata_key.cc
+++ b/paludis/repositories/e/info_metadata_key.cc
@@ -193,7 +193,7 @@ InfoPkgsMetadataKey::need_keys_added() const
else
{
using namespace std::placeholders;
- std::shared_ptr<Set<std::string> > s(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > s(std::make_shared<Set<std::string>>());
std::transform(indirect_iterator(q->begin()), indirect_iterator(q->end()), s->inserter(),
std::bind(std::mem_fn(&PackageID::canonical_form), _1, idcf_version));
key = std::make_shared<LiteralMetadataStringSetKey>(i->first, i->first, mkt_normal, s);
diff --git a/paludis/repositories/e/layout.cc b/paludis/repositories/e/layout.cc
index c7f8cdcda..3de52c543 100644
--- a/paludis/repositories/e/layout.cc
+++ b/paludis/repositories/e/layout.cc
@@ -59,7 +59,7 @@ namespace
make_layout(const ERepository * const n, const FSEntry & b,
std::shared_ptr<const FSEntrySequence> f)
{
- return std::shared_ptr<Layout>(new T_(n, b, f));
+ return std::shared_ptr<Layout>(std::make_shared<T_>(n, b, f));
}
}
diff --git a/paludis/repositories/e/myoptions_requirements_verifier.cc b/paludis/repositories/e/myoptions_requirements_verifier.cc
index 75801a655..b40473c4e 100644
--- a/paludis/repositories/e/myoptions_requirements_verifier.cc
+++ b/paludis/repositories/e/myoptions_requirements_verifier.cc
@@ -53,7 +53,7 @@ namespace paludis
Imp(const std::shared_ptr<const ERepositoryID> & i) :
id(i),
- unmet_requirements(new Sequence<std::string>)
+ unmet_requirements(std::make_shared<Sequence<std::string>>())
{
current_prefix_stack.push_front(ChoicePrefixName(""));
current_children_stack.push_front(ChildrenList());
diff --git a/paludis/repositories/e/pipe_command_handler.cc b/paludis/repositories/e/pipe_command_handler.cc
index deea6cb49..4ca05b040 100644
--- a/paludis/repositories/e/pipe_command_handler.cc
+++ b/paludis/repositories/e/pipe_command_handler.cc
@@ -272,7 +272,7 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
"' resolves to '" << **entries->last() << "', which is a virtual for '"
<< *(*entries->last())->virtual_for_key()->value() << "'. This will break with "
"new style virtuals.";
- std::shared_ptr<PackageIDSequence> new_entries(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> new_entries(std::make_shared<PackageIDSequence>());
new_entries->push_back((*entries->last())->virtual_for_key()->value());
entries = new_entries;
}
@@ -332,7 +332,7 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
generator::Matches(spec, MatchPackageOptions()) | filter::InstalledAtRoot(environment->root()))]);
if (eapi->supported()->pipe_commands()->rewrite_virtuals() && (! entries->empty()))
{
- std::shared_ptr<PackageIDSequence> new_entries(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> new_entries(std::make_shared<PackageIDSequence>());
for (PackageIDSequence::ConstIterator i(entries->begin()), i_end(entries->end()) ;
i != i_end ; ++i)
{
diff --git a/paludis/repositories/e/profile.cc b/paludis/repositories/e/profile.cc
index 3f1c2d1d2..b46fbd8e4 100644
--- a/paludis/repositories/e/profile.cc
+++ b/paludis/repositories/e/profile.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
@@ -45,7 +45,7 @@ namespace
const std::string & a,
const bool x)
{
- return std::shared_ptr<Profile>(new T_(env, repo, name, locations, a, x));
+ return std::shared_ptr<Profile>(std::make_shared<T_>(env, repo, name, locations, a, x));
}
}
diff --git a/paludis/repositories/e/registration.cc b/paludis/repositories/e/registration.cc
index 2513f5157..166c21dd9 100644
--- a/paludis/repositories/e/registration.cc
+++ b/paludis/repositories/e/registration.cc
@@ -53,7 +53,7 @@ namespace paludis
void register_repositories<repository_groups::e>(const repository_groups::e * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > ebuild_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > ebuild_formats(std::make_shared<Set<std::string>>());
ebuild_formats->insert("e");
ebuild_formats->insert("ebuild");
ebuild_formats->insert("exheres");
@@ -66,7 +66,7 @@ namespace paludis
&ERepository::repository_factory_dependencies
);
- std::shared_ptr<Set<std::string> > vdb_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > vdb_formats(std::make_shared<Set<std::string>>());
vdb_formats->insert("vdb");
factory->add_repository_format(
@@ -77,7 +77,7 @@ namespace paludis
&VDBRepository::repository_factory_dependencies
);
- std::shared_ptr<Set<std::string> > exndbam_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > exndbam_formats(std::make_shared<Set<std::string>>());
exndbam_formats->insert("exndbam");
factory->add_repository_format(
diff --git a/paludis/repositories/e/source_uri_finder_TEST.cc b/paludis/repositories/e/source_uri_finder_TEST.cc
index f4a25f3d1..93326819d 100644
--- a/paludis/repositories/e/source_uri_finder_TEST.cc
+++ b/paludis/repositories/e/source_uri_finder_TEST.cc
@@ -36,7 +36,7 @@ namespace
const std::shared_ptr<MirrorsSequence>
get_mirrors_fn(const std::string & m)
{
- const std::shared_ptr<MirrorsSequence> result(new MirrorsSequence);
+ const std::shared_ptr<MirrorsSequence> result(std::make_shared<MirrorsSequence>());
if (m == "example")
result->push_back("http://fake-example/fake-example/");
if (m == "repo")
@@ -54,7 +54,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
@@ -84,7 +84,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index b0c114c0e..b2d9ce51e 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -82,13 +82,13 @@ namespace paludis
repository(r),
tree_root(t),
has_category_names(false),
- arch_list_files(new FSEntrySequence),
- repository_mask_files(new FSEntrySequence),
- profiles_desc_files(new FSEntrySequence),
- mirror_files(new FSEntrySequence),
- info_packages_files(new FSEntrySequence),
- info_variables_files(new FSEntrySequence),
- use_desc_files(new UseDescFileInfoSequence)
+ arch_list_files(std::make_shared<FSEntrySequence>()),
+ repository_mask_files(std::make_shared<FSEntrySequence>()),
+ profiles_desc_files(std::make_shared<FSEntrySequence>()),
+ mirror_files(std::make_shared<FSEntrySequence>()),
+ info_packages_files(std::make_shared<FSEntrySequence>()),
+ info_variables_files(std::make_shared<FSEntrySequence>()),
+ use_desc_files(std::make_shared<UseDescFileInfoSequence>())
{
}
};
@@ -243,7 +243,7 @@ TraditionalLayout::need_package_ids(const QualifiedPackageName & n) const
Context context("When loading versions for '" + stringify(n) + "' in "
+ stringify(_imp->repository->name()) + ":");
- std::shared_ptr<PackageIDSequence> v(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> v(std::make_shared<PackageIDSequence>());
FSEntry path(_imp->tree_root / stringify(n.category()) / stringify(n.package()));
@@ -370,7 +370,7 @@ TraditionalLayout::package_names(const CategoryNamePart & c) const
need_category_names();
if (_imp->category_names.end() == _imp->category_names.find(c))
- return std::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
+ return std::shared_ptr<QualifiedPackageNameSet>(std::make_shared<QualifiedPackageNameSet>());
if ((_imp->tree_root / stringify(c)).is_directory_or_symlink_to_directory())
for (DirIterator d(_imp->tree_root / stringify(c), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
@@ -395,7 +395,7 @@ TraditionalLayout::package_names(const CategoryNamePart & c) const
_imp->category_names[c] = true;
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
for (PackagesMap::const_iterator p(_imp->package_names.begin()), p_end(_imp->package_names.end()) ;
p != p_end ; ++p)
@@ -418,7 +418,7 @@ TraditionalLayout::package_ids(const QualifiedPackageName & n) const
return _imp->ids.find(n)->second;
}
else
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
}
const std::shared_ptr<const FSEntrySequence>
@@ -487,7 +487,7 @@ TraditionalLayout::profiles_base_dir() const
std::shared_ptr<const FSEntrySequence>
TraditionalLayout::exlibsdirs(const QualifiedPackageName & q) const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
std::shared_ptr<const FSEntrySequence> global(exlibsdirs_global());
std::copy(global->begin(), global->end(), result->back_inserter());
@@ -504,7 +504,7 @@ TraditionalLayout::exlibsdirs(const QualifiedPackageName & q) const
std::shared_ptr<const FSEntrySequence>
TraditionalLayout::exlibsdirs_global() const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -523,7 +523,7 @@ TraditionalLayout::exlibsdirs_global() const
std::shared_ptr<const FSEntrySequence>
TraditionalLayout::exlibsdirs_category(const CategoryNamePart & c) const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -542,7 +542,7 @@ TraditionalLayout::exlibsdirs_category(const CategoryNamePart & c) const
std::shared_ptr<const FSEntrySequence>
TraditionalLayout::exlibsdirs_package(const QualifiedPackageName & q) const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -561,7 +561,7 @@ TraditionalLayout::exlibsdirs_package(const QualifiedPackageName & q) const
std::shared_ptr<const FSEntrySequence>
TraditionalLayout::licenses_dirs() const
{
- std::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> result(std::make_shared<FSEntrySequence>());
if (_imp->repository->params().master_repositories())
{
@@ -613,7 +613,7 @@ namespace
std::shared_ptr<Map<FSEntry, std::string> >
TraditionalLayout::manifest_files(const QualifiedPackageName & qpn) const
{
- std::shared_ptr<Map<FSEntry, std::string> > result(new Map<FSEntry, std::string>);
+ std::shared_ptr<Map<FSEntry, std::string> > result(std::make_shared<Map<FSEntry, std::string>>());
FSEntry package_dir = _imp->repository->layout()->package_directory(qpn);
std::list<FSEntry> package_files((DirIterator(package_dir, DirIteratorOptions() + dio_inode_sort)),
diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc
index 1e33aa3c0..a92a0d3ff 100644
--- a/paludis/repositories/e/traditional_profile.cc
+++ b/paludis/repositories/e/traditional_profile.cc
@@ -193,15 +193,15 @@ namespace paludis
package_mask_file(p),
env(e),
repository(p),
- profiles_with_parents(new FSEntrySequence),
- 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>),
- use_expand_hidden(new Set<std::string>),
- use_expand_unprefixed(new Set<std::string>),
- use_expand_implicit(new Set<std::string>),
- iuse_implicit(new Set<std::string>)
+ profiles_with_parents(std::make_shared<FSEntrySequence>()),
+ system_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>())),
+ system_tag(std::make_shared<GeneralSetDepTag>(SetName("system"), stringify(name))),
+ virtuals(std::make_shared<Map<QualifiedPackageName, PackageDepSpec>>()),
+ use_expand(std::make_shared<Set<std::string>>()),
+ use_expand_hidden(std::make_shared<Set<std::string>>()),
+ use_expand_unprefixed(std::make_shared<Set<std::string>>()),
+ use_expand_implicit(std::make_shared<Set<std::string>>()),
+ iuse_implicit(std::make_shared<Set<std::string>>())
{
Context context("When loading profiles '" + join(dirs.begin(), dirs.end(), "' '") + "' for repository '" + stringify(name) + "':");
@@ -454,7 +454,7 @@ Imp<TraditionalProfile>::load_profile_make_defaults(const FSEntry & dir)
for (Set<std::string>::ConstIterator x(use_expand->begin()), x_end(use_expand->end()) ;
x != x_end ; ++x)
{
- std::shared_ptr<Set<std::string> > v(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > v(std::make_shared<Set<std::string>>());
tokenise_whitespace(environment_variables[use_expand_values_part_var + *x], v->inserter());
use_expand_values.insert(std::make_pair(*x, v));
}
@@ -462,7 +462,7 @@ Imp<TraditionalProfile>::load_profile_make_defaults(const FSEntry & dir)
for (Set<std::string>::ConstIterator x(use_expand_unprefixed->begin()), x_end(use_expand_unprefixed->end()) ;
x != x_end ; ++x)
{
- std::shared_ptr<Set<std::string> > v(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > v(std::make_shared<Set<std::string>>());
tokenise_whitespace(environment_variables[use_expand_values_part_var + *x], v->inserter());
use_expand_values.insert(std::make_pair(*x, v));
}
@@ -576,7 +576,7 @@ Imp<TraditionalProfile>::make_vars_from_file_vars()
continue;
Context context_spec("When parsing '" + i->second + "':");
- std::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
+ std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_elike_package_dep_spec(i->second.substr(1),
i->first->supported()->package_dep_spec_parse_options(),
i->first->supported()->version_spec_options(),
@@ -634,7 +634,7 @@ Imp<TraditionalProfile>::make_vars_from_file_vars()
try
{
- std::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(
+ std::shared_ptr<const PackageDepSpec> a(std::make_shared<PackageDepSpec>(
parse_elike_package_dep_spec(line->second.first,
line->first->supported()->package_dep_spec_parse_options(),
line->first->supported()->version_spec_options(),
@@ -718,7 +718,7 @@ Imp<TraditionalProfile>::load_spec_use_file(const EAPI & eapi, const FSEntry & f
try
{
- std::shared_ptr<const PackageDepSpec> spec(new PackageDepSpec(
+ std::shared_ptr<const PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_elike_package_dep_spec(*tokens.begin(), eapi.supported()->package_dep_spec_parse_options(),
eapi.supported()->version_spec_options(),
std::shared_ptr<const PackageID>())));
@@ -988,7 +988,7 @@ TraditionalProfile::known_choice_value_names(
KnownMap::const_iterator it2(it->second.find(lower_x));
if (it->second.end() == it2)
{
- std::shared_ptr<Set<UnprefixedChoiceName> > result(new Set<UnprefixedChoiceName>);
+ std::shared_ptr<Set<UnprefixedChoiceName> > result(std::make_shared<Set<UnprefixedChoiceName>>());
it2 = it->second.insert(std::make_pair(lower_x, result)).first;
KnownMap::const_iterator i(_imp->known_choice_value_names.find(lower_x));
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index c4be41688..8baf491c5 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -137,20 +137,20 @@ namespace paludis
has_category_names(false),
tried_provides_cache(false),
used_provides_cache(false),
- names_cache(new RepositoryNameCache(p.names_cache(), r)),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ names_cache(std::make_shared<RepositoryNameCache>(p.names_cache(), r)),
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
+ root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("root", "root",
mkt_normal, params.root())),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "vdb")),
- provides_cache_key(new LiteralMetadataValueKey<FSEntry> ("provides_cache", "provides_cache",
+ provides_cache_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("provides_cache", "provides_cache",
mkt_normal, params.provides_cache())),
- names_cache_key(new LiteralMetadataValueKey<FSEntry> ("names_cache", "names_cache",
+ names_cache_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("names_cache", "names_cache",
mkt_normal, params.names_cache())),
- builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("builddir", "builddir",
mkt_normal, params.builddir())),
- eapi_when_unknown_key(new LiteralMetadataValueKey<std::string> (
+ eapi_when_unknown_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"eapi_when_unknown", "eapi_when_unknown", mkt_normal, params.eapi_when_unknown()))
{
}
@@ -245,7 +245,7 @@ VDBRepository::category_names() const
need_category_names();
- std::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
+ std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
std::transform(_imp->categories.begin(), _imp->categories.end(), result->inserter(),
std::mem_fn(&std::pair<const CategoryNamePart, std::shared_ptr<QualifiedPackageNameSet> >::first));
@@ -261,7 +261,7 @@ VDBRepository::package_names(const CategoryNamePart & c) const
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
need_category_names();
if (! has_category_named(c))
@@ -350,7 +350,7 @@ VDBRepository::repository_factory_create(
*DistributionData::get_instance()->distribution_from_string(
env->distribution()))->default_eapi_when_unknown();
- return std::shared_ptr<Repository>(new VDBRepository(make_named_values<VDBRepositoryParams>(
+ return std::shared_ptr<Repository>(std::make_shared<VDBRepository>(make_named_values<VDBRepositoryParams>(
n::builddir() = builddir,
n::eapi_when_unknown() = eapi_when_unknown,
n::environment() = env,
@@ -418,14 +418,14 @@ VDBRepository::perform_uninstall(
std::string reinstalling_str(a.options.is_overwrite() ? "-reinstalling-" : "");
- std::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
+ std::shared_ptr<FSEntrySequence> eclassdirs(std::make_shared<FSEntrySequence>());
eclassdirs->push_back(FSEntry(_imp->params.location() / stringify(id->name().category()) /
(reinstalling_str + stringify(id->name().package()) + "-" + stringify(id->version()))));
FSEntry pkg_dir(_imp->params.location() / stringify(id->name().category()) / (reinstalling_str +
stringify(id->name().package()) + "-" + stringify(id->version())));
- std::shared_ptr<FSEntry> load_env(new FSEntry(pkg_dir / "environment.bz2"));
+ std::shared_ptr<FSEntry> load_env(std::make_shared<FSEntry>(pkg_dir / "environment.bz2"));
EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_uninstall());
for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
@@ -531,7 +531,7 @@ VDBRepository::perform_uninstall(
IDMap::iterator it2(_imp->ids.find(id->name()));
if (_imp->ids.end() != it2)
{
- std::shared_ptr<PackageIDSequence> ids(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> ids(std::make_shared<PackageIDSequence>());
std::remove_copy(it2->second->begin(), it2->second->end(), ids->back_inserter(), id);
it2->second = ids;
}
@@ -675,7 +675,7 @@ VDBRepository::load_provided_using_cache() const
VersionSpec v(tokens.at(1), EAPIData::get_instance()->eapi_from_string(
_imp->params.eapi_when_unknown())->supported()->version_spec_options());
- std::shared_ptr<std::list<QualifiedPackageName> > qpns(new std::list<QualifiedPackageName>);
+ std::shared_ptr<std::list<QualifiedPackageName> > qpns(std::make_shared<std::list<QualifiedPackageName>>());
std::copy(tokens.begin() + 2, tokens.end(), create_inserter<QualifiedPackageName>(
std::back_inserter(*qpns)));
@@ -714,7 +714,7 @@ VDBRepository::provides_from_package_id(const PackageID & id) const
DepSpecFlattener<ProvideSpecTree, PackageDepSpec> f(_imp->params.environment());
provide->root()->accept(f);
- std::shared_ptr<std::list<QualifiedPackageName> > qpns(new std::list<QualifiedPackageName>);
+ std::shared_ptr<std::list<QualifiedPackageName> > qpns(std::make_shared<std::list<QualifiedPackageName>>());
for (DepSpecFlattener<ProvideSpecTree, PackageDepSpec>::ConstIterator
p(f.begin()), p_end(f.end()) ; p != p_end ; ++p)
@@ -992,7 +992,7 @@ VDBRepository::merge(const MergeParams & m)
IDMap::iterator it2(_imp->ids.find(m.package_id()->name()));
if (_imp->ids.end() == it2)
{
- std::shared_ptr<PackageIDSequence> ids(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> ids(std::make_shared<PackageIDSequence>());
it2 = _imp->ids.insert(std::make_pair(m.package_id()->name(), ids)).first;
}
it2->second->push_back(new_id = make_id(m.package_id()->name(), m.package_id()->version(), vdb_dir));
@@ -1094,7 +1094,7 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
Context context("When loading package names from '" + stringify(_imp->params.location()) +
"' in category '" + stringify(c) + "':");
- std::shared_ptr<QualifiedPackageNameSet> q(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> q(std::make_shared<QualifiedPackageNameSet>());
for (DirIterator d(_imp->params.location() / stringify(c), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
try
@@ -1134,7 +1134,7 @@ VDBRepository::make_id(const QualifiedPackageName & q, const VersionSpec & v, co
Context context("When creating ID for '" + stringify(q) + "-" + stringify(v) + "' from '" + stringify(f) + "':");
- std::shared_ptr<VDBID> result(new VDBID(q, v, _imp->params.environment(), shared_from_this(), f));
+ std::shared_ptr<VDBID> result(std::make_shared<VDBID>(q, v, _imp->params.environment(), shared_from_this(), f));
return result;
}
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index ab369008a..ca0b2f92a 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -96,7 +96,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "vdb");
keys->insert("names_cache", "/var/empty");
keys->insert("provides_cache", "/var/empty");
@@ -116,8 +116,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "vdb");
keys->insert("names_cache", "/var/empty");
keys->insert("provides_cache", "/var/empty");
@@ -140,8 +139,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "vdb");
keys->insert("names_cache", "/var/empty");
keys->insert("provides_cache", "/var/empty");
@@ -211,7 +209,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "vdb");
keys->insert("names_cache", "/var/empty");
keys->insert("provides_cache", "/var/empty");
@@ -266,8 +264,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(
- new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "vdb");
keys->insert("names_cache", "/var/empty");
keys->insert("provides_cache", "/var/empty");
@@ -324,7 +321,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "vdb_repository_TEST_dir" / "srcrepo"));
@@ -454,7 +451,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "vdb_repository_TEST_dir" / "srcrepo"));
@@ -585,7 +582,7 @@ namespace test_cases
const std::string & chosen_one,
const std::string & victim) const
{
- std::shared_ptr<PackageIDSequence> replacing(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> replacing(std::make_shared<PackageIDSequence>());
if (! victim.empty())
replacing->push_back(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec(victim,
@@ -606,7 +603,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "vdb_repository_TEST_dir" / "namesincrtest_src"));
@@ -855,7 +852,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
keys->insert("names_cache", "/var/empty");
@@ -948,7 +945,7 @@ namespace test_cases
const std::string & chosen_one,
const std::string & victim) const
{
- std::shared_ptr<PackageIDSequence> replacing(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> replacing(std::make_shared<PackageIDSequence>());
if (! victim.empty())
replacing->push_back(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec(victim,
@@ -969,7 +966,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "vdb_repository_TEST_dir" / "providesincrtest_src1"));
@@ -1164,7 +1161,7 @@ namespace test_cases
{
TestEnvironment env;
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "vdb_repository_TEST_dir" / "reinstalltest_src1"));
@@ -1274,7 +1271,7 @@ namespace test_cases
const std::string & chosen_one,
const std::string & victim) const
{
- std::shared_ptr<PackageIDSequence> replacing(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> replacing(std::make_shared<PackageIDSequence>());
if (! victim.empty())
replacing->push_back(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec(victim,
@@ -1295,7 +1292,7 @@ namespace test_cases
{
TestEnvironment env(FSEntry(stringify(FSEntry::cwd() / "vdb_repository_TEST_dir" / "root")).realpath());
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
keys->insert("location", stringify(FSEntry::cwd() / "vdb_repository_TEST_dir" / "postinsttest_src1"));
diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc
index b02c7111e..d365b6b80 100644
--- a/paludis/repositories/e/vdb_unmerger_TEST.cc
+++ b/paludis/repositories/e/vdb_unmerger_TEST.cc
@@ -112,7 +112,7 @@ namespace
void run()
{
env.set_paludis_command("/bin/false");
- std::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
keys->insert("format", "vdb");
keys->insert("names_cache", "/var/empty");
keys->insert("provides_cache", "/var/empty");
diff --git a/paludis/repositories/e/xml_things.cc b/paludis/repositories/e/xml_things.cc
index c8520be20..fc44082f0 100644
--- a/paludis/repositories/e/xml_things.cc
+++ b/paludis/repositories/e/xml_things.cc
@@ -125,7 +125,7 @@ namespace
public:
GLSAHandler() :
- _glsa(new GLSA)
+ _glsa(std::make_shared<GLSA>())
{
}
@@ -238,7 +238,7 @@ namespace
{
std::string m;
handle_package_name(doc, n->properties, m);
- std::shared_ptr<GLSAPackage> pkg(new GLSAPackage(QualifiedPackageName(m)));
+ std::shared_ptr<GLSAPackage> pkg(std::make_shared<GLSAPackage>(QualifiedPackageName(m)));
handle_package_archs(doc, n->properties, pkg);
handle_package_children(doc, n->children, pkg);
_glsa->add_package(pkg);
@@ -283,7 +283,7 @@ paludis_xml_things_create_glsa_from_xml_file(const std::string & filename)
std::shared_ptr<erepository::MetadataXML>
paludis_xml_things_create_metadata_xml_from_xml_file(const FSEntry & filename)
{
- std::shared_ptr<erepository::MetadataXML> result(new erepository::MetadataXML(
+ std::shared_ptr<erepository::MetadataXML> result(std::make_shared<erepository::MetadataXML>(
make_named_values<erepository::MetadataXML>(
n::herds() = std::make_shared<Sequence<std::string>>(),
n::long_description() = "",
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 2d84b83c4..4ab7d3408 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -47,9 +47,9 @@ namespace paludis
const bool is_suitable_destination;
Imp(const bool s, const bool b) :
- format_key(new LiteralMetadataValueKey<std::string> (
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"format", "format", mkt_significant, "installed_fake")),
- installed_root_key(new LiteralMetadataValueKey<FSEntry> (
+ installed_root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"installed_root", "installed_root", mkt_normal, FSEntry("/"))),
supports_uninstall(s),
is_suitable_destination(b)
@@ -87,7 +87,7 @@ FakeInstalledRepository::is_suitable_destination_for(const PackageID &) const
std::shared_ptr<const FakeInstalledRepository::ProvidesSequence>
FakeInstalledRepository::provided_packages() const
{
- std::shared_ptr<ProvidesSequence> result(new ProvidesSequence);
+ std::shared_ptr<ProvidesSequence> result(std::make_shared<ProvidesSequence>());
std::shared_ptr<const CategoryNamePartSet> cats(category_names());
for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
diff --git a/paludis/repositories/fake/fake_installed_repository_TEST.cc b/paludis/repositories/fake/fake_installed_repository_TEST.cc
index 163a6fa7e..fc3d6bf73 100644
--- a/paludis/repositories/fake/fake_installed_repository_TEST.cc
+++ b/paludis/repositories/fake/fake_installed_repository_TEST.cc
@@ -35,7 +35,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<const FakeInstalledRepository> r(new FakeInstalledRepository(
+ std::shared_ptr<const FakeInstalledRepository> r(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("fake"),
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 57e71c2ff..a470d235d 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -245,7 +245,7 @@ namespace paludis
Imp(const std::function<const std::shared_ptr<const FetchableURISpecTree> (const std::string &)> & f,
const std::string & r, const std::string & h, const MetadataKeyType t) :
func(f),
- initial_label(new URIListedThenMirrorsLabel("listed-then-mirrors")),
+ initial_label(std::make_shared<URIListedThenMirrorsLabel>("listed-then-mirrors")),
raw_name(r),
human_name(h),
type(t)
@@ -478,7 +478,7 @@ namespace paludis
Imp(const Environment * const e, const std::shared_ptr<const PackageID> & i) :
env(e),
id(i),
- value(new Choices)
+ value(std::make_shared<Choices>())
{
}
};
@@ -564,7 +564,7 @@ FakeMetadataChoicesKey::add(const std::string & n, const std::string & v)
{
if (_imp->choices.end() == _imp->choices.find(n))
{
- std::shared_ptr<Choice> c(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> c(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = false,
n::contains_every_value() = false,
n::hidden() = false,
@@ -723,13 +723,13 @@ namespace paludis
repository(r),
name(q),
version(v),
- build_dependencies_labels(new DependenciesLabelSequence),
- run_dependencies_labels(new DependenciesLabelSequence),
- post_dependencies_labels(new DependenciesLabelSequence),
- suggested_dependencies_labels(new DependenciesLabelSequence),
- slot(new LiteralMetadataValueKey<SlotName>("SLOT", "Slot", mkt_internal, SlotName("0"))),
- keywords(new FakeMetadataKeywordSetKey("KEYWORDS", "Keywords", "test", mkt_normal, id, env)),
- behaviours_set(new Set<std::string>),
+ build_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ run_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ post_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ suggested_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ slot(std::make_shared<LiteralMetadataValueKey<SlotName>>("SLOT", "Slot", mkt_internal, SlotName("0"))),
+ keywords(std::make_shared<FakeMetadataKeywordSetKey>("KEYWORDS", "Keywords", "test", mkt_normal, id, env)),
+ behaviours_set(std::make_shared<Set<std::string>>()),
has_masks(false)
{
build_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("DEPEND",
@@ -1321,7 +1321,7 @@ FakeMetadataKeywordSetKey::pretty_print_flat(const Formatter<KeywordName> & f) c
if (! result.empty())
result.append(" ");
- std::shared_ptr<KeywordNameSet> k(new KeywordNameSet);
+ std::shared_ptr<KeywordNameSet> k(std::make_shared<KeywordNameSet>());
k->insert(*i);
if (_imp->env->accept_keywords(k, *_imp->id))
result.append(f.format(*i, format::Accepted()));
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index fa61e2911..6201af36f 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -44,8 +44,8 @@ namespace paludis
std::shared_ptr<const MetadataValueKey<std::string> > format_key;
Imp() :
- virtual_packages(new FakeRepository::VirtualsSequence),
- format_key(new LiteralMetadataValueKey<std::string> (
+ virtual_packages(std::make_shared<FakeRepository::VirtualsSequence>()),
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"format", "format", mkt_significant, "fake"))
{
}
diff --git a/paludis/repositories/fake/fake_repository_TEST.cc b/paludis/repositories/fake/fake_repository_TEST.cc
index 441854523..007b977cc 100644
--- a/paludis/repositories/fake/fake_repository_TEST.cc
+++ b/paludis/repositories/fake/fake_repository_TEST.cc
@@ -35,7 +35,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 8f9a97e68..06554be54 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -55,7 +55,7 @@ namespace paludis
};
Imp<FakeRepositoryBase>::Imp(const Environment * const e) :
- category_names(new CategoryNamePartSet),
+ category_names(std::make_shared<CategoryNamePartSet>()),
env(e)
{
}
@@ -96,7 +96,7 @@ FakeRepositoryBase::category_names() const
std::shared_ptr<const QualifiedPackageNameSet>
FakeRepositoryBase::package_names(const CategoryNamePart & c) const
{
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
if (! has_category_named(c))
return result;
@@ -111,9 +111,9 @@ std::shared_ptr<const PackageIDSequence>
FakeRepositoryBase::package_ids(const QualifiedPackageName & n) const
{
if (! has_category_named(n.category()))
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
if (! has_package_named(n))
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
return _imp->ids.find(n)->second;
}
@@ -121,7 +121,7 @@ void
FakeRepositoryBase::add_category(const CategoryNamePart & c)
{
_imp->category_names->insert(c);
- _imp->package_names.insert(std::make_pair(c, new PackageNamePartSet));
+ _imp->package_names.insert(std::make_pair(c, std::make_shared<PackageNamePartSet>()));
}
void
@@ -129,7 +129,7 @@ FakeRepositoryBase::add_package(const QualifiedPackageName & q)
{
add_category(q.category());
_imp->package_names.find(q.category())->second->insert(q.package());
- _imp->ids.insert(std::make_pair(q, new PackageIDSequence));
+ _imp->ids.insert(std::make_pair(q, std::make_shared<PackageIDSequence>()));
}
namespace
@@ -159,7 +159,7 @@ FakeRepositoryBase::add_version(const QualifiedPackageName & q, const VersionSpe
_imp->ids.find(q)->second->end(), VersionIs(v)))
throw InternalError(PALUDIS_HERE, "duplicate id added");
- std::shared_ptr<FakePackageID> id(new FakePackageID(_imp->env, shared_from_this(), q, v));
+ std::shared_ptr<FakePackageID> id(std::make_shared<FakePackageID>(_imp->env, shared_from_this(), q, v));
_imp->ids.find(q)->second->push_back(id);
return id;
}
diff --git a/paludis/repositories/fake/registration.cc b/paludis/repositories/fake/registration.cc
index afe87e926..55f7e7503 100644
--- a/paludis/repositories/fake/registration.cc
+++ b/paludis/repositories/fake/registration.cc
@@ -48,7 +48,7 @@ namespace paludis
void register_repositories<repository_groups::fake>(const repository_groups::fake * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > fake_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > fake_formats(std::make_shared<Set<std::string>>());
fake_formats->insert("fake_installed");
factory->add_repository_format(
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index f57d40cb8..e4f8171ba 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -485,7 +485,7 @@ InstalledGemsRepository::need_version_metadata(const QualifiedPackageName & q, c
Context c("When loading version metadata for '" + stringify(PackageDatabaseEntry(q, v, name())) + "':");
- std::shared_ptr<gems::InstalledGemMetadata> m(new gems::InstalledGemMetadata(v));
+ std::shared_ptr<gems::InstalledGemMetadata> m(std::make_shared<gems::InstalledGemMetadata>(v));
_imp->metadata.insert(std::make_pair(std::make_pair(q, v), m));
Command cmd(getenv_with_default("PALUDIS_GEMS_DIR", LIBEXECDIR "/paludis") +
@@ -636,7 +636,7 @@ GemSpecification::invalidate_masks() const
std::shared_ptr<const Set<std::string> >
GemSpecification::breaks_portage() const
{
- std::shared_ptr<Set<std::string> > why(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > why(std::make_shared<Set<std::string>>());
why->insert("format");
return why;
}
diff --git a/paludis/repositories/gems/gem_specifications.cc b/paludis/repositories/gems/gem_specifications.cc
index 9516275b5..f1b22eaf8 100644
--- a/paludis/repositories/gems/gem_specifications.cc
+++ b/paludis/repositories/gems/gem_specifications.cc
@@ -124,7 +124,7 @@ namespace
try
{
- std::shared_ptr<GemSpecification> spec(new GemSpecification(environment, repository, *i->second));
+ std::shared_ptr<GemSpecification> spec(std::make_shared<GemSpecification>(environment, repository, *i->second));
_imp->specs.insert(std::make_pair(std::make_pair(spec->name(), spec->version()), spec));
}
catch (const InternalError &)
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 48163ed22..86e3fdc83 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -72,17 +72,17 @@ namespace paludis
big_nasty_mutex(m),
has_category_names(false),
has_ids(false),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- install_dir_key(new LiteralMetadataValueKey<FSEntry> ("install_dir", "install_dir",
+ install_dir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("install_dir", "install_dir",
mkt_normal, params.install_dir())),
- builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("builddir", "builddir",
mkt_normal, params.builddir())),
- sync_key(new LiteralMetadataValueKey<std::string> ("sync", "sync",
+ sync_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync", "sync",
mkt_normal, params.sync())),
- sync_options_key(new LiteralMetadataValueKey<std::string> (
+ sync_options_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync_options", "sync_options", mkt_normal, params.sync_options())),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "gems"))
{
}
@@ -216,7 +216,7 @@ GemsRepository::need_category_names() const
if (_imp->has_category_names)
return;
- std::shared_ptr<CategoryNamePartSet> cat(new CategoryNamePartSet);
+ std::shared_ptr<CategoryNamePartSet> cat(std::make_shared<CategoryNamePartSet>());
_imp->category_names = cat;
cat->insert(CategoryNamePart("gems"));
@@ -233,7 +233,7 @@ GemsRepository::need_ids() const
need_category_names();
- std::shared_ptr<QualifiedPackageNameSet> pkgs(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> pkgs(std::make_shared<QualifiedPackageNameSet>());
_imp->package_names.insert(std::make_pair(CategoryNamePart("gems"), pkgs));
Context context("When loading gems yaml file:");
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index 27deb5b1f..c977d8068 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -80,13 +80,13 @@ namespace paludis
params(p),
has_category_names(false),
has_ids(false),
- install_dir_key(new LiteralMetadataValueKey<FSEntry> ("install_dir", "install_dir",
+ install_dir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("install_dir", "install_dir",
mkt_normal, params.install_dir())),
- builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("builddir", "builddir",
mkt_normal, params.builddir())),
- root_key(new LiteralMetadataValueKey<FSEntry> (
+ root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"root", "root", mkt_normal, params.root())),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "gems"))
{
}
@@ -209,7 +209,7 @@ InstalledGemsRepository::need_category_names() const
if (_imp->has_category_names)
return;
- std::shared_ptr<CategoryNamePartSet> cat(new CategoryNamePartSet);
+ std::shared_ptr<CategoryNamePartSet> cat(std::make_shared<CategoryNamePartSet>());
_imp->category_names = cat;
cat->insert(CategoryNamePart("gems"));
@@ -230,7 +230,7 @@ InstalledGemsRepository::need_ids() const
need_category_names();
- std::shared_ptr<QualifiedPackageNameSet> pkgs(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> pkgs(std::make_shared<QualifiedPackageNameSet>());
_imp->package_names.insert(std::make_pair(gems, pkgs));
for (DirIterator d(_imp->params.install_dir() / "specifications"), d_end ; d != d_end ; ++d)
diff --git a/paludis/repositories/gems/installed_gems_repository_TEST.cc b/paludis/repositories/gems/installed_gems_repository_TEST.cc
index 6269ac1fd..0e81a2158 100644
--- a/paludis/repositories/gems/installed_gems_repository_TEST.cc
+++ b/paludis/repositories/gems/installed_gems_repository_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 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
@@ -37,7 +37,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- env.package_database()->add_repository(1, make_shared_ptr(new InstalledGemsRepository(
+ env.package_database()->add_repository(1, make_shared_ptr(std::make_shared<InstalledGemsRepository>(
gems::InstalledRepositoryParams::create()
.location(FSEntry("gems_repository_TEST_dir/installed-repo"))
.environment(&env)
diff --git a/paludis/repositories/gems/registration.cc b/paludis/repositories/gems/registration.cc
index d0698360e..d502d46b0 100644
--- a/paludis/repositories/gems/registration.cc
+++ b/paludis/repositories/gems/registration.cc
@@ -53,7 +53,7 @@ namespace paludis
void register_repositories<repository_groups::gems>(const repository_groups::gems * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > gems_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > gems_formats(std::make_shared<Set<std::string>>());
gems_formats->insert("gems");
factory->add_repository_format(
@@ -64,7 +64,7 @@ namespace paludis
GemsRepository::repository_factory_dependencies
);
- std::shared_ptr<Set<std::string> > installed_gems_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > installed_gems_formats(std::make_shared<Set<std::string>>());
installed_gems_formats->insert("installed_gems");
installed_gems_formats->insert("installed-gems");
diff --git a/paludis/repositories/repository/registration.cc b/paludis/repositories/repository/registration.cc
index 23bc4a83e..a1cdf62a8 100644
--- a/paludis/repositories/repository/registration.cc
+++ b/paludis/repositories/repository/registration.cc
@@ -48,7 +48,7 @@ namespace paludis
void register_repositories<repository_groups::repository>(const repository_groups::repository * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > repository_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > repository_formats(std::make_shared<Set<std::string>>());
repository_formats->insert("repository");
factory->add_repository_format(repository_formats,
diff --git a/paludis/repositories/repository/repository_id.cc b/paludis/repositories/repository/repository_id.cc
index 40cd0edab..962e53a14 100644
--- a/paludis/repositories/repository/repository_id.cc
+++ b/paludis/repositories/repository/repository_id.cc
@@ -55,7 +55,7 @@ namespace paludis
name(e.name()),
version("0", VersionSpecOptions()),
repo(e.repository()),
- behaviours_key(new LiteralMetadataStringSetKey("behaviours", "behaviours", mkt_internal, behaviours_set))
+ behaviours_key(std::make_shared<LiteralMetadataStringSetKey>("behaviours", "behaviours", mkt_internal, behaviours_set))
{
}
};
@@ -65,7 +65,7 @@ namespace
{
std::shared_ptr<Set<std::string> > make_behaviours()
{
- std::shared_ptr<Set<std::string> > result(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > result(std::make_shared<Set<std::string>>());
result->insert("transient");
result->insert("used");
return result;
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index 052f93ba3..64b6d5698 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -68,13 +68,13 @@ namespace paludis
Imp(const RepositoryRepository * const repo, const RepositoryRepositoryParams & p) :
params(p),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "repository")),
- config_filename_key(new LiteralMetadataValueKey<std::string> (
+ config_filename_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"config_filename", "config_filename", mkt_normal, params.config_filename())),
- config_template_key(new LiteralMetadataValueKey<std::string> (
+ config_template_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"config_template", "config_template", mkt_normal, params.config_template())),
- installed_root_key(new LiteralMetadataValueKey<FSEntry>("root", "root", mkt_normal, p.root())),
+ installed_root_key(std::make_shared<LiteralMetadataValueKey<FSEntry>>("root", "root", mkt_normal, p.root())),
store(DeferredConstructionPtr<std::shared_ptr<RepositoryRepositoryStore> > (
std::bind(&make_store, repo, std::cref(params))))
{
@@ -291,7 +291,7 @@ RepositoryRepository::repository_factory_create(
if (root_str.empty())
root_str = "/";
- return std::shared_ptr<RepositoryRepository>(new RepositoryRepository(
+ return std::shared_ptr<RepositoryRepository>(std::make_shared<RepositoryRepository>(
make_named_values<RepositoryRepositoryParams>(
n::config_filename() = config_filename,
n::config_template() = config_template,
diff --git a/paludis/repositories/repository/repository_repository_store.cc b/paludis/repositories/repository/repository_repository_store.cc
index 6a532716d..ab8202bb9 100644
--- a/paludis/repositories/repository/repository_repository_store.cc
+++ b/paludis/repositories/repository/repository_repository_store.cc
@@ -63,7 +63,7 @@ namespace paludis
Imp(const Environment * const e, const RepositoryRepository * const r) :
env(e),
repo(r),
- categories(new CategoryNamePartSet)
+ categories(std::make_shared<CategoryNamePartSet>())
{
}
};
@@ -92,7 +92,7 @@ RepositoryRepositoryStore::_populate()
void
RepositoryRepositoryStore::_populate_one(const RepositoryName & repo_name)
{
- const std::shared_ptr<RepositoryID> id(new RepositoryID(make_named_values<RepositoryIDParams>(
+ const std::shared_ptr<RepositoryID> id(std::make_shared<RepositoryID>(make_named_values<RepositoryIDParams>(
n::environment() = _imp->env,
n::name() = CategoryNamePart("repository") + PackageNamePart(stringify(repo_name)),
n::repository() = _imp->repo
diff --git a/paludis/repositories/unavailable/registration.cc b/paludis/repositories/unavailable/registration.cc
index 592e343fb..208e9d84e 100644
--- a/paludis/repositories/unavailable/registration.cc
+++ b/paludis/repositories/unavailable/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
@@ -48,7 +48,7 @@ namespace paludis
void register_repositories<repository_groups::unavailable>(const repository_groups::unavailable * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > unavailable_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > unavailable_formats(std::make_shared<Set<std::string>>());
unavailable_formats->insert("unavailable");
factory->add_repository_format(unavailable_formats,
diff --git a/paludis/repositories/unavailable/unavailable_package_id.cc b/paludis/repositories/unavailable/unavailable_package_id.cc
index 3fb8625be..11768ec13 100644
--- a/paludis/repositories/unavailable/unavailable_package_id.cc
+++ b/paludis/repositories/unavailable/unavailable_package_id.cc
@@ -60,7 +60,7 @@ namespace paludis
name(e.name()),
version(e.version()),
repo(e.repository()),
- slot_key(new LiteralMetadataValueKey<SlotName>("SLOT", "Slot", mkt_internal, e.slot())),
+ slot_key(std::make_shared<LiteralMetadataValueKey<SlotName>>("SLOT", "Slot", mkt_internal, e.slot())),
description_key(e.description()),
repository_homepage_key(e.repository_homepage()),
repository_description_key(e.repository_description()),
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index b86468a4a..61fe9d30e 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -63,15 +63,15 @@ namespace paludis
Imp(const UnavailableRepository * const repo, const UnavailableRepositoryParams & p) :
params(p),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "unavailable")),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- sync_key(new LiteralMetadataValueKey<std::string> (
+ sync_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync", "sync", mkt_normal, params.sync())),
- sync_options_key(new LiteralMetadataValueKey<std::string> (
+ sync_options_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync_options", "sync_options", mkt_normal, params.sync_options())),
- sync_host_key(new LiteralMetadataValueKey<std::string> ("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync()))),
+ sync_host_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync()))),
store(DeferredConstructionPtr<std::shared_ptr<UnavailableRepositoryStore> > (
std::bind(&make_store, repo, std::cref(params))))
{
@@ -323,7 +323,7 @@ UnavailableRepository::repository_factory_create(
std::string sync_options(f("sync_options"));
- return std::shared_ptr<UnavailableRepository>(new UnavailableRepository(
+ return std::shared_ptr<UnavailableRepository>(std::make_shared<UnavailableRepository>(
make_named_values<UnavailableRepositoryParams>(
n::environment() = env,
n::location() = location,
diff --git a/paludis/repositories/unavailable/unavailable_repository_TEST.cc b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
index 7b19f3493..4dc134758 100644
--- a/paludis/repositories/unavailable/unavailable_repository_TEST.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
@@ -48,7 +48,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<UnavailableRepository> repo(new UnavailableRepository(
+ std::shared_ptr<UnavailableRepository> repo(std::make_shared<UnavailableRepository>(
make_named_values<UnavailableRepositoryParams>(
n::environment() = &env,
n::location() = FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo1",
@@ -68,7 +68,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<UnavailableRepository> repo(new UnavailableRepository(
+ std::shared_ptr<UnavailableRepository> repo(std::make_shared<UnavailableRepository>(
make_named_values<UnavailableRepositoryParams>(
n::environment() = &env,
n::location() = FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo2",
@@ -98,7 +98,7 @@ namespace test_cases
"repository/foo-0::unavailable"
);
- const std::shared_ptr<FakeRepository> hide_bar(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> hide_bar(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("bar")
)));
diff --git a/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc b/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
index d70b6a7e4..5914e8520 100644
--- a/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
@@ -49,7 +49,7 @@ namespace paludis
const std::string & v) :
env(e),
value(CommaSeparatedDepParser::parse(e, v)),
- labels(new DependenciesLabelSequence),
+ labels(std::make_shared<DependenciesLabelSequence>()),
raw_name(r),
human_name(h),
type(t)
diff --git a/paludis/repositories/unavailable/unavailable_repository_file.cc b/paludis/repositories/unavailable/unavailable_repository_file.cc
index ff624a368..359c9437d 100644
--- a/paludis/repositories/unavailable/unavailable_repository_file.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_file.cc
@@ -210,7 +210,7 @@ UnavailableRepositoryFile::_load(const FSEntry & f)
"Cannot parse body description line '" + line + "' in '" + stringify(f) + "'");
std::shared_ptr<LiteralMetadataValueKey<std::string> > desc(
- new LiteralMetadataValueKey<std::string>("DESCRIPTION", "Description", mkt_significant,
+ std::make_shared<LiteralMetadataValueKey<std::string>>("DESCRIPTION", "Description", mkt_significant,
token));
for (std::list<VersionSpec>::const_iterator v(versions.begin()), v_end(versions.end()) ;
v != v_end ; ++v)
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc
index 1ef780479..95b077e63 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_store.cc
@@ -69,7 +69,7 @@ namespace paludis
Imp(const UnavailableRepository * const r) :
repo(r),
- categories(new CategoryNamePartSet)
+ categories(std::make_shared<CategoryNamePartSet>())
{
}
};
@@ -138,11 +138,11 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
"REPOSITORY_SYNC", "Repository sync", mkt_normal, file.sync());
{
- std::shared_ptr<Mask> mask(new UnavailableMask);
- std::shared_ptr<Set<std::string> > from_repositories_set(new Set<std::string>);
+ std::shared_ptr<Mask> mask(std::make_shared<UnavailableMask>());
+ std::shared_ptr<Set<std::string> > from_repositories_set(std::make_shared<Set<std::string>>());
from_repositories_set->insert(file.repo_name());
std::shared_ptr<MetadataCollectionKey<Set<std::string> > > from_repositories(
- new LiteralMetadataStringSetKey("OWNING_REPOSITORY", "Owning repository",
+ std::make_shared<LiteralMetadataStringSetKey>("OWNING_REPOSITORY", "Owning repository",
mkt_significant, from_repositories_set));
QualifiedPackageName old_name("x/x");
@@ -191,13 +191,13 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
if (file.autoconfigurable())
{
- const std::shared_ptr<NoConfigurationInformationMask> no_configuration_mask(new NoConfigurationInformationMask);
+ const std::shared_ptr<NoConfigurationInformationMask> no_configuration_mask(std::make_shared<NoConfigurationInformationMask>());
std::shared_ptr<UnavailableRepositoryDependenciesKey> deps;
if (! file.dependencies().empty())
deps = std::make_shared<UnavailableRepositoryDependenciesKey>(env, "dependencies", "Dependencies", mkt_dependencies,
file.dependencies());
- const std::shared_ptr<UnavailableRepositoryID> id(new UnavailableRepositoryID(
+ const std::shared_ptr<UnavailableRepositoryID> id(std::make_shared<UnavailableRepositoryID>(
make_named_values<UnavailableRepositoryIDParams>(
n::dependencies() = deps,
n::description() = repository_description,
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index c3dd4e4bc..732216b23 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -424,11 +424,11 @@ namespace paludis
repository_name(r),
root(ro),
ndbam(d),
- build_dependencies_labels(new DependenciesLabelSequence),
- run_dependencies_labels(new DependenciesLabelSequence),
- slot_key(new LiteralMetadataValueKey<SlotName> ("slot", "Slot", mkt_internal, s)),
- fs_location_key(new InstalledUnpackagedFSEntryKey(l)),
- behaviours_key(new LiteralMetadataStringSetKey("behaviours", "behaviours", mkt_internal, behaviours_set))
+ build_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ run_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ slot_key(std::make_shared<LiteralMetadataValueKey<SlotName> >("slot", "Slot", mkt_internal, s)),
+ fs_location_key(std::make_shared<InstalledUnpackagedFSEntryKey>(l)),
+ behaviours_key(std::make_shared<LiteralMetadataStringSetKey>("behaviours", "behaviours", mkt_internal, behaviours_set))
{
build_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build_dependencies",
return_literal_function(true)));
@@ -468,7 +468,7 @@ namespace
{
std::shared_ptr<Set<std::string> > make_behaviours()
{
- std::shared_ptr<Set<std::string> > result(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > result(std::make_shared<Set<std::string>>());
result->insert("transient");
return result;
}
@@ -824,7 +824,7 @@ InstalledUnpackagedID::invalidate_masks() const
std::shared_ptr<const Set<std::string> >
InstalledUnpackagedID::breaks_portage() const
{
- std::shared_ptr<Set<std::string> > why(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > why(std::make_shared<Set<std::string>>());
why->insert("format");
return why;
}
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 7568cbdca..1ca3795f5 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -77,11 +77,11 @@ namespace paludis
Imp(const InstalledUnpackagedRepositoryParams & p) :
params(p),
ndbam(p.location(), &supported_installed_unpackaged, "installed_unpackaged-1", user_version_spec_options()),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
+ root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("root", "root",
mkt_normal, params.root())),
- format_key(new LiteralMetadataValueKey<std::string> (
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"format", "format", mkt_significant, "installed_unpackaged"))
{
}
@@ -121,7 +121,7 @@ std::shared_ptr<const PackageIDSequence>
InstalledUnpackagedRepository::package_ids(const QualifiedPackageName & q) const
{
std::shared_ptr<NDBAMEntrySequence> entries(_imp->ndbam.entries(q));
- std::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
+ std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
for (IndirectIterator<NDBAMEntrySequence::ConstIterator> e(entries->begin()), e_end(entries->end()) ;
e != e_end ; ++e)
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index 8c424422a..7fe980081 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -102,7 +102,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -125,7 +125,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -179,7 +179,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -209,7 +209,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -244,7 +244,7 @@ namespace test_cases
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -300,7 +300,7 @@ namespace test_cases
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -355,7 +355,7 @@ namespace test_cases
TestMessageSuffix suffix("initial", true);
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -374,7 +374,7 @@ namespace test_cases
TestMessageSuffix suffix("install 4a", true);
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -383,7 +383,7 @@ namespace test_cases
)));
env.package_database()->add_repository(0, repo);
- std::shared_ptr<Repository> source_repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> source_repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -432,7 +432,7 @@ namespace test_cases
TestMessageSuffix suffix("install 4b1", true);
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -441,7 +441,7 @@ namespace test_cases
)));
env.package_database()->add_repository(0, repo);
- std::shared_ptr<Repository> source_repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> source_repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -492,7 +492,7 @@ namespace test_cases
TestMessageSuffix suffix("install 4b2", true);
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -501,7 +501,7 @@ namespace test_cases
)));
env.package_database()->add_repository(0, repo);
- std::shared_ptr<Repository> source_repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> source_repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -552,7 +552,7 @@ namespace test_cases
TestMessageSuffix suffix("uninstall 4a", true);
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -598,7 +598,7 @@ namespace test_cases
TestMessageSuffix suffix("uninstall 4b", true);
TestEnvironment env;
- std::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
diff --git a/paludis/repositories/unpackaged/registration.cc b/paludis/repositories/unpackaged/registration.cc
index b1a16726f..af581d8f1 100644
--- a/paludis/repositories/unpackaged/registration.cc
+++ b/paludis/repositories/unpackaged/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
@@ -49,7 +49,7 @@ namespace paludis
void register_repositories<repository_groups::unpackaged>(const repository_groups::unpackaged * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > unpackaged_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > unpackaged_formats(std::make_shared<Set<std::string>>());
unpackaged_formats->insert("unpackaged");
factory->add_repository_format(
@@ -60,7 +60,7 @@ namespace paludis
&UnpackagedRepository::repository_factory_dependencies
);
- std::shared_ptr<Set<std::string> > installed_unpackaged_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > installed_unpackaged_formats(std::make_shared<Set<std::string>>());
installed_unpackaged_formats->insert("installed_unpackaged");
installed_unpackaged_formats->insert("installed-unpackaged");
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 6e7506a2a..3e4a75cbe 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -78,16 +78,16 @@ namespace paludis
name(q),
version(v),
repository_name(n),
- build_dependencies_labels(new DependenciesLabelSequence),
- run_dependencies_labels(new DependenciesLabelSequence),
- slot_key(new LiteralMetadataValueKey<SlotName> ("slot", "Slot", mkt_internal, s)),
- fs_location_key(new LiteralMetadataValueKey<FSEntry> ("location", "Location", mkt_normal, l)),
- build_dependencies_key(new UnpackagedDependencyKey(env, "build_dependencies", "Build dependencies", mkt_dependencies,
+ build_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ run_dependencies_labels(std::make_shared<DependenciesLabelSequence>()),
+ slot_key(std::make_shared<LiteralMetadataValueKey<SlotName> >("slot", "Slot", mkt_internal, s)),
+ fs_location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "Location", mkt_normal, l)),
+ build_dependencies_key(std::make_shared<UnpackagedDependencyKey>(env, "build_dependencies", "Build dependencies", mkt_dependencies,
build_dependencies_labels, b)),
- run_dependencies_key(new UnpackagedDependencyKey(env, "run_dependencies", "Run dependencies", mkt_dependencies,
+ run_dependencies_key(std::make_shared<UnpackagedDependencyKey>(env, "run_dependencies", "Run dependencies", mkt_dependencies,
run_dependencies_labels, r)),
- description_key(new LiteralMetadataValueKey<std::string> ("description", "Description", mkt_significant, d)),
- choices_key(new UnpackagedChoicesKey(env, "choices", "Choices", mkt_normal, id))
+ description_key(std::make_shared<LiteralMetadataValueKey<std::string> >("description", "Description", mkt_significant, d)),
+ choices_key(std::make_shared<UnpackagedChoicesKey>(env, "choices", "Choices", mkt_normal, id))
{
build_dependencies_labels->push_back(std::make_shared<DependenciesBuildLabel>("build_dependencies",
return_literal_function(true)));
@@ -461,7 +461,7 @@ UnpackagedID::invalidate_masks() const
std::shared_ptr<const Set<std::string> >
UnpackagedID::breaks_portage() const
{
- std::shared_ptr<Set<std::string> > why(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > why(std::make_shared<Set<std::string>>());
why->insert("format");
return why;
}
diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc
index bd107fb59..6e1db6176 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.cc
+++ b/paludis/repositories/unpackaged/unpackaged_key.cc
@@ -162,7 +162,7 @@ UnpackagedChoicesKey::value() const
if (! _imp->value)
{
_imp->value = std::make_shared<Choices>();
- std::shared_ptr<Choice> build_options(new Choice(make_named_values<ChoiceParams>(
+ std::shared_ptr<Choice> build_options(std::make_shared<Choice>(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = false,
n::contains_every_value() = false,
n::hidden() = false,
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 06fa3e6c2..27098c679 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -61,28 +61,28 @@ namespace paludis
Imp(const RepositoryName & n,
const UnpackagedRepositoryParams & p) :
params(p),
- id(new UnpackagedID(params.environment(), params.name(), params.version(), params.slot(), n, params.location(),
+ id(std::make_shared<UnpackagedID>(params.environment(), params.name(), params.version(), params.slot(), n, params.location(),
params.build_dependencies(), params.run_dependencies(), params.description())),
- ids(new PackageIDSequence),
- package_names(new QualifiedPackageNameSet),
- category_names(new CategoryNamePartSet),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ ids(std::make_shared<PackageIDSequence>()),
+ package_names(std::make_shared<QualifiedPackageNameSet>()),
+ category_names(std::make_shared<CategoryNamePartSet>()),
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- install_under_key(new LiteralMetadataValueKey<FSEntry> ("install_under", "install_under",
+ install_under_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("install_under", "install_under",
mkt_significant, params.install_under())),
- rewrite_ids_over_to_root_key(new LiteralMetadataValueKey<long> ("rewrite_ids_over_to_root", "rewrite_ids_over_to_root",
+ rewrite_ids_over_to_root_key(std::make_shared<LiteralMetadataValueKey<long> >("rewrite_ids_over_to_root", "rewrite_ids_over_to_root",
mkt_normal, params.rewrite_ids_over_to_root())),
- name_key(new LiteralMetadataValueKey<std::string> ("name", "name",
+ name_key(std::make_shared<LiteralMetadataValueKey<std::string> >("name", "name",
mkt_normal, stringify(params.name()))),
- slot_key(new LiteralMetadataValueKey<std::string> ("slot", "slot",
+ slot_key(std::make_shared<LiteralMetadataValueKey<std::string> >("slot", "slot",
mkt_normal, stringify(params.slot()))),
- format_key(new LiteralMetadataValueKey<std::string> (
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"format", "format", mkt_significant, "unpackaged")),
- build_dependencies_key(new LiteralMetadataValueKey<std::string> (
+ build_dependencies_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"build_dependencies", "build_dependencies", mkt_normal, params.build_dependencies())),
- run_dependencies_key(new LiteralMetadataValueKey<std::string> (
+ run_dependencies_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"run_dependencies", "run_dependencies", mkt_normal, params.run_dependencies())),
- description_key(new LiteralMetadataValueKey<std::string> (
+ description_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"description", "description", mkt_normal, params.description()))
{
ids->push_back(id);
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index e817412b3..14f1ddc87 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -72,7 +72,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -102,7 +102,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -137,7 +137,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -167,7 +167,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -208,7 +208,7 @@ namespace test_cases
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -224,7 +224,7 @@ namespace test_cases
)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<Repository> installed_repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> installed_repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
@@ -264,7 +264,7 @@ namespace test_cases
{
TestEnvironment env;
- std::shared_ptr<Repository> repo(new UnpackagedRepository(
+ std::shared_ptr<Repository> repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
n::build_dependencies() = "",
@@ -280,7 +280,7 @@ namespace test_cases
)));
env.package_database()->add_repository(1, repo);
- std::shared_ptr<Repository> installed_repo(new InstalledUnpackagedRepository(
+ std::shared_ptr<Repository> installed_repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
n::environment() = &env,
diff --git a/paludis/repositories/unwritten/registration.cc b/paludis/repositories/unwritten/registration.cc
index d2c8d44a9..bf6b57033 100644
--- a/paludis/repositories/unwritten/registration.cc
+++ b/paludis/repositories/unwritten/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
@@ -48,7 +48,7 @@ namespace paludis
void register_repositories<repository_groups::unwritten>(const repository_groups::unwritten * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > unwritten_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > unwritten_formats(std::make_shared<Set<std::string>>());
unwritten_formats->insert("unwritten");
factory->add_repository_format(unwritten_formats,
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 46a2ed562..f715a610e 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -63,15 +63,15 @@ namespace paludis
Imp(const UnwrittenRepository * const repo, const UnwrittenRepositoryParams & p) :
params(p),
- format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "unwritten")),
- location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
mkt_significant, params.location())),
- sync_key(new LiteralMetadataValueKey<std::string> (
+ sync_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync", "sync", mkt_normal, params.sync())),
- sync_options_key(new LiteralMetadataValueKey<std::string> (
+ sync_options_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync_options", "sync_options", mkt_normal, params.sync_options())),
- sync_host_key(new LiteralMetadataValueKey<std::string> ("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync()))),
+ sync_host_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync()))),
store(DeferredConstructionPtr<std::shared_ptr<UnwrittenRepositoryStore> > (
std::bind(&make_store, repo, std::cref(params))))
{
@@ -323,7 +323,7 @@ UnwrittenRepository::repository_factory_create(
std::string sync_options(f("sync_options"));
- return std::shared_ptr<UnwrittenRepository>(new UnwrittenRepository(
+ return std::shared_ptr<UnwrittenRepository>(std::make_shared<UnwrittenRepository>(
make_named_values<UnwrittenRepositoryParams>(
n::environment() = env,
n::location() = location,
diff --git a/paludis/repositories/unwritten/unwritten_repository_TEST.cc b/paludis/repositories/unwritten/unwritten_repository_TEST.cc
index 3e118e25c..7facff410 100644
--- a/paludis/repositories/unwritten/unwritten_repository_TEST.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_TEST.cc
@@ -47,7 +47,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<UnwrittenRepository> repo(new UnwrittenRepository(
+ std::shared_ptr<UnwrittenRepository> repo(std::make_shared<UnwrittenRepository>(
make_named_values<UnwrittenRepositoryParams>(
n::environment() = &env,
n::location() = FSEntry::cwd() / "unwritten_repository_TEST_dir" / "repo1",
@@ -67,7 +67,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<UnwrittenRepository> repo(new UnwrittenRepository(
+ std::shared_ptr<UnwrittenRepository> repo(std::make_shared<UnwrittenRepository>(
make_named_values<UnwrittenRepositoryParams>(
n::environment() = &env,
n::location() = FSEntry::cwd() / "unwritten_repository_TEST_dir" / "repo2",
diff --git a/paludis/repositories/unwritten/unwritten_repository_file.cc b/paludis/repositories/unwritten/unwritten_repository_file.cc
index 16bca88f3..487fc478c 100644
--- a/paludis/repositories/unwritten/unwritten_repository_file.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_file.cc
@@ -303,8 +303,8 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
entry->description() = std::make_shared<LiteralMetadataValueKey<std::string>>("description", "Description", mkt_significant, token2);
else if (token == "homepage")
{
- std::shared_ptr<AllDepSpec> all_spec(new AllDepSpec);
- std::shared_ptr<SimpleURISpecTree> tree(new SimpleURISpecTree(all_spec));
+ std::shared_ptr<AllDepSpec> all_spec(std::make_shared<AllDepSpec>());
+ std::shared_ptr<SimpleURISpecTree> tree(std::make_shared<SimpleURISpecTree>(all_spec));
std::list<std::string> tokens;
tokenise_whitespace(token2, std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
@@ -318,7 +318,7 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
entry->added_by() = std::make_shared<LiteralMetadataValueKey<std::string>>("added-by", "Added by", mkt_author, token2);
else if (token == "bug-ids")
{
- std::shared_ptr<Sequence<std::string> > seq(new Sequence<std::string>);
+ std::shared_ptr<Sequence<std::string> > seq(std::make_shared<Sequence<std::string>>());
std::list<std::string> tokens;
tokenise_whitespace(token2, std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
@@ -328,7 +328,7 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
}
else if (token == "remote-ids")
{
- std::shared_ptr<Sequence<std::string> > seq(new Sequence<std::string>);
+ std::shared_ptr<Sequence<std::string> > seq(std::make_shared<Sequence<std::string>>());
std::list<std::string> tokens;
tokenise_whitespace(token2, std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
diff --git a/paludis/repositories/unwritten/unwritten_repository_store.cc b/paludis/repositories/unwritten/unwritten_repository_store.cc
index a7dc6cad2..d440b0a86 100644
--- a/paludis/repositories/unwritten/unwritten_repository_store.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_store.cc
@@ -64,7 +64,7 @@ namespace paludis
Imp(const UnwrittenRepository * const r) :
repo(r),
- categories(new CategoryNamePartSet)
+ categories(std::make_shared<CategoryNamePartSet>())
{
}
};
@@ -103,7 +103,7 @@ UnwrittenRepositoryStore::_populate_one(const Environment * const env, const FSE
UnwrittenRepositoryFile file(f);
- std::shared_ptr<Mask> mask(new UnwrittenMask);
+ std::shared_ptr<Mask> mask(std::make_shared<UnwrittenMask>());
QualifiedPackageName old_name("x/x");
std::shared_ptr<QualifiedPackageNameSet> pkgs;
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index cf6afff2a..d49a36cca 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -66,9 +66,9 @@ namespace paludis
root(r),
ids_mutex(m),
has_ids(false),
- root_key(new LiteralMetadataValueKey<FSEntry> (
+ root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
"root", "root", mkt_normal, root)),
- format_key(new LiteralMetadataValueKey<std::string> (
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"format", "format", mkt_significant, "installed_virtuals"))
{
}
@@ -155,7 +155,7 @@ InstalledVirtualsRepository::need_ids() const
if (i == _imp->ids.end())
i = _imp->ids.insert(std::make_pair((*p).virtual_name(), std::make_shared<PackageIDSequence>())).first;
- std::shared_ptr<const PackageID> id(new virtuals::VirtualsPackageID(
+ std::shared_ptr<const PackageID> id(std::make_shared<virtuals::VirtualsPackageID>(
_imp->env, shared_from_this(), (*p).virtual_name(), (*p).provided_by(), false));
i->second->push_back(id);
}
@@ -168,13 +168,13 @@ std::shared_ptr<const PackageIDSequence>
InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
if (q.category().value() != "virtual")
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
need_ids();
IDMap::const_iterator i(_imp->ids.find(q));
if (i == _imp->ids.end())
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
return i->second;
}
@@ -183,11 +183,11 @@ std::shared_ptr<const QualifiedPackageNameSet>
InstalledVirtualsRepository::package_names(const CategoryNamePart & c) const
{
if (c.value() != "virtual")
- return std::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
+ return std::shared_ptr<QualifiedPackageNameSet>(std::make_shared<QualifiedPackageNameSet>());
need_ids();
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
std::transform(_imp->ids.begin(), _imp->ids.end(), result->inserter(),
std::mem_fn(&std::pair<const QualifiedPackageName, std::shared_ptr<PackageIDSequence> >::first));
@@ -197,7 +197,7 @@ InstalledVirtualsRepository::package_names(const CategoryNamePart & c) const
std::shared_ptr<const CategoryNamePartSet>
InstalledVirtualsRepository::category_names() const
{
- std::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
+ std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
return result;
}
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository_TEST.cc b/paludis/repositories/virtuals/installed_virtuals_repository_TEST.cc
index 497819f4c..136472f4b 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository_TEST.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
@@ -34,7 +34,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<const InstalledVirtualsRepository> r(new InstalledVirtualsRepository(&env, FSEntry("/")));
+ std::shared_ptr<const InstalledVirtualsRepository> r(std::make_shared<InstalledVirtualsRepository>(&env, FSEntry("/")));
}
} test_installed_virtuals_repository;
}
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index b6f617f78..1e02917d1 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -64,7 +64,7 @@ namespace paludis
const std::shared_ptr<const DependenciesLabelSequence> & l,
bool exact, const std::string & h, const std::string & r) :
env(e),
- value(new DependencySpecTree(std::make_shared<AllDepSpec>())),
+ value(std::make_shared<DependencySpecTree>(std::make_shared<AllDepSpec>())),
labels(l),
spec(exact ?
std::make_shared<PackageDepSpec>(
@@ -184,11 +184,11 @@ namespace paludis
repository(o),
name(n),
version(p->version()),
- bdep_labels(new DependenciesLabelSequence),
- rdep_labels(new DependenciesLabelSequence),
- virtual_for(new LiteralMetadataValueKey<std::shared_ptr<const PackageID> > ("VIRTUAL_FOR", "Virtual for", mkt_normal, p)),
- bdep(new virtuals::VirtualsDepKey(e, "DEPEND", "Build dependencies", p, bdep_labels, b)),
- rdep(new virtuals::VirtualsDepKey(e, "RDEPEND", "Run dependencies", p, rdep_labels, b)),
+ bdep_labels(std::make_shared<DependenciesLabelSequence>()),
+ rdep_labels(std::make_shared<DependenciesLabelSequence>()),
+ virtual_for(std::make_shared<LiteralMetadataValueKey<std::shared_ptr<const PackageID> > >("VIRTUAL_FOR", "Virtual for", mkt_normal, p)),
+ bdep(std::make_shared<virtuals::VirtualsDepKey>(e, "DEPEND", "Build dependencies", p, bdep_labels, b)),
+ rdep(std::make_shared<virtuals::VirtualsDepKey>(e, "RDEPEND", "Run dependencies", p, rdep_labels, b)),
has_masks(false)
{
bdep_labels->push_back(std::make_shared<DependenciesBuildLabel>("DEPEND",
diff --git a/paludis/repositories/virtuals/registration.cc b/paludis/repositories/virtuals/registration.cc
index ad2feaebd..f9abb56e0 100644
--- a/paludis/repositories/virtuals/registration.cc
+++ b/paludis/repositories/virtuals/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 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
@@ -48,7 +48,7 @@ namespace paludis
void register_repositories<repository_groups::virtuals>(const repository_groups::virtuals * const,
RepositoryFactory * const factory)
{
- std::shared_ptr<Set<std::string> > virtuals_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > virtuals_formats(std::make_shared<Set<std::string>>());
virtuals_formats->insert("virtuals");
factory->add_repository_format(
@@ -59,7 +59,7 @@ namespace paludis
&VirtualsRepository::repository_factory_dependencies
);
- std::shared_ptr<Set<std::string> > installed_virtuals_formats(new Set<std::string>);
+ std::shared_ptr<Set<std::string> > installed_virtuals_formats(std::make_shared<Set<std::string>>());
installed_virtuals_formats->insert("installed_virtuals");
installed_virtuals_formats->insert("installed-virtuals");
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 0f5096030..f55b00366 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -76,8 +76,7 @@ namespace paludis
big_nasty_mutex(m),
has_names(false),
has_ids(false),
- format_key(new LiteralMetadataValueKey<std::string> (
- "format", "format", mkt_significant, "virtuals"))
+ format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format", mkt_significant, "virtuals"))
{
}
};
@@ -163,7 +162,7 @@ VirtualsRepository::need_names() const
for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator p(provides->begin()),
p_end(provides->end()) ; p != p_end ; ++p)
_imp->names.push_back(std::make_pair((*p).virtual_name(), std::shared_ptr<const PackageDepSpec>(
- new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package((*p).provided_by()->name())))));
+ std::make_shared<PackageDepSpec>(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package((*p).provided_by()->name())))));
}
std::sort(_imp->names.begin(), _imp->names.end(), NamesSortComparator());
@@ -252,13 +251,13 @@ std::shared_ptr<const PackageIDSequence>
VirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
if (q.category().value() != "virtual")
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
need_ids();
IDMap::const_iterator i(_imp->ids.find(q));
if (i == _imp->ids.end())
- return std::shared_ptr<PackageIDSequence>(new PackageIDSequence);
+ return std::shared_ptr<PackageIDSequence>(std::make_shared<PackageIDSequence>());
return i->second;
}
@@ -267,11 +266,11 @@ std::shared_ptr<const QualifiedPackageNameSet>
VirtualsRepository::package_names(const CategoryNamePart & c) const
{
if (c.value() != "virtual")
- return std::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
+ return std::shared_ptr<QualifiedPackageNameSet>(std::make_shared<QualifiedPackageNameSet>());
need_ids();
- std::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
+ std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
std::transform(_imp->ids.begin(), _imp->ids.end(), result->inserter(),
std::mem_fn(&std::pair<const QualifiedPackageName, std::shared_ptr<PackageIDSequence> >::first));
@@ -281,7 +280,7 @@ VirtualsRepository::package_names(const CategoryNamePart & c) const
std::shared_ptr<const CategoryNamePartSet>
VirtualsRepository::category_names() const
{
- std::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
+ std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
return result;
}
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index c2ba62b88..5d5525ae7 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -49,12 +49,12 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<VirtualsRepository> virtuals(new VirtualsRepository(&env));
- const std::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ std::shared_ptr<VirtualsRepository> virtuals(std::make_shared<VirtualsRepository>(&env));
+ const std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- std::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
@@ -92,16 +92,16 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<VirtualsRepository> virtuals(new VirtualsRepository(&env));
- const std::shared_ptr<FakeRepository> repo1(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ std::shared_ptr<VirtualsRepository> virtuals(std::make_shared<VirtualsRepository>(&env));
+ const std::shared_ptr<FakeRepository> repo1(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo1")
)));
- const std::shared_ptr<FakeRepository> repo2(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo2(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo2")
)));
- std::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository(
+ std::shared_ptr<FakeInstalledRepository> installed(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("installed"),
@@ -145,12 +145,12 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::shared_ptr<VirtualsRepository> virtuals(new VirtualsRepository(&env));
- const std::shared_ptr<FakeRepository> repo1(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ std::shared_ptr<VirtualsRepository> virtuals(std::make_shared<VirtualsRepository>(&env));
+ const std::shared_ptr<FakeRepository> repo1(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo1")
)));
- const std::shared_ptr<FakeRepository> repo2(new FakeRepository(make_named_values<FakeRepositoryParams>(
+ const std::shared_ptr<FakeRepository> repo2(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo2")
)));