aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
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/e
parent8ea8866114c450dec08322c57f8002b29eee19d3 (diff)
downloadpaludis-c3802f0aec7d89a518cf74145aa73bf2ea688e35.tar.gz
paludis-c3802f0aec7d89a518cf74145aa73bf2ea688e35.tar.xz
Avoid sptr.reset(new ...)
Diffstat (limited to 'paludis/repositories/e')
-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
19 files changed, 176 insertions, 176 deletions
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();
}