aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-23 18:29:17 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-23 18:29:17 +0100
commitc3802f0aec7d89a518cf74145aa73bf2ea688e35 (patch)
tree9b6aab4b3d06e2e54afa10b2448af4f7819c6acd /paludis/repositories
parent8ea8866114c450dec08322c57f8002b29eee19d3 (diff)
downloadpaludis-c3802f0aec7d89a518cf74145aa73bf2ea688e35.tar.gz
paludis-c3802f0aec7d89a518cf74145aa73bf2ea688e35.tar.xz
Avoid sptr.reset(new ...)
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/accounts/accounts_id.cc38
-rw-r--r--paludis/repositories/accounts/accounts_repository_store.cc4
-rw-r--r--paludis/repositories/accounts/installed_accounts_id.cc2
-rw-r--r--paludis/repositories/cran/cran_package_id.cc28
-rw-r--r--paludis/repositories/cran/package_dep_spec.cc6
-rw-r--r--paludis/repositories/e/e_choices_key.cc2
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc178
-rw-r--r--paludis/repositories/e/e_key.cc8
-rw-r--r--paludis/repositories/e/e_repository.cc26
-rw-r--r--paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc2
-rw-r--r--paludis/repositories/e/e_repository_mask_file.cc2
-rw-r--r--paludis/repositories/e/ebuild.cc4
-rw-r--r--paludis/repositories/e/ebuild_id.cc78
-rw-r--r--paludis/repositories/e/exheres_layout.cc2
-rw-r--r--paludis/repositories/e/exndbam_id.cc2
-rw-r--r--paludis/repositories/e/exndbam_repository.cc4
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc2
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc2
-rw-r--r--paludis/repositories/e/info_metadata_key.cc8
-rw-r--r--paludis/repositories/e/traditional_layout.cc2
-rw-r--r--paludis/repositories/e/vdb_merger.cc2
-rw-r--r--paludis/repositories/e/vdb_repository.cc6
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc18
-rw-r--r--paludis/repositories/e/vdb_unmerger_TEST.cc4
-rw-r--r--paludis/repositories/fake/fake_package_id.cc46
-rw-r--r--paludis/repositories/gems/gem_specification.cc16
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.cc20
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc26
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc4
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc2
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_file.cc18
31 files changed, 281 insertions, 281 deletions
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index 860948370..2929580e2 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -161,24 +161,24 @@ AccountsID::_need_file_keys() const
if (_imp->is_user)
{
- _imp->username_key.reset(new LiteralMetadataValueKey<std::string>("username", "Username",
- mkt_significant, stringify(name().package())));
+ _imp->username_key = std::make_shared<LiteralMetadataValueKey<std::string>>("username", "Username",
+ mkt_significant, stringify(name().package()));
if (! k.get("gecos").empty())
- _imp->gecos_key.reset(new LiteralMetadataValueKey<std::string>("gecos", "Description",
- mkt_significant, k.get("gecos")));
+ _imp->gecos_key = std::make_shared<LiteralMetadataValueKey<std::string>>("gecos", "Description",
+ mkt_significant, k.get("gecos"));
if (! k.get("preferred_uid").empty())
- _imp->preferred_uid_key.reset(new LiteralMetadataValueKey<std::string>("preferred_uid", "Preferred UID",
- mkt_normal, k.get("preferred_uid")));
+ _imp->preferred_uid_key = std::make_shared<LiteralMetadataValueKey<std::string>>("preferred_uid", "Preferred UID",
+ mkt_normal, k.get("preferred_uid"));
if (! k.get("shell").empty())
- _imp->shell_key.reset(new LiteralMetadataValueKey<std::string>("shell", "Shell",
- mkt_normal, k.get("shell")));
+ _imp->shell_key = std::make_shared<LiteralMetadataValueKey<std::string>>("shell", "Shell",
+ mkt_normal, k.get("shell"));
if (! k.get("home").empty())
- _imp->home_key.reset(new LiteralMetadataValueKey<std::string>("home", "Home Directory",
- mkt_normal, k.get("home")));
+ _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>);
@@ -187,28 +187,28 @@ AccountsID::_need_file_keys() const
std::shared_ptr<Set<std::string> > groups_s(new 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.reset(new LiteralMetadataStringSetKey("extra_groups", "Extra Groups",
- mkt_normal, groups_s));
+ _imp->extra_groups_key = std::make_shared<LiteralMetadataStringSetKey>("extra_groups", "Extra Groups",
+ mkt_normal, groups_s);
}
if (! k.get("primary_group").empty())
{
- _imp->primary_group_key.reset(new LiteralMetadataValueKey<std::string>("primary_group", "Default Group",
- mkt_normal, k.get("primary_group")));
+ _imp->primary_group_key = std::make_shared<LiteralMetadataValueKey<std::string>>("primary_group", "Default Group",
+ mkt_normal, k.get("primary_group"));
all_groups_s->insert(k.get("primary_group"));
}
if (! all_groups_s->empty())
- _imp->dependencies_key.reset(new AccountsDepKey(_imp->env, all_groups_s));
+ _imp->dependencies_key = std::make_shared<AccountsDepKey>(_imp->env, all_groups_s);
}
else
{
- _imp->groupname_key.reset(new LiteralMetadataValueKey<std::string>("groupname", "Groupname",
- mkt_significant, stringify(name().package())));
+ _imp->groupname_key = std::make_shared<LiteralMetadataValueKey<std::string>>("groupname", "Groupname",
+ mkt_significant, stringify(name().package()));
if (! k.get("preferred_gid").empty())
- _imp->preferred_gid_key.reset(new LiteralMetadataValueKey<std::string>("preferred_gid", "Preferred GID",
- mkt_normal, k.get("preferred_gid")));
+ _imp->preferred_gid_key = std::make_shared<LiteralMetadataValueKey<std::string>>("preferred_gid", "Preferred GID",
+ mkt_normal, k.get("preferred_gid"));
}
_imp->has_file_keys = true;
diff --git a/paludis/repositories/accounts/accounts_repository_store.cc b/paludis/repositories/accounts/accounts_repository_store.cc
index 72b16843b..029f887d5 100644
--- a/paludis/repositories/accounts/accounts_repository_store.cc
+++ b/paludis/repositories/accounts/accounts_repository_store.cc
@@ -207,7 +207,7 @@ AccountsRepositoryStore::_load_one_user(
if (q == _imp->ids.end())
q = _imp->ids.insert(std::make_pair(qpn, std::make_shared<PackageIDSequence>())).first;
else
- q->second.reset(new PackageIDSequence);
+ q->second = std::make_shared<PackageIDSequence>();
if (_imp->installed)
q->second->push_back(std::make_shared<InstalledAccountsID>(_imp->env, qpn, repo, true));
@@ -263,7 +263,7 @@ AccountsRepositoryStore::_load_one_group(
if (q == _imp->ids.end())
q = _imp->ids.insert(std::make_pair(qpn, std::make_shared<PackageIDSequence>())).first;
else
- q->second.reset(new PackageIDSequence);
+ q->second = std::make_shared<PackageIDSequence>();
if (_imp->installed)
q->second->push_back(std::make_shared<InstalledAccountsID>(_imp->env, qpn, repo, false));
diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc
index ee9014914..017f8589d 100644
--- a/paludis/repositories/accounts/installed_accounts_id.cc
+++ b/paludis/repositories/accounts/installed_accounts_id.cc
@@ -161,7 +161,7 @@ InstalledAccountsID::need_keys_added() const
/* first person who gets annoyed by this not existing gets to implement it. */
}
- _imp->dependencies_key.reset(new AccountsDepKey(_imp->env, groups));
+ _imp->dependencies_key = std::make_shared<AccountsDepKey>(_imp->env, groups);
add_metadata_key(_imp->dependencies_key);
}
}
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index a2fb66e63..66fc6a5fe 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -120,8 +120,8 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
return;
}
- _imp->fs_location_key.reset(new LiteralMetadataValueKey<FSEntry> ("DescriptionFileLocation", "Description File Location",
- mkt_internal, f));
+ _imp->fs_location_key = std::make_shared<LiteralMetadataValueKey<FSEntry> >("DescriptionFileLocation", "Description File Location",
+ mkt_internal, f);
add_metadata_key(_imp->fs_location_key);
try
@@ -166,7 +166,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
{
/* License often isn't in the format the spec requires, so we can't parse it. */
Context local_context("When handling License: key:");
- _imp->license_key.reset(new LiteralMetadataValueKey<std::string>("License", "License", mkt_dependencies, file.get("License")));
+ _imp->license_key = std::make_shared<LiteralMetadataValueKey<std::string>>("License", "License", mkt_dependencies, file.get("License"));
add_metadata_key(_imp->license_key);
}
@@ -174,28 +174,28 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
{
/* URL is also in stupid formats */
Context local_context("When handling URL: key:");
- _imp->url_key.reset(new LiteralMetadataValueKey<std::string>("URL", "URL", mkt_significant, file.get("URL")));
+ _imp->url_key = std::make_shared<LiteralMetadataValueKey<std::string>>("URL", "URL", mkt_significant, file.get("URL"));
add_metadata_key(_imp->url_key);
}
if (! file.get("Title").empty())
{
Context local_context("When handling Title: key:");
- _imp->short_description_key.reset(new LiteralMetadataValueKey<std::string>("Title", "Title", mkt_significant, file.get("Title")));
+ _imp->short_description_key = std::make_shared<LiteralMetadataValueKey<std::string>>("Title", "Title", mkt_significant, file.get("Title"));
add_metadata_key(_imp->short_description_key);
}
if (! file.get("Description").empty())
{
Context local_context("When handling Description: key:");
- _imp->long_description_key.reset(new LiteralMetadataValueKey<std::string>("Description", "Description", mkt_normal, file.get("Description")));
+ _imp->long_description_key = std::make_shared<LiteralMetadataValueKey<std::string>>("Description", "Description", mkt_normal, file.get("Description"));
add_metadata_key(_imp->long_description_key);
}
else if (! file.get("BundleDescription").empty())
{
Context local_context("When handling BundleDescription: key:");
- _imp->long_description_key.reset(new LiteralMetadataValueKey<std::string>("BundleDescription", "Bundle Description",
- mkt_normal, file.get("BundleDescription")));
+ _imp->long_description_key = std::make_shared<LiteralMetadataValueKey<std::string>>("BundleDescription", "Bundle Description",
+ mkt_normal, file.get("BundleDescription"));
}
if (! file.get("Date").empty())
@@ -222,7 +222,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
Context local_context("When handling Contains: key:");
std::list<std::string> tokens;
tokenise_whitespace(file.get("Contains"), std::back_inserter(tokens));
- _imp->contains_key.reset(new PackageIDSequenceKey(_imp->env, "Contains", "Contains", mkt_normal));
+ _imp->contains_key = std::make_shared<PackageIDSequenceKey>(_imp->env, "Contains", "Contains", mkt_normal);
add_metadata_key(_imp->contains_key);
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
@@ -241,8 +241,8 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
if (! file.get("Suggests").empty())
{
Context local_context("When handling Suggests: key:");
- _imp->suggests_key.reset(new DepKey(_imp->env, "Suggests", "Suggests", file.get("Suggests"),
- _imp->suggests_labels, mkt_dependencies));
+ _imp->suggests_key = std::make_shared<DepKey>(_imp->env, "Suggests", "Suggests", file.get("Suggests"),
+ _imp->suggests_labels, mkt_dependencies);
add_metadata_key(_imp->suggests_key);
}
@@ -256,11 +256,11 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::shared_pt
if (! file.get("Depends").empty())
{
Context local_context("When handling Depends: key:");
- _imp->depends_key.reset(new DepKey(_imp->env, "Depends", "Depends", file.get("Depends") + ", R",
- _imp->depends_labels, mkt_dependencies));
+ _imp->depends_key = std::make_shared<DepKey>(_imp->env, "Depends", "Depends", file.get("Depends") + ", R",
+ _imp->depends_labels, mkt_dependencies);
}
else
- _imp->depends_key.reset(new DepKey(_imp->env, "Depends", "Depends", "R", _imp->depends_labels, mkt_dependencies));
+ _imp->depends_key = std::make_shared<DepKey>(_imp->env, "Depends", "Depends", "R", _imp->depends_labels, mkt_dependencies);
add_metadata_key(_imp->depends_key);
}
catch (const InternalError &)
diff --git a/paludis/repositories/cran/package_dep_spec.cc b/paludis/repositories/cran/package_dep_spec.cc
index 442ac2917..939ad0e43 100644
--- a/paludis/repositories/cran/package_dep_spec.cc
+++ b/paludis/repositories/cran/package_dep_spec.cc
@@ -121,7 +121,7 @@ namespace
CRANPackageDepSpecData & version_requirement(const VersionRequirement & v)
{
if (! version_requirements_v)
- version_requirements_v.reset(new VersionRequirements);
+ version_requirements_v = std::make_shared<VersionRequirements>();
version_requirements_v->push_back(v);
return *this;
}
@@ -130,9 +130,9 @@ namespace
{
unnormalised_package_name = s;
if ("R" == s)
- package_v.reset(new QualifiedPackageName("dev-lang/R"));
+ package_v = std::make_shared<QualifiedPackageName>("dev-lang/R");
else
- package_v.reset(new QualifiedPackageName(CategoryNamePart("cran") + PackageNamePart(cran_name_to_internal(s))));
+ package_v = std::make_shared<QualifiedPackageName>(CategoryNamePart("cran") + PackageNamePart(cran_name_to_internal(s)));
return *this;
}
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 5dd7a99c7..144c74c51 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -276,7 +276,7 @@ EChoicesKey::value() const
Context context("When making Choices key for '" + stringify(*_imp->id) + "':");
- _imp->value.reset(new Choices);
+ _imp->value = std::make_shared<Choices>();
if (! _imp->id->eapi()->supported())
return _imp->value;
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index d409963da..9afdf7c45 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -179,14 +179,14 @@ EInstalledRepositoryID::need_keys_added() const
if (_imp->keys)
return;
- _imp->keys.reset(new EInstalledRepositoryIDKeys);
+ _imp->keys = std::make_shared<EInstalledRepositoryIDKeys>();
// fs_location key could have been loaded by the ::fs_location_key() already. keep this
// at the top, other keys use it.
if (! _imp->fs_location)
{
- _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> (fs_location_raw_name(), fs_location_human_name(),
- mkt_internal, _imp->dir));
+ _imp->fs_location = std::make_shared<LiteralMetadataValueKey<FSEntry> >(fs_location_raw_name(), fs_location_human_name(),
+ mkt_internal, _imp->dir);
add_metadata_key(_imp->fs_location);
}
@@ -208,24 +208,24 @@ EInstalledRepositoryID::need_keys_added() const
if (! env->env_use().empty())
if ((_imp->dir / env->env_use()).exists())
{
- _imp->keys->raw_use.reset(new EStringSetKey(shared_from_this(), env->env_use(), env->description_use(),
- file_contents(_imp->dir / env->env_use()), mkt_internal));
+ _imp->keys->raw_use = std::make_shared<EStringSetKey>(shared_from_this(), env->env_use(), env->description_use(),
+ file_contents(_imp->dir / env->env_use()), mkt_internal);
add_metadata_key(_imp->keys->raw_use);
}
if (! vars->slot()->name().empty())
if ((_imp->dir / vars->slot()->name()).exists())
{
- _imp->keys->slot.reset(new LiteralMetadataValueKey<SlotName>(vars->slot()->name(), vars->slot()->description(),
- mkt_internal, SlotName(file_contents(_imp->dir / vars->slot()->name()))));
+ _imp->keys->slot = std::make_shared<LiteralMetadataValueKey<SlotName>>(vars->slot()->name(), vars->slot()->description(),
+ mkt_internal, SlotName(file_contents(_imp->dir / vars->slot()->name())));
add_metadata_key(_imp->keys->slot);
}
if (! vars->inherited()->name().empty())
if ((_imp->dir / vars->inherited()->name()).exists())
{
- _imp->keys->inherited.reset(new EStringSetKey(shared_from_this(), vars->inherited()->name(), vars->inherited()->description(),
- file_contents(_imp->dir / vars->inherited()->name()), mkt_internal));
+ _imp->keys->inherited = std::make_shared<EStringSetKey>(shared_from_this(), vars->inherited()->name(), vars->inherited()->description(),
+ file_contents(_imp->dir / vars->inherited()->name()), mkt_internal);
add_metadata_key(_imp->keys->inherited);
}
@@ -235,8 +235,8 @@ EInstalledRepositoryID::need_keys_added() const
std::string d(file_contents(_imp->dir / vars->defined_phases()->name()));
if (! d.empty())
{
- _imp->keys->defined_phases.reset(new EStringSetKey(shared_from_this(), vars->defined_phases()->name(), vars->defined_phases()->description(),
- d, mkt_internal));
+ _imp->keys->defined_phases = std::make_shared<EStringSetKey>(shared_from_this(), vars->defined_phases()->name(), vars->defined_phases()->description(),
+ d, mkt_internal);
add_metadata_key(_imp->keys->defined_phases);
}
}
@@ -244,14 +244,14 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->iuse()->name().empty())
{
if ((_imp->dir / vars->iuse()->name()).exists())
- _imp->keys->raw_iuse.reset(new EStringSetKey(shared_from_this(), vars->iuse()->name(), vars->iuse()->description(),
- file_contents(_imp->dir / vars->iuse()->name()), mkt_internal));
+ _imp->keys->raw_iuse = std::make_shared<EStringSetKey>(shared_from_this(), vars->iuse()->name(), vars->iuse()->description(),
+ file_contents(_imp->dir / vars->iuse()->name()), mkt_internal);
else
{
/* hack: if IUSE doesn't exist, we still need an iuse_key to make the choices
* code behave sanely. */
- _imp->keys->raw_iuse.reset(new EStringSetKey(shared_from_this(), vars->iuse()->name(), vars->iuse()->description(),
- "", mkt_internal));
+ _imp->keys->raw_iuse = std::make_shared<EStringSetKey>(shared_from_this(), vars->iuse()->name(), vars->iuse()->description(),
+ "", mkt_internal);
}
add_metadata_key(_imp->keys->raw_iuse);
}
@@ -260,9 +260,9 @@ EInstalledRepositoryID::need_keys_added() const
{
if ((_imp->dir / vars->iuse_effective()->name()).exists())
{
- _imp->keys->raw_iuse_effective.reset(new EStringSetKey(
+ _imp->keys->raw_iuse_effective = std::make_shared<EStringSetKey>(
shared_from_this(), vars->iuse_effective()->name(), vars->iuse_effective()->description(),
- file_contents(_imp->dir / vars->iuse_effective()->name()), mkt_internal));
+ file_contents(_imp->dir / vars->iuse_effective()->name()), mkt_internal);
add_metadata_key(_imp->keys->raw_iuse_effective);
}
}
@@ -270,40 +270,40 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->myoptions()->name().empty())
if ((_imp->dir / vars->myoptions()->name()).exists())
{
- _imp->keys->raw_myoptions.reset(new EMyOptionsKey(_imp->environment, shared_from_this(), vars->myoptions()->name(),
- vars->myoptions()->description(), file_contents(_imp->dir / vars->myoptions()->name()), mkt_internal));
+ _imp->keys->raw_myoptions = std::make_shared<EMyOptionsKey>(_imp->environment, shared_from_this(), vars->myoptions()->name(),
+ vars->myoptions()->description(), file_contents(_imp->dir / vars->myoptions()->name()), mkt_internal);
add_metadata_key(_imp->keys->raw_myoptions);
}
if (! vars->use_expand()->name().empty())
if ((_imp->dir / vars->use_expand()->name()).exists())
{
- _imp->keys->raw_use_expand.reset(new EStringSetKey(shared_from_this(), vars->use_expand()->name(), vars->use_expand()->description(),
- file_contents(_imp->dir / vars->use_expand()->name()), mkt_internal));
+ _imp->keys->raw_use_expand = std::make_shared<EStringSetKey>(shared_from_this(), vars->use_expand()->name(), vars->use_expand()->description(),
+ file_contents(_imp->dir / vars->use_expand()->name()), mkt_internal);
add_metadata_key(_imp->keys->raw_use_expand);
}
if (! vars->use_expand_hidden()->name().empty())
if ((_imp->dir / vars->use_expand_hidden()->name()).exists())
{
- _imp->keys->raw_use_expand_hidden.reset(new EStringSetKey(shared_from_this(), vars->use_expand_hidden()->name(), vars->use_expand_hidden()->description(),
- file_contents(_imp->dir / vars->use_expand_hidden()->name()), mkt_internal));
+ _imp->keys->raw_use_expand_hidden = std::make_shared<EStringSetKey>(shared_from_this(), vars->use_expand_hidden()->name(), vars->use_expand_hidden()->description(),
+ file_contents(_imp->dir / vars->use_expand_hidden()->name()), mkt_internal);
add_metadata_key(_imp->keys->raw_use_expand_hidden);
}
if (! vars->license()->name().empty())
if ((_imp->dir / vars->license()->name()).exists())
{
- _imp->keys->license.reset(new ELicenseKey(_imp->environment, shared_from_this(), vars->license(),
- file_contents(_imp->dir / vars->license()->name()), mkt_normal));
+ _imp->keys->license = std::make_shared<ELicenseKey>(_imp->environment, shared_from_this(), vars->license(),
+ file_contents(_imp->dir / vars->license()->name()), mkt_normal);
add_metadata_key(_imp->keys->license);
}
if (! vars->provide()->name().empty())
if ((_imp->dir / vars->provide()->name()).exists())
{
- _imp->keys->provide.reset(new EProvideKey(_imp->environment, shared_from_this(), vars->provide()->name(), vars->provide()->description(),
- file_contents(_imp->dir / vars->provide()->name()), mkt_internal));
+ _imp->keys->provide = std::make_shared<EProvideKey>(_imp->environment, shared_from_this(), vars->provide()->name(), vars->provide()->description(),
+ file_contents(_imp->dir / vars->provide()->name()), mkt_internal);
add_metadata_key(_imp->keys->provide);
}
@@ -317,20 +317,20 @@ EInstalledRepositoryID::need_keys_added() const
_imp->environment, shared_from_this(), *eapi()));
raw_deps->root()->accept(rewriter);
- _imp->keys->raw_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->dependencies()->name(),
- vars->dependencies()->description(), raw_deps_str, _imp->build_dependencies_labels, mkt_dependencies));
+ _imp->keys->raw_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), vars->dependencies()->name(),
+ vars->dependencies()->description(), raw_deps_str, _imp->build_dependencies_labels, mkt_dependencies);
add_metadata_key(_imp->keys->raw_dependencies);
- _imp->keys->build_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->dependencies()->name() + ".DEPEND",
- vars->dependencies()->description() + " (build)", rewriter.depend(), _imp->build_dependencies_labels, mkt_internal));
+ _imp->keys->build_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), vars->dependencies()->name() + ".DEPEND",
+ vars->dependencies()->description() + " (build)", rewriter.depend(), _imp->build_dependencies_labels, mkt_internal);
add_metadata_key(_imp->keys->build_dependencies);
- _imp->keys->run_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->dependencies()->name() + ".RDEPEND",
- vars->dependencies()->description() + " (run)", rewriter.rdepend(), _imp->build_dependencies_labels, mkt_internal));
+ _imp->keys->run_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), vars->dependencies()->name() + ".RDEPEND",
+ vars->dependencies()->description() + " (run)", rewriter.rdepend(), _imp->build_dependencies_labels, mkt_internal);
add_metadata_key(_imp->keys->run_dependencies);
- _imp->keys->post_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->dependencies()->name() + ".PDEPEND",
- vars->dependencies()->description() + " (post)", rewriter.pdepend(), _imp->build_dependencies_labels, mkt_internal));
+ _imp->keys->post_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), vars->dependencies()->name() + ".PDEPEND",
+ vars->dependencies()->description() + " (post)", rewriter.pdepend(), _imp->build_dependencies_labels, mkt_internal);
add_metadata_key(_imp->keys->post_dependencies);
}
}
@@ -339,27 +339,27 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->build_depend()->name().empty())
if ((_imp->dir / vars->build_depend()->name()).exists())
{
- _imp->keys->build_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->build_depend()->name(),
+ _imp->keys->build_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), vars->build_depend()->name(),
vars->build_depend()->description(), file_contents(_imp->dir / vars->build_depend()->name()),
- _imp->build_dependencies_labels, mkt_dependencies));
+ _imp->build_dependencies_labels, mkt_dependencies);
add_metadata_key(_imp->keys->build_dependencies);
}
if (! vars->run_depend()->name().empty())
if ((_imp->dir / vars->run_depend()->name()).exists())
{
- _imp->keys->run_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->run_depend()->name(),
+ _imp->keys->run_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), vars->run_depend()->name(),
vars->run_depend()->description(), file_contents(_imp->dir / vars->run_depend()->name()),
- _imp->run_dependencies_labels, mkt_dependencies));
+ _imp->run_dependencies_labels, mkt_dependencies);
add_metadata_key(_imp->keys->run_dependencies);
}
if (! vars->pdepend()->name().empty())
if ((_imp->dir / vars->pdepend()->name()).exists())
{
- _imp->keys->post_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->pdepend()->name(),
+ _imp->keys->post_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), vars->pdepend()->name(),
vars->pdepend()->description(), file_contents(_imp->dir / vars->pdepend()->name()),
- _imp->post_dependencies_labels, mkt_dependencies));
+ _imp->post_dependencies_labels, mkt_dependencies);
add_metadata_key(_imp->keys->post_dependencies);
}
}
@@ -367,32 +367,32 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->restrictions()->name().empty())
if ((_imp->dir / vars->restrictions()->name()).exists())
{
- _imp->keys->restrictions.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(), vars->restrictions(),
- file_contents(_imp->dir / vars->restrictions()->name()), mkt_internal));
+ _imp->keys->restrictions = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(), vars->restrictions(),
+ file_contents(_imp->dir / vars->restrictions()->name()), mkt_internal);
add_metadata_key(_imp->keys->restrictions);
}
if (! vars->properties()->name().empty())
if ((_imp->dir / vars->properties()->name()).exists())
{
- _imp->keys->properties.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(), vars->properties(),
- file_contents(_imp->dir / vars->properties()->name()), mkt_internal));
+ _imp->keys->properties = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(), vars->properties(),
+ file_contents(_imp->dir / vars->properties()->name()), mkt_internal);
add_metadata_key(_imp->keys->properties);
}
if (! vars->src_uri()->name().empty())
if ((_imp->dir / vars->src_uri()->name()).exists())
{
- _imp->keys->src_uri.reset(new EFetchableURIKey(_imp->environment, shared_from_this(), vars->src_uri(),
- file_contents(_imp->dir / vars->src_uri()->name()), mkt_dependencies));
+ _imp->keys->src_uri = std::make_shared<EFetchableURIKey>(_imp->environment, shared_from_this(), vars->src_uri(),
+ file_contents(_imp->dir / vars->src_uri()->name()), mkt_dependencies);
add_metadata_key(_imp->keys->src_uri);
}
if (! vars->short_description()->name().empty())
if ((_imp->dir / vars->short_description()->name()).exists())
{
- _imp->keys->short_description.reset(new LiteralMetadataValueKey<std::string> (vars->short_description()->name(),
- vars->short_description()->description(), mkt_significant, file_contents(_imp->dir / vars->short_description()->name())));
+ _imp->keys->short_description = std::make_shared<LiteralMetadataValueKey<std::string> >(vars->short_description()->name(),
+ vars->short_description()->description(), mkt_significant, file_contents(_imp->dir / vars->short_description()->name()));
add_metadata_key(_imp->keys->short_description);
}
@@ -402,8 +402,8 @@ EInstalledRepositoryID::need_keys_added() const
std::string value(file_contents(_imp->dir / vars->long_description()->name()));
if (! value.empty())
{
- _imp->keys->long_description.reset(new LiteralMetadataValueKey<std::string> (vars->long_description()->name(),
- vars->long_description()->description(), mkt_significant, value));
+ _imp->keys->long_description = std::make_shared<LiteralMetadataValueKey<std::string> >(vars->long_description()->name(),
+ vars->long_description()->description(), mkt_significant, value);
add_metadata_key(_imp->keys->long_description);
}
}
@@ -414,9 +414,9 @@ EInstalledRepositoryID::need_keys_added() const
std::string value(file_contents(_imp->dir / vars->upstream_changelog()->name()));
if (! value.empty())
{
- _imp->keys->upstream_changelog.reset(new ESimpleURIKey(_imp->environment, shared_from_this(),
+ _imp->keys->upstream_changelog = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(),
vars->upstream_changelog()->name(),
- vars->upstream_changelog()->description(), value, mkt_normal));
+ vars->upstream_changelog()->description(), value, mkt_normal);
add_metadata_key(_imp->keys->upstream_changelog);
}
}
@@ -427,9 +427,9 @@ EInstalledRepositoryID::need_keys_added() const
std::string value(file_contents(_imp->dir / vars->upstream_release_notes()->name()));
if (! value.empty())
{
- _imp->keys->upstream_release_notes.reset(new ESimpleURIKey(_imp->environment, shared_from_this(),
+ _imp->keys->upstream_release_notes = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(),
vars->upstream_release_notes()->name(),
- vars->upstream_release_notes()->description(), value, mkt_normal));
+ vars->upstream_release_notes()->description(), value, mkt_normal);
add_metadata_key(_imp->keys->upstream_release_notes);
}
}
@@ -440,9 +440,9 @@ EInstalledRepositoryID::need_keys_added() const
std::string value(file_contents(_imp->dir / vars->upstream_documentation()->name()));
if (! value.empty())
{
- _imp->keys->upstream_documentation.reset(new ESimpleURIKey(_imp->environment, shared_from_this(),
+ _imp->keys->upstream_documentation = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(),
vars->upstream_documentation()->name(),
- vars->upstream_documentation()->description(), value, mkt_normal));
+ vars->upstream_documentation()->description(), value, mkt_normal);
add_metadata_key(_imp->keys->upstream_documentation);
}
}
@@ -453,8 +453,8 @@ EInstalledRepositoryID::need_keys_added() const
std::string value(file_contents(_imp->dir / vars->bugs_to()->name()));
if (! value.empty())
{
- _imp->keys->bugs_to.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(),
- vars->bugs_to(), value, mkt_normal));
+ _imp->keys->bugs_to = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(),
+ vars->bugs_to(), value, mkt_normal);
add_metadata_key(_imp->keys->bugs_to);
}
}
@@ -465,8 +465,8 @@ EInstalledRepositoryID::need_keys_added() const
std::string value(file_contents(_imp->dir / vars->remote_ids()->name()));
if (! value.empty())
{
- _imp->keys->remote_ids.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(),
- vars->remote_ids(), value, mkt_internal));
+ _imp->keys->remote_ids = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(),
+ vars->remote_ids(), value, mkt_internal);
add_metadata_key(_imp->keys->remote_ids);
}
}
@@ -474,26 +474,26 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->homepage()->name().empty())
if ((_imp->dir / vars->homepage()->name()).exists())
{
- _imp->keys->homepage.reset(new ESimpleURIKey(_imp->environment, shared_from_this(), vars->homepage()->name(),
+ _imp->keys->homepage = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(), vars->homepage()->name(),
vars->homepage()->description(),
- file_contents(_imp->dir / vars->homepage()->name()), mkt_significant));
+ file_contents(_imp->dir / vars->homepage()->name()), mkt_significant);
add_metadata_key(_imp->keys->homepage);
}
_imp->keys->contents = make_contents_key();
add_metadata_key(_imp->keys->contents);
- _imp->keys->installed_time.reset(new EMTimeKey(shared_from_this(), "INSTALLED_TIME", "Installed time",
- _imp->dir / contents_filename(), mkt_normal));
+ _imp->keys->installed_time = std::make_shared<EMTimeKey>(shared_from_this(), "INSTALLED_TIME", "Installed time",
+ _imp->dir / contents_filename(), mkt_normal);
add_metadata_key(_imp->keys->installed_time);
if (_imp->eapi->supported())
- _imp->keys->choices.reset(new EChoicesKey(_imp->environment, shared_from_this(), "PALUDIS_CHOICES",
+ _imp->keys->choices = std::make_shared<EChoicesKey>(_imp->environment, shared_from_this(), "PALUDIS_CHOICES",
_imp->eapi->supported()->ebuild_environment_variables()->description_choices(),
- mkt_normal, make_null_shared_ptr(), make_null_shared_ptr()));
+ mkt_normal, make_null_shared_ptr(), make_null_shared_ptr());
else
- _imp->keys->choices.reset(new EChoicesKey(_imp->environment, shared_from_this(), "PALUDIS_CHOICES", "Choices", mkt_normal,
- make_null_shared_ptr(), make_null_shared_ptr()));
+ _imp->keys->choices = std::make_shared<EChoicesKey>(_imp->environment, shared_from_this(), "PALUDIS_CHOICES", "Choices", mkt_normal,
+ make_null_shared_ptr(), make_null_shared_ptr());
add_metadata_key(_imp->keys->choices);
@@ -506,64 +506,64 @@ EInstalledRepositoryID::need_keys_added() const
from_repositories_value->insert(file_contents(_imp->dir / "BINARY_REPOSITORY"));
if (! from_repositories_value->empty())
{
- _imp->keys->from_repositories.reset(new LiteralMetadataStringSetKey("REPOSITORIES",
- "From repositories", mkt_normal, from_repositories_value));
+ _imp->keys->from_repositories = std::make_shared<LiteralMetadataStringSetKey>("REPOSITORIES",
+ "From repositories", mkt_normal, from_repositories_value);
add_metadata_key(_imp->keys->from_repositories);
}
if ((_imp->dir / "ASFLAGS").exists())
{
- _imp->keys->asflags.reset(new LiteralMetadataValueKey<std::string> ("ASFLAGS", "ASFLAGS",
- mkt_internal, file_contents(_imp->dir / "ASFLAGS")));
+ _imp->keys->asflags = std::make_shared<LiteralMetadataValueKey<std::string> >("ASFLAGS", "ASFLAGS",
+ mkt_internal, file_contents(_imp->dir / "ASFLAGS"));
add_metadata_key(_imp->keys->asflags);
}
if ((_imp->dir / "CBUILD").exists())
{
- _imp->keys->cbuild.reset(new LiteralMetadataValueKey<std::string> ("CBUILD", "CBUILD",
- mkt_internal, file_contents(_imp->dir / "CBUILD")));
+ _imp->keys->cbuild = std::make_shared<LiteralMetadataValueKey<std::string> >("CBUILD", "CBUILD",
+ mkt_internal, file_contents(_imp->dir / "CBUILD"));
add_metadata_key(_imp->keys->cbuild);
}
if ((_imp->dir / "CFLAGS").exists())
{
- _imp->keys->cflags.reset(new LiteralMetadataValueKey<std::string> ("CFLAGS", "CFLAGS",
- mkt_internal, file_contents(_imp->dir / "CFLAGS")));
+ _imp->keys->cflags = std::make_shared<LiteralMetadataValueKey<std::string> >("CFLAGS", "CFLAGS",
+ mkt_internal, file_contents(_imp->dir / "CFLAGS"));
add_metadata_key(_imp->keys->cflags);
}
if ((_imp->dir / "CHOST").exists())
{
- _imp->keys->chost.reset(new LiteralMetadataValueKey<std::string> ("CHOST", "CHOST",
- mkt_internal, file_contents(_imp->dir / "CHOST")));
+ _imp->keys->chost = std::make_shared<LiteralMetadataValueKey<std::string> >("CHOST", "CHOST",
+ mkt_internal, file_contents(_imp->dir / "CHOST"));
add_metadata_key(_imp->keys->chost);
}
if ((_imp->dir / "CXXFLAGS").exists())
{
- _imp->keys->cxxflags.reset(new LiteralMetadataValueKey<std::string> ("CXXFLAGS", "CXXFLAGS",
- mkt_internal, file_contents(_imp->dir / "CXXFLAGS")));
+ _imp->keys->cxxflags = std::make_shared<LiteralMetadataValueKey<std::string> >("CXXFLAGS", "CXXFLAGS",
+ mkt_internal, file_contents(_imp->dir / "CXXFLAGS"));
add_metadata_key(_imp->keys->cxxflags);
}
if ((_imp->dir / "LDFLAGS").exists())
{
- _imp->keys->ldflags.reset(new LiteralMetadataValueKey<std::string> ("LDFLAGS", "LDFLAGS",
- mkt_internal, file_contents(_imp->dir / "LDFLAGS")));
+ _imp->keys->ldflags = std::make_shared<LiteralMetadataValueKey<std::string> >("LDFLAGS", "LDFLAGS",
+ mkt_internal, file_contents(_imp->dir / "LDFLAGS"));
add_metadata_key(_imp->keys->ldflags);
}
if ((_imp->dir / "PKGMANAGER").exists())
{
- _imp->keys->pkgmanager.reset(new LiteralMetadataValueKey<std::string> ("PKGMANAGER", "Installed using",
- mkt_normal, file_contents(_imp->dir / "PKGMANAGER")));
+ _imp->keys->pkgmanager = std::make_shared<LiteralMetadataValueKey<std::string> >("PKGMANAGER", "Installed using",
+ mkt_normal, file_contents(_imp->dir / "PKGMANAGER"));
add_metadata_key(_imp->keys->pkgmanager);
}
if ((_imp->dir / "VDB_FORMAT").exists())
{
- _imp->keys->vdb_format.reset(new LiteralMetadataValueKey<std::string> ("VDB_FORMAT", "VDB Format",
- mkt_internal, file_contents(_imp->dir / "VDB_FORMAT")));
+ _imp->keys->vdb_format = std::make_shared<LiteralMetadataValueKey<std::string> >("VDB_FORMAT", "VDB Format",
+ mkt_internal, file_contents(_imp->dir / "VDB_FORMAT"));
add_metadata_key(_imp->keys->vdb_format);
}
}
@@ -859,8 +859,8 @@ EInstalledRepositoryID::fs_location_key() const
{
Lock l(_imp->mutex);
- _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> (fs_location_raw_name(),
- fs_location_human_name(), mkt_internal, _imp->dir));
+ _imp->fs_location = std::make_shared<LiteralMetadataValueKey<FSEntry> >(fs_location_raw_name(),
+ fs_location_human_name(), mkt_internal, _imp->dir);
add_metadata_key(_imp->fs_location);
}
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 1e506994e..c567aff92 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -808,7 +808,7 @@ EKeywordsKey::value() const
if (_imp->value)
return _imp->value;
- _imp->value.reset(new KeywordNameSet);
+ _imp->value = std::make_shared<KeywordNameSet>();
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
tokenise_whitespace(_imp->string_value, create_inserter<KeywordName>(_imp->value->inserter()));
return _imp->value;
@@ -897,7 +897,7 @@ EStringSetKey::value() const
if (_imp->value)
return _imp->value;
- _imp->value.reset(new Set<std::string>);
+ _imp->value = std::make_shared<Set<std::string>>();
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
tokenise_whitespace(_imp->string_value, _imp->value->inserter());
return _imp->value;
@@ -982,7 +982,7 @@ EContentsKey::value() const
Context context("When creating contents for VDB key '" + stringify(*_imp->id) + "' from '" + stringify(_imp->filename) + "':");
- _imp->value.reset(new Contents);
+ _imp->value = std::make_shared<Contents>();
FSEntry f(_imp->filename);
if (! f.is_regular_file_or_symlink_to_regular_file())
@@ -1100,7 +1100,7 @@ EMTimeKey::value() const
if (_imp->value)
return *_imp->value;
- _imp->value.reset(new Timestamp(Timestamp::now()));
+ _imp->value = std::make_shared<Timestamp>(Timestamp::now());
try
{
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index e5e2ca7dd..81f5916dd 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -141,7 +141,7 @@ namespace
if (r)
{
- result.reset(new FSEntrySequence);
+ result = std::make_shared<FSEntrySequence>();
for (ERepositorySequence::ConstIterator e(r->begin()), e_end(r->end()) ;
e != e_end ; ++e)
result->push_back((*e)->location_key()->value());
@@ -157,7 +157,7 @@ namespace
if (r)
{
- result.reset(new Sequence<std::string>);
+ result = std::make_shared<Sequence<std::string>>();
for (ERepositorySequence::ConstIterator e(r->begin()), e_end(r->end()) ;
e != e_end ; ++e)
result->push_back(stringify((*e)->name()));
@@ -409,7 +409,7 @@ namespace paludis
if (profiles_desc == FSEntry("/dev/null"))
{
auto_profiles->push_back(FSEntry("/var/empty"));
- main_profile_path.reset(new FSEntry("/var/empty"));
+ main_profile_path = std::make_shared<FSEntry>("/var/empty");
}
else
{
@@ -425,16 +425,16 @@ namespace paludis
FSEntry p(profiles_desc.dirname().realpath().dirname() / "profiles" / tokens.at(1));
auto_profiles->push_back(p);
- main_profile_path.reset(new FSEntry(p));
+ main_profile_path = std::make_shared<FSEntry>(p);
break;
}
}
profiles = auto_profiles;
}
else if (params.profiles()->empty())
- main_profile_path.reset(new FSEntry("/var/empty"));
+ main_profile_path = std::make_shared<FSEntry>("/var/empty");
else
- main_profile_path.reset(new FSEntry(*params.profiles()->begin()));
+ main_profile_path = std::make_shared<FSEntry>(*params.profiles()->begin());
profile_ptr = ProfileFactory::get_instance()->create(
params.profile_layout(),
@@ -661,7 +661,7 @@ ERepository::arch_flags() const
if (! _imp->arch_flags)
{
Context context("When loading arch list:");
- _imp->arch_flags.reset(new Set<UnprefixedChoiceName>);
+ _imp->arch_flags = std::make_shared<Set<UnprefixedChoiceName>>();
bool found_one(false);
std::shared_ptr<const FSEntrySequence> arch_list_files(_imp->layout->arch_list_files());
@@ -874,7 +874,7 @@ ERepository::update_news() const
Lock l(_imp->mutexes->news_ptr_mutex);
if (! _imp->news_ptr)
- _imp->news_ptr.reset(new ERepositoryNews(_imp->params.environment(), this, _imp->params));
+ _imp->news_ptr = std::make_shared<ERepositoryNews>(_imp->params.environment(), this, _imp->params);
_imp->news_ptr->update_news();
}
@@ -1171,8 +1171,8 @@ ERepository::need_keys_added() const
k = _imp->profile_ptr->environment_variable(v);
}
- _imp->accept_keywords_key.reset(new LiteralMetadataValueKey<std::string>(v,
- "Default accepted keywords", mkt_internal, k));
+ _imp->accept_keywords_key = std::make_shared<LiteralMetadataValueKey<std::string>>(v,
+ "Default accepted keywords", mkt_internal, k);
add_metadata_key(_imp->accept_keywords_key);
}
@@ -1258,7 +1258,7 @@ ERepository::repository_factory_create(
throw ERepositoryConfigurationError("Master repository format is '" + stringify(format) + "', not 'ebuild'");
std::shared_ptr<ERepository> master_repository(std::static_pointer_cast<ERepository>(master_repository_uncasted));
- master_repositories.reset(new ERepositorySequence);
+ master_repositories = std::make_shared<ERepositorySequence>();
master_repositories->push_back(master_repository);
}
else if (layout_conf)
@@ -1285,7 +1285,7 @@ ERepository::repository_factory_create(
std::shared_ptr<ERepository> master_repository(std::static_pointer_cast<ERepository>(master_repository_uncasted));
if (! master_repositories)
- master_repositories.reset(new ERepositorySequence);
+ master_repositories = std::make_shared<ERepositorySequence>();
master_repositories->push_back(master_repository);
}
catch (const NoSuchRepositoryError &)
@@ -1574,7 +1574,7 @@ ERepository::use_desc() const
Lock l(_imp->mutexes->use_desc_mutex);
if (! _imp->use_desc)
{
- _imp->use_desc.reset(new UseDesc(_imp->layout->use_desc_files()));
+ _imp->use_desc = std::make_shared<UseDesc>(_imp->layout->use_desc_files());
}
return _imp->use_desc;
diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
index 47b11b6de..4d232ad07 100644
--- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
+++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
@@ -121,7 +121,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- keys.reset(new 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/e_repository_mask_file.cc b/paludis/repositories/e/e_repository_mask_file.cc
index 0c9e41103..e46400a15 100644
--- a/paludis/repositories/e/e_repository_mask_file.cc
+++ b/paludis/repositories/e/e_repository_mask_file.cc
@@ -65,7 +65,7 @@ MaskFile::MaskFile(const FSEntry & f, const LineConfigFileOptions & opts) :
{
if (it->empty())
{
- comment.reset(new Sequence<std::string>);
+ comment = std::make_shared<Sequence<std::string>>();
comment_used = false;
continue;
}
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 2b7b2cdc7..dd595580f 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -409,7 +409,7 @@ bool
EbuildMetadataCommand::do_run_command(const Command & cmd)
{
bool ok(false);
- keys.reset(new Map<std::string, std::string>);
+ keys = std::make_shared<Map<std::string, std::string>>();
try
{
@@ -453,7 +453,7 @@ EbuildMetadataCommand::do_run_command(const Command & cmd)
{
Log::get_instance()->message("e.ebuild.cache_failure", ll_warning, lc_context) << "Could not generate cache for '"
<< *params.package_id() << "', stdout says '" << captured_stdout << "' and stderr says '" << captured_stderr << "'";
- keys.reset(new Map<std::string, std::string>);
+ keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("EAPI", EAPIData::get_instance()->unknown_eapi()->name());
return false;
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 3e9099d20..03e55c52e 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -182,8 +182,8 @@ EbuildID::need_keys_added() const
// fs_location key could have been loaded by the ::fs_location_key() already.
if (! _imp->fs_location)
{
- _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> ("EBUILD", "Ebuild Location",
- mkt_internal, _imp->ebuild));
+ _imp->fs_location = std::make_shared<LiteralMetadataValueKey<FSEntry> >("EBUILD", "Ebuild Location",
+ mkt_internal, _imp->ebuild);
add_metadata_key(_imp->fs_location);
}
@@ -372,22 +372,22 @@ EbuildID::need_keys_added() const
}
}
- _imp->raw_iuse_effective.reset(new LiteralMetadataStringSetKey(
+ _imp->raw_iuse_effective = std::make_shared<LiteralMetadataStringSetKey>(
_imp->eapi->supported()->ebuild_metadata_variables()->iuse_effective()->name(),
_imp->eapi->supported()->ebuild_metadata_variables()->iuse_effective()->description(),
mkt_internal,
- iuse_effective));
+ iuse_effective);
add_metadata_key(_imp->raw_iuse_effective);
}
- _imp->choices.reset(new EChoicesKey(_imp->environment, shared_from_this(), "PALUDIS_CHOICES",
+ _imp->choices = std::make_shared<EChoicesKey>(_imp->environment, shared_from_this(), "PALUDIS_CHOICES",
_imp->eapi->supported()->ebuild_environment_variables()->description_choices(),
mkt_normal, e_repository(),
- maybe_use_descriptions));
+ maybe_use_descriptions);
}
else
- _imp->choices.reset(new EChoicesKey(_imp->environment, shared_from_this(), "PALUDIS_CHOICES", "Choices", mkt_normal,
- e_repository(), maybe_use_descriptions));
+ _imp->choices = std::make_shared<EChoicesKey>(_imp->environment, shared_from_this(), "PALUDIS_CHOICES", "Choices", mkt_normal,
+ e_repository(), maybe_use_descriptions);
add_metadata_key(_imp->choices);
}
@@ -833,7 +833,7 @@ EbuildID::fs_location_key() const
// Avoid loading whole metadata
if (! _imp->fs_location)
{
- _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> ("EBUILD", "Ebuild Location", mkt_internal, _imp->ebuild));
+ _imp->fs_location = std::make_shared<LiteralMetadataValueKey<FSEntry> >("EBUILD", "Ebuild Location", mkt_internal, _imp->ebuild);
add_metadata_key(_imp->fs_location);
}
@@ -875,7 +875,7 @@ void
EbuildID::load_captured_stderr(const std::string & r, const std::string & h, const MetadataKeyType t, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->captured_stderr_key.reset(new LiteralMetadataValueKey<std::string> (r, h, t, v));
+ _imp->captured_stderr_key = std::make_shared<LiteralMetadataValueKey<std::string> >(r, h, t, v);
add_metadata_key(_imp->captured_stderr_key);
}
@@ -883,7 +883,7 @@ void
EbuildID::load_captured_stdout(const std::string & r, const std::string & h, const MetadataKeyType t, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->captured_stdout_key.reset(new LiteralMetadataValueKey<std::string> (r, h, t, v));
+ _imp->captured_stdout_key = std::make_shared<LiteralMetadataValueKey<std::string> >(r, h, t, v);
add_metadata_key(_imp->captured_stdout_key);
}
@@ -891,7 +891,7 @@ void
EbuildID::load_short_description(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->short_description.reset(new LiteralMetadataValueKey<std::string> (r, h, mkt_significant, v));
+ _imp->short_description = std::make_shared<LiteralMetadataValueKey<std::string> >(r, h, mkt_significant, v);
add_metadata_key(_imp->short_description);
}
@@ -899,7 +899,7 @@ void
EbuildID::load_long_description(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->long_description.reset(new LiteralMetadataValueKey<std::string> (r, h, mkt_normal, v));
+ _imp->long_description = std::make_shared<LiteralMetadataValueKey<std::string> >(r, h, mkt_normal, v);
add_metadata_key(_imp->long_description);
}
@@ -907,8 +907,8 @@ void
EbuildID::load_raw_depend(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->raw_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), r, h, v,
- _imp->raw_dependencies_labels, mkt_dependencies));
+ _imp->raw_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ _imp->raw_dependencies_labels, mkt_dependencies);
add_metadata_key(_imp->raw_dependencies);
}
@@ -917,8 +917,8 @@ EbuildID::load_build_depend(const std::string & r, const std::string & h, const
bool rewritten) const
{
Lock l(_imp->mutex);
- _imp->build_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), r, h, v,
- _imp->build_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies));
+ _imp->build_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ _imp->build_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
add_metadata_key(_imp->build_dependencies);
}
@@ -927,8 +927,8 @@ EbuildID::load_run_depend(const std::string & r, const std::string & h, const st
bool rewritten) const
{
Lock l(_imp->mutex);
- _imp->run_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), r, h, v,
- _imp->run_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies));
+ _imp->run_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ _imp->run_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
add_metadata_key(_imp->run_dependencies);
}
@@ -937,8 +937,8 @@ EbuildID::load_post_depend(const std::string & r, const std::string & h, const s
bool rewritten) const
{
Lock l(_imp->mutex);
- _imp->post_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), r, h, v,
- _imp->post_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies));
+ _imp->post_dependencies = std::make_shared<EDependenciesKey>(_imp->environment, shared_from_this(), r, h, v,
+ _imp->post_dependencies_labels, rewritten ? mkt_internal : mkt_dependencies);
add_metadata_key(_imp->post_dependencies);
}
@@ -946,7 +946,7 @@ void
EbuildID::load_src_uri(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->src_uri.reset(new EFetchableURIKey(_imp->environment, shared_from_this(), m, v, mkt_dependencies));
+ _imp->src_uri = std::make_shared<EFetchableURIKey>(_imp->environment, shared_from_this(), m, v, mkt_dependencies);
add_metadata_key(_imp->src_uri);
}
@@ -954,7 +954,7 @@ void
EbuildID::load_homepage(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->homepage.reset(new ESimpleURIKey(_imp->environment, shared_from_this(), r, h, v, mkt_significant));
+ _imp->homepage = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(), r, h, v, mkt_significant);
add_metadata_key(_imp->homepage);
}
@@ -962,7 +962,7 @@ void
EbuildID::load_license(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->license.reset(new ELicenseKey(_imp->environment, shared_from_this(), m, v, mkt_internal));
+ _imp->license = std::make_shared<ELicenseKey>(_imp->environment, shared_from_this(), m, v, mkt_internal);
add_metadata_key(_imp->license);
}
@@ -970,7 +970,7 @@ void
EbuildID::load_restrict(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->restrictions.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(), m, v, mkt_internal));
+ _imp->restrictions = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(), m, v, mkt_internal);
add_metadata_key(_imp->restrictions);
}
@@ -978,7 +978,7 @@ void
EbuildID::load_properties(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->properties.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(), m, v, mkt_internal));
+ _imp->properties = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(), m, v, mkt_internal);
add_metadata_key(_imp->properties);
}
@@ -986,7 +986,7 @@ void
EbuildID::load_provide(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->provide.reset(new EProvideKey(_imp->environment, shared_from_this(), r, h, v, mkt_dependencies));
+ _imp->provide = std::make_shared<EProvideKey>(_imp->environment, shared_from_this(), r, h, v, mkt_dependencies);
add_metadata_key(_imp->provide);
}
@@ -994,7 +994,7 @@ void
EbuildID::load_iuse(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->raw_iuse.reset(new EStringSetKey(shared_from_this(), r, h, v, mkt_internal));
+ _imp->raw_iuse = std::make_shared<EStringSetKey>(shared_from_this(), r, h, v, mkt_internal);
add_metadata_key(_imp->raw_iuse);
}
@@ -1002,7 +1002,7 @@ void
EbuildID::load_myoptions(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->raw_myoptions.reset(new EMyOptionsKey(_imp->environment, shared_from_this(), r, h, v, mkt_internal));
+ _imp->raw_myoptions = std::make_shared<EMyOptionsKey>(_imp->environment, shared_from_this(), r, h, v, mkt_internal);
add_metadata_key(_imp->raw_myoptions);
}
@@ -1010,7 +1010,7 @@ void
EbuildID::load_use(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->raw_use.reset(new EStringSetKey(shared_from_this(), r, h, v, mkt_internal));
+ _imp->raw_use = std::make_shared<EStringSetKey>(shared_from_this(), r, h, v, mkt_internal);
add_metadata_key(_imp->raw_use);
}
@@ -1018,7 +1018,7 @@ void
EbuildID::load_keywords(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->keywords.reset(new EKeywordsKey(_imp->environment, shared_from_this(), r, h, v, mkt_internal));
+ _imp->keywords = std::make_shared<EKeywordsKey>(_imp->environment, shared_from_this(), r, h, v, mkt_internal);
add_metadata_key(_imp->keywords);
}
@@ -1026,7 +1026,7 @@ void
EbuildID::load_inherited(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->inherited.reset(new EStringSetKey(shared_from_this(), r, h, v, mkt_internal));
+ _imp->inherited = std::make_shared<EStringSetKey>(shared_from_this(), r, h, v, mkt_internal);
add_metadata_key(_imp->inherited);
}
@@ -1037,7 +1037,7 @@ EbuildID::load_defined_phases(const std::string & r, const std::string & h, cons
throw InternalError(PALUDIS_HERE, "v should not be empty");
Lock l(_imp->mutex);
- _imp->defined_phases.reset(new EStringSetKey(shared_from_this(), r, h, v, mkt_internal));
+ _imp->defined_phases = std::make_shared<EStringSetKey>(shared_from_this(), r, h, v, mkt_internal);
add_metadata_key(_imp->defined_phases);
}
@@ -1045,7 +1045,7 @@ void
EbuildID::load_upstream_changelog(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->upstream_changelog.reset(new ESimpleURIKey(_imp->environment, shared_from_this(), r, h, v, mkt_normal));
+ _imp->upstream_changelog = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(), r, h, v, mkt_normal);
add_metadata_key(_imp->upstream_changelog);
}
@@ -1053,7 +1053,7 @@ void
EbuildID::load_upstream_documentation(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->upstream_documentation.reset(new ESimpleURIKey(_imp->environment, shared_from_this(), r, h, v, mkt_normal));
+ _imp->upstream_documentation = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(), r, h, v, mkt_normal);
add_metadata_key(_imp->upstream_documentation);
}
@@ -1061,7 +1061,7 @@ void
EbuildID::load_upstream_release_notes(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->upstream_release_notes.reset(new ESimpleURIKey(_imp->environment, shared_from_this(), r, h, v, mkt_normal));
+ _imp->upstream_release_notes = std::make_shared<ESimpleURIKey>(_imp->environment, shared_from_this(), r, h, v, mkt_normal);
add_metadata_key(_imp->upstream_release_notes);
}
@@ -1069,7 +1069,7 @@ void
EbuildID::load_bugs_to(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->bugs_to.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(), m, v, mkt_normal));
+ _imp->bugs_to = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(), m, v, mkt_normal);
add_metadata_key(_imp->bugs_to);
}
@@ -1077,7 +1077,7 @@ void
EbuildID::load_remote_ids(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->remote_ids.reset(new EPlainTextSpecKey(_imp->environment, shared_from_this(), m, v, mkt_internal));
+ _imp->remote_ids = std::make_shared<EPlainTextSpecKey>(_imp->environment, shared_from_this(), m, v, mkt_internal);
add_metadata_key(_imp->remote_ids);
}
@@ -1085,7 +1085,7 @@ void
EbuildID::load_slot(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->slot.reset(new ESlotKey(m, v, mkt_internal));
+ _imp->slot = std::make_shared<ESlotKey>(m, v, mkt_internal);
add_metadata_key(_imp->slot);
}
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index c4c26d27b..b97918ea8 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -325,7 +325,7 @@ ExheresLayout::need_category_names_collection() const
need_category_names();
- _imp->category_names_collection.reset(new CategoryNamePartSet);
+ _imp->category_names_collection = std::make_shared<CategoryNamePartSet>();
std::transform(_imp->category_names.begin(), _imp->category_names.end(),
_imp->category_names_collection->inserter(),
std::mem_fn(&std::pair<const CategoryNamePart, bool>::first));
diff --git a/paludis/repositories/e/exndbam_id.cc b/paludis/repositories/e/exndbam_id.cc
index 4b79c5092..be5f6bd4c 100644
--- a/paludis/repositories/e/exndbam_id.cc
+++ b/paludis/repositories/e/exndbam_id.cc
@@ -54,7 +54,7 @@ namespace
return _v;
using namespace std::placeholders;
- _v.reset(new Contents);
+ _v = std::make_shared<Contents>();
_db->parse_contents(*_id,
std::bind(&Contents::add, _v.get(), std::placeholders::_1),
std::bind(&Contents::add, _v.get(), std::placeholders::_1),
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 6ca2933ea..300d368b1 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -215,8 +215,8 @@ ExndbamRepository::package_ids(const QualifiedPackageName & q) const
{
Lock l(*(*e).mutex());
if (! (*e).package_id())
- (*e).package_id().reset(new ExndbamID((*e).name(), (*e).version(), _imp->params.environment(),
- shared_from_this(), (*e).fs_location(), &_imp->ndbam));
+ (*e).package_id() = std::make_shared<ExndbamID>((*e).name(), (*e).version(), _imp->params.environment(),
+ shared_from_this(), (*e).fs_location(), &_imp->ndbam);
result->push_back((*e).package_id());
}
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
index dd91dcbe3..614d4bbb9 100644
--- a/paludis/repositories/e/exndbam_repository_TEST.cc
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -141,7 +141,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo1);
- keys.reset(new 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" / "postinsttest"));
keys->insert("builddir", stringify(FSEntry::cwd() / "exndbam_repository_TEST_dir" / "build"));
diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index 23570bdcf..d38f35e4e 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -115,7 +115,7 @@ namespace
{
PackageDepSpec new_s(PartiallyMadePackageDepSpec(*node.spec()).slot_requirement(
std::make_shared<ELikeSlotExactRequirement>((*matches->last())->slot_key()->value(), true)));
- c.reset(new PackageDepSpec(new_s));
+ c = std::make_shared<PackageDepSpec>(new_s);
}
} while (false);
diff --git a/paludis/repositories/e/info_metadata_key.cc b/paludis/repositories/e/info_metadata_key.cc
index 2396412cb..7beddfa34 100644
--- a/paludis/repositories/e/info_metadata_key.cc
+++ b/paludis/repositories/e/info_metadata_key.cc
@@ -100,7 +100,7 @@ InfoVarsMetadataKey::value() const
if (_imp->value)
return _imp->value;
- _imp->value.reset(new Set<std::string>);
+ _imp->value = std::make_shared<Set<std::string>>();
for (FSEntrySequence::ConstIterator location(_imp->locations->begin()), location_end(_imp->locations->end()) ;
location != location_end ; ++location)
@@ -189,18 +189,18 @@ InfoPkgsMetadataKey::need_keys_added() const
filter::InstalledAtRoot(_imp->env->root()))]);
if (q->empty())
- key.reset(new LiteralMetadataValueKey<std::string>(i->first, i->first, mkt_normal, "(none)"));
+ key = std::make_shared<LiteralMetadataValueKey<std::string>>(i->first, i->first, mkt_normal, "(none)");
else
{
using namespace std::placeholders;
std::shared_ptr<Set<std::string> > s(new 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.reset(new LiteralMetadataStringSetKey(i->first, i->first, mkt_normal, s));
+ key = std::make_shared<LiteralMetadataStringSetKey>(i->first, i->first, mkt_normal, s);
}
}
else
- key.reset(new LiteralMetadataValueKey<std::string>(i->first, i->first, mkt_normal, "(unknown EAPI)"));
+ key = std::make_shared<LiteralMetadataValueKey<std::string>>(i->first, i->first, mkt_normal, "(unknown EAPI)");
add_metadata_key(key);
}
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 05d654165..b0c114c0e 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -336,7 +336,7 @@ TraditionalLayout::need_category_names_collection() const
need_category_names();
- _imp->category_names_collection.reset(new CategoryNamePartSet);
+ _imp->category_names_collection = std::make_shared<CategoryNamePartSet>();
std::transform(_imp->category_names.begin(), _imp->category_names.end(),
_imp->category_names_collection->inserter(),
std::mem_fn(&std::pair<const CategoryNamePart, bool>::first));
diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc
index 4ef716b0a..4d5ba23db 100644
--- a/paludis/repositories/e/vdb_merger.cc
+++ b/paludis/repositories/e/vdb_merger.cc
@@ -271,7 +271,7 @@ void
VDBMerger::merge()
{
display_override(">>> Merging to " + stringify(_imp->params.root()));
- _imp->contents_file.reset(new SafeOFStream(_imp->params.contents_file()));
+ _imp->contents_file = std::make_shared<SafeOFStream>(_imp->params.contents_file());
Merger::merge();
}
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 0408d8527..c4be41688 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -590,7 +590,7 @@ VDBRepository::provided_packages() const
load_provided_the_slow_way();
}
- _imp->provides.reset(new RepositoryProvidesInterface::ProvidesSequence);
+ _imp->provides = std::make_shared<RepositoryProvidesInterface::ProvidesSequence>();
for (ProvidesMap::const_iterator it(_imp->provides_map->begin()),
it_end(_imp->provides_map->end()); it_end != it; ++it)
{
@@ -655,7 +655,7 @@ VDBRepository::load_provided_using_cache() const
return false;
}
- _imp->provides_map.reset(new ProvidesMap);
+ _imp->provides_map = std::make_shared<ProvidesMap>();
std::string line;
while (std::getline(provides_cache, line))
@@ -763,7 +763,7 @@ VDBRepository::load_provided_the_slow_way() const
Context context("When loading VDB PROVIDEs map the slow way:");
Log::get_instance()->message("e.vdb.provides.starting", ll_debug, lc_no_context) << "Starting VDB PROVIDEs map creation";
- _imp->provides_map.reset(new ProvidesMap);
+ _imp->provides_map = std::make_shared<ProvidesMap>();
need_category_names();
std::for_each(_imp->categories.begin(), _imp->categories.end(),
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index def11e764..ab369008a 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -340,7 +340,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- keys.reset(new 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");
@@ -470,7 +470,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- keys.reset(new 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");
@@ -622,7 +622,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo);
- keys.reset(new Map<std::string, std::string>);
+ keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
keys->insert("names_cache", stringify(names_cache.dirname()));
keys->insert("provides_cache", "/var/empty");
@@ -856,7 +856,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>);
- keys.reset(new 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", stringify(provides_cache));
@@ -985,7 +985,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo1);
- keys.reset(new 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_src2"));
@@ -1001,7 +1001,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(2, repo2);
- keys.reset(new 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", stringify(provides_cache));
@@ -1180,7 +1180,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo1);
- keys.reset(new 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_src2"));
@@ -1196,7 +1196,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(2, repo2);
- keys.reset(new 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");
@@ -1311,7 +1311,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(1, repo1);
- keys.reset(new 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/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc
index b6ed26399..b02c7111e 100644
--- a/paludis/repositories/e/vdb_unmerger_TEST.cc
+++ b/paludis/repositories/e/vdb_unmerger_TEST.cc
@@ -121,7 +121,7 @@ namespace
repo = VDBRepository::repository_factory_create(&env, std::bind(from_keys, keys, std::placeholders::_1));
env.package_database()->add_repository(0, repo);
- unmerger.reset(new VDBUnmergerNoDisplay(make_named_values<VDBUnmergerOptions>(
+ unmerger = std::make_shared<VDBUnmergerNoDisplay>(make_named_values<VDBUnmergerOptions>(
n::config_protect() = "/protected_file /protected_dir",
n::config_protect_mask() = "/protected_dir/unprotected_file /protected_dir/unprotected_dir",
n::environment() = &env,
@@ -131,7 +131,7 @@ namespace
parse_user_package_dep_spec("cat/" + fix(what), &env, UserPackageDepSpecOptions()),
MatchPackageOptions()))]->begin(),
n::root() = root_dir
- )));
+ ));
main_run();
}
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index f70efeb6c..57e71c2ff 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -203,7 +203,7 @@ FakeMetadataKeywordSetKey::FakeMetadataKeywordSetKey(const std::string & r,
void
FakeMetadataKeywordSetKey::set_from_string(const std::string & s)
{
- _imp->collection.reset(new KeywordNameSet);
+ _imp->collection = std::make_shared<KeywordNameSet>();
tokenise_whitespace(s, create_inserter<KeywordName>(_imp->collection->inserter()));
}
@@ -996,49 +996,49 @@ FakePackageID::need_keys_added() const
{
using namespace std::placeholders;
- _imp->build_dependencies.reset(new FakeMetadataSpecTreeKey<DependencySpecTree>("DEPEND", "Build dependencies",
+ _imp->build_dependencies = std::make_shared<FakeMetadataSpecTreeKey<DependencySpecTree>>("DEPEND", "Build dependencies",
"", std::bind(&parse_depend, _1, _imp->env,
shared_from_this()),
- _imp->build_dependencies_labels, mkt_dependencies));
+ _imp->build_dependencies_labels, mkt_dependencies);
- _imp->run_dependencies.reset(new FakeMetadataSpecTreeKey<DependencySpecTree>("RDEPEND", "Run dependencies",
+ _imp->run_dependencies = std::make_shared<FakeMetadataSpecTreeKey<DependencySpecTree>>("RDEPEND", "Run dependencies",
"", std::bind(&parse_depend, _1, _imp->env,
shared_from_this()),
- _imp->run_dependencies_labels, mkt_dependencies)),
+ _imp->run_dependencies_labels, mkt_dependencies);
- _imp->post_dependencies.reset(new FakeMetadataSpecTreeKey<DependencySpecTree>("PDEPEND", "Post dependencies",
+ _imp->post_dependencies = std::make_shared<FakeMetadataSpecTreeKey<DependencySpecTree>>("PDEPEND", "Post dependencies",
"", std::bind(&parse_depend, _1, _imp->env,
shared_from_this()),
- _imp->post_dependencies_labels, mkt_dependencies)),
+ _imp->post_dependencies_labels, mkt_dependencies);
- _imp->suggested_dependencies.reset(new FakeMetadataSpecTreeKey<DependencySpecTree>("SDEPEND", "Suggested dependencies",
+ _imp->suggested_dependencies = std::make_shared<FakeMetadataSpecTreeKey<DependencySpecTree>>("SDEPEND", "Suggested dependencies",
"", std::bind(&parse_depend, _1, _imp->env,
shared_from_this()),
- _imp->suggested_dependencies_labels, mkt_dependencies)),
+ _imp->suggested_dependencies_labels, mkt_dependencies);
- _imp->src_uri.reset(new FakeMetadataSpecTreeKey<FetchableURISpecTree>("SRC_URI", "Source URI",
+ _imp->src_uri = std::make_shared<FakeMetadataSpecTreeKey<FetchableURISpecTree>>("SRC_URI", "Source URI",
"", std::bind(&parse_fetchable_uri, _1, _imp->env,
- shared_from_this()), mkt_normal));
+ shared_from_this()), mkt_normal);
- _imp->homepage.reset(new FakeMetadataSpecTreeKey<SimpleURISpecTree>("HOMEPAGE", "Homepage",
+ _imp->homepage = std::make_shared<FakeMetadataSpecTreeKey<SimpleURISpecTree>>("HOMEPAGE", "Homepage",
"", std::bind(&parse_simple_uri, _1, _imp->env,
- shared_from_this()), mkt_normal));
+ shared_from_this()), mkt_normal);
- _imp->license.reset(new FakeMetadataSpecTreeKey<LicenseSpecTree>("LICENSE", "License",
+ _imp->license = std::make_shared<FakeMetadataSpecTreeKey<LicenseSpecTree>>("LICENSE", "License",
"", std::bind(&parse_license, _1, _imp->env,
- shared_from_this()), mkt_normal));
+ shared_from_this()), mkt_normal);
- _imp->provide.reset(new FakeMetadataSpecTreeKey<ProvideSpecTree>("PROVIDE", "Provide",
+ _imp->provide = std::make_shared<FakeMetadataSpecTreeKey<ProvideSpecTree>>("PROVIDE", "Provide",
"", std::bind(&parse_provide, _1, _imp->env,
- shared_from_this()), mkt_normal));
+ shared_from_this()), mkt_normal);
- _imp->choices.reset(new FakeMetadataChoicesKey(_imp->env, shared_from_this()));
+ _imp->choices = std::make_shared<FakeMetadataChoicesKey>(_imp->env, shared_from_this());
- _imp->behaviours.reset(new LiteralMetadataStringSetKey("BEHAVIOURS", "Behaviours",
- mkt_internal, _imp->behaviours_set));
+ _imp->behaviours = std::make_shared<LiteralMetadataStringSetKey>("BEHAVIOURS", "Behaviours",
+ mkt_internal, _imp->behaviours_set);
- _imp->hitchhiker.reset(new FakeMetadataValueKey<long>("HITCHHIKER", "Hitchhiker",
- mkt_internal, 42));
+ _imp->hitchhiker = std::make_shared<FakeMetadataValueKey<long>>("HITCHHIKER", "Hitchhiker",
+ mkt_internal, 42);
add_metadata_key(_imp->slot);
add_metadata_key(_imp->build_dependencies);
@@ -1190,7 +1190,7 @@ void
FakePackageID::make_unsupported()
{
invalidate_masks();
- _imp->unsupported_mask.reset(new FakeUnsupportedMask);
+ _imp->unsupported_mask = std::make_shared<FakeUnsupportedMask>();
}
namespace
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index 961a01cde..f57d40cb8 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -206,20 +206,20 @@ namespace
{
std::string summary(required_text_only_key(n, "summary"));
if (! summary.empty())
- _imp->summary_key.reset(new LiteralMetadataValueKey<std::string> ("summary", "Summary", mkt_significant, summary));
+ _imp->summary_key = std::make_shared<LiteralMetadataValueKey<std::string> >("summary", "Summary", mkt_significant, summary);
std::string description(optional_text_only_key(n, "description"));
if (! description.empty())
- _imp->description_key.reset(new LiteralMetadataValueKey<std::string> ("description", "Description", mkt_normal, description));
+ _imp->description_key = std::make_shared<LiteralMetadataValueKey<std::string> >("description", "Description", mkt_normal, description);
std::string authors(optional_text_sequence_key(n, "authors"));
if (! authors.empty())
- _imp->authors_key.reset(new LiteralMetadataValueKey<std::string> ("authors", "Authors", mkt_normal, authors));
+ _imp->authors_key = std::make_shared<LiteralMetadataValueKey<std::string> >("authors", "Authors", mkt_normal, authors);
std::string rubyforge_project(optional_text_sequence_key(n, "rubyforge_project"));
if (! rubyforge_project.empty())
- _imp->rubyforge_project_key.reset(new LiteralMetadataValueKey<std::string> ("rubyforge_project", "Rubyforge Project",
- mkt_normal, rubyforge_project));
+ _imp->rubyforge_project_key = std::make_shared<LiteralMetadataValueKey<std::string> >("rubyforge_project", "Rubyforge Project",
+ mkt_normal, rubyforge_project);
_imp->date = required_text_only_key(n, "date");
_imp->platform = required_text_only_key(n, "platform");
@@ -272,10 +272,10 @@ GemSpecification::GemSpecification(const Environment * const e, const std::share
{
_imp->name_part = stringify(q);
_imp->version = stringify(v);
- _imp->load_from_file.reset(new FSEntry(f));
- _imp->fs_location_key.reset(new LiteralMetadataValueKey<FSEntry> ("GEM", "Gem Location", mkt_internal, f));
+ _imp->load_from_file = std::make_shared<FSEntry>(f);
+ _imp->fs_location_key = std::make_shared<LiteralMetadataValueKey<FSEntry> >("GEM", "Gem Location", mkt_internal, f);
add_metadata_key(_imp->fs_location_key);
- _imp->slot_key.reset(new LiteralMetadataValueKey<SlotName>("SLOT", "Slot", mkt_internal, SlotName(stringify(v))));
+ _imp->slot_key = std::make_shared<LiteralMetadataValueKey<SlotName>>("SLOT", "Slot", mkt_internal, SlotName(stringify(v)));
add_metadata_key(_imp->slot_key);
}
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc
index 7d7cee7e6..1ef780479 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_store.cc
@@ -125,17 +125,17 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
std::shared_ptr<MetadataValueKey<std::string> > repository_homepage, repository_description,
repository_format, repository_sync;
if (! file.homepage().empty())
- repository_homepage.reset(new LiteralMetadataValueKey<std::string>(
- "REPOSITORY_HOMEPAGE", "Repository homepage", mkt_normal, file.homepage()));
+ repository_homepage = std::make_shared<LiteralMetadataValueKey<std::string>>(
+ "REPOSITORY_HOMEPAGE", "Repository homepage", mkt_normal, file.homepage());
if (! file.description().empty())
- repository_description.reset(new LiteralMetadataValueKey<std::string>(
- "REPOSITORY_DESCRIPTION", "Repository description", mkt_normal, file.description()));
+ repository_description = std::make_shared<LiteralMetadataValueKey<std::string>>(
+ "REPOSITORY_DESCRIPTION", "Repository description", mkt_normal, file.description());
if (! file.repo_format().empty())
- repository_format.reset(new LiteralMetadataValueKey<std::string>(
- "REPOSITORY_FORMAT", "Repository format", mkt_normal, file.repo_format()));
+ repository_format = std::make_shared<LiteralMetadataValueKey<std::string>>(
+ "REPOSITORY_FORMAT", "Repository format", mkt_normal, file.repo_format());
if (! file.sync().empty())
- repository_sync.reset(new LiteralMetadataValueKey<std::string>(
- "REPOSITORY_SYNC", "Repository sync", mkt_normal, file.sync()));
+ repository_sync = std::make_shared<LiteralMetadataValueKey<std::string>>(
+ "REPOSITORY_SYNC", "Repository sync", mkt_normal, file.sync());
{
std::shared_ptr<Mask> mask(new UnavailableMask);
@@ -194,8 +194,8 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
const std::shared_ptr<NoConfigurationInformationMask> no_configuration_mask(new NoConfigurationInformationMask);
std::shared_ptr<UnavailableRepositoryDependenciesKey> deps;
if (! file.dependencies().empty())
- deps.reset(new UnavailableRepositoryDependenciesKey(env, "dependencies", "Dependencies", mkt_dependencies,
- file.dependencies()));
+ deps = std::make_shared<UnavailableRepositoryDependenciesKey>(env, "dependencies", "Dependencies", mkt_dependencies,
+ file.dependencies());
const std::shared_ptr<UnavailableRepositoryID> id(new UnavailableRepositoryID(
make_named_values<UnavailableRepositoryIDParams>(
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 1b0be76b6..c3dd4e4bc 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -130,7 +130,7 @@ namespace
return _v;
using namespace std::placeholders;
- _v.reset(new Contents);
+ _v = std::make_shared<Contents>();
_db->parse_contents(*_id,
std::bind(&Contents::add, _v.get(), std::placeholders::_1),
std::bind(&Contents::add, _v.get(), std::placeholders::_1),
@@ -217,8 +217,8 @@ namespace
Context context("When reading '" + stringify(_f) + "' as an InstalledUnpackagedStringKey:");
SafeIFStream f(_f);
- _v.reset(new std::string(
- strip_trailing(std::string((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>()), "\n")));
+ _v = std::make_shared<std::string>(
+ strip_trailing(std::string((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>()), "\n"));
return *_v;
}
@@ -269,7 +269,7 @@ namespace
if (_v)
return _v;
- _v.reset(new Set<std::string>());
+ _v = std::make_shared<Set<std::string>>();
for (FSEntrySequence::ConstIterator a(_f.begin()), a_end(_f.end()) ;
a != a_end ; ++a)
{
@@ -437,29 +437,29 @@ namespace paludis
if ((l / "contents").exists())
{
- contents_key.reset(new InstalledUnpackagedContentsKey(id, d));
- installed_time_key.reset(new InstalledUnpackagedTimeKey(l / "contents"));
+ contents_key = std::make_shared<InstalledUnpackagedContentsKey>(id, d);
+ installed_time_key = std::make_shared<InstalledUnpackagedTimeKey>(l / "contents");
}
- from_repositories_key.reset(new InstalledUnpackagedStringSetKey("source_repository",
- "Source repository", mkt_normal));
+ from_repositories_key = std::make_shared<InstalledUnpackagedStringSetKey>("source_repository",
+ "Source repository", mkt_normal);
if ((l / "source_repository").exists())
from_repositories_key->add_source(l / "source_repository");
if ((l / "binary_repository").exists())
from_repositories_key->add_source(l / "binary_repository");
if ((l / "description").exists())
- description_key.reset(new InstalledUnpackagedStringKey("description", "Description", l / "description", mkt_significant));
+ description_key = std::make_shared<InstalledUnpackagedStringKey>("description", "Description", l / "description", mkt_significant);
if ((l / "build_dependencies").exists())
- build_dependencies_key.reset(new InstalledUnpackagedDependencyKey(env,
+ build_dependencies_key = std::make_shared<InstalledUnpackagedDependencyKey>(env,
"build_dependencies", "Build dependencies", l / "build_dependencies",
- build_dependencies_labels, mkt_dependencies));
+ build_dependencies_labels, mkt_dependencies);
if ((l / "run_dependencies").exists())
- run_dependencies_key.reset(new InstalledUnpackagedDependencyKey(env,
+ run_dependencies_key = std::make_shared<InstalledUnpackagedDependencyKey>(env,
"run_dependencies", "Run dependencies", l / "run_dependencies",
- run_dependencies_labels, mkt_dependencies));
+ run_dependencies_labels, mkt_dependencies);
}
};
}
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 42c7d9ce5..7568cbdca 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -128,8 +128,8 @@ InstalledUnpackagedRepository::package_ids(const QualifiedPackageName & q) const
{
Lock l(*(*e).mutex());
if (! (*e).package_id())
- (*e).package_id().reset(new InstalledUnpackagedID(_imp->params.environment(), (*e).name(), (*e).version(),
- (*e).slot(), name(), (*e).fs_location(), (*e).magic(), installed_root_key()->value(), &_imp->ndbam));
+ (*e).package_id() = std::make_shared<InstalledUnpackagedID>(_imp->params.environment(), (*e).name(), (*e).version(),
+ (*e).slot(), name(), (*e).fs_location(), (*e).magic(), installed_root_key()->value(), &_imp->ndbam);
result->push_back((*e).package_id());
}
diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc
index 7a4fe4628..bd107fb59 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.cc
+++ b/paludis/repositories/unpackaged/unpackaged_key.cc
@@ -161,7 +161,7 @@ UnpackagedChoicesKey::value() const
Lock lock(_imp->mutex);
if (! _imp->value)
{
- _imp->value.reset(new Choices);
+ _imp->value = std::make_shared<Choices>();
std::shared_ptr<Choice> build_options(new Choice(make_named_values<ChoiceParams>(
n::consider_added_or_changed() = false,
n::contains_every_value() = false,
diff --git a/paludis/repositories/unwritten/unwritten_repository_file.cc b/paludis/repositories/unwritten/unwritten_repository_file.cc
index 5b19e37c2..16bca88f3 100644
--- a/paludis/repositories/unwritten/unwritten_repository_file.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_file.cc
@@ -253,7 +253,7 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
(+simple_parser::any_of(" \t"))
))
{
- slot.reset(new LiteralMetadataValueKey<SlotName>("SLOT", "Slot", mkt_internal, SlotName(token)));
+ slot = std::make_shared<LiteralMetadataValueKey<SlotName>>("SLOT", "Slot", mkt_internal, SlotName(token));
if (line_parser.consume(
(+simple_parser::any_except(" \t") >> token)
@@ -287,7 +287,7 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
"Cannot parse body key = value line '" + line + " in '" + stringify(f) + "'");
if (! entry)
- entry.reset(new UnwrittenRepositoryFileEntry(make_named_values<UnwrittenRepositoryFileEntry>(
+ entry = std::make_shared<UnwrittenRepositoryFileEntry>(make_named_values<UnwrittenRepositoryFileEntry>(
n::added_by() = std::shared_ptr<const MetadataValueKey<std::string> >(),
n::bug_ids() = std::shared_ptr<const MetadataCollectionKey<Sequence<std::string> > >(),
n::comment() = std::shared_ptr<const MetadataValueKey<std::string> >(),
@@ -297,10 +297,10 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
n::remote_ids() = std::shared_ptr<const MetadataCollectionKey<Sequence<std::string> > >(),
n::slot() = slot,
n::version() = version
- )));
+ ));
if (token == "description")
- entry->description().reset(new LiteralMetadataValueKey<std::string>("description", "Description", mkt_significant, token2));
+ 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);
@@ -310,12 +310,12 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
tree->root()->append(std::make_shared<SimpleURIDepSpec>(*t));
- entry->homepage().reset(new UnwrittenHomepageKey("homepage", "Homepage", mkt_normal, tree));
+ entry->homepage() = std::make_shared<UnwrittenHomepageKey>("homepage", "Homepage", mkt_normal, tree);
}
else if (token == "comment")
- entry->comment().reset(new LiteralMetadataValueKey<std::string>("comment", "Comment", mkt_normal, token2));
+ entry->comment() = std::make_shared<LiteralMetadataValueKey<std::string>>("comment", "Comment", mkt_normal, token2);
else if (token == "added-by")
- entry->added_by().reset(new LiteralMetadataValueKey<std::string>("added-by", "Added by", mkt_author, token2));
+ 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>);
@@ -324,7 +324,7 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
seq->push_back(*t);
- entry->bug_ids().reset(new LiteralMetadataStringSequenceKey("bug-ids", "Bug IDs", mkt_normal, seq));
+ entry->bug_ids() = std::make_shared<LiteralMetadataStringSequenceKey>("bug-ids", "Bug IDs", mkt_normal, seq);
}
else if (token == "remote-ids")
{
@@ -334,7 +334,7 @@ UnwrittenRepositoryFile::_load(const FSEntry & f)
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
seq->push_back(*t);
- entry->remote_ids().reset(new LiteralMetadataStringSequenceKey("remote-ids", "Remote IDs", mkt_internal, seq));
+ entry->remote_ids() = std::make_shared<LiteralMetadataStringSequenceKey>("remote-ids", "Remote IDs", mkt_internal, seq);
}
else
Log::get_instance()->message("unwritten_repository.file.unknown_key", ll_warning, lc_context)