aboutsummaryrefslogtreecommitdiff
path: root/src/clients
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 12:52:10 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 18:55:26 +0100
commitf7be9952e67a5cdad6f3531a22654db198e7d106 (patch)
tree54c8fae2eaaf89851c038d28ed6deb9096c87b4d /src/clients
parent84f32a46c9bd03039af31be9626206ce891fa841 (diff)
downloadpaludis-f7be9952e67a5cdad6f3531a22654db198e7d106.tar.gz
paludis-f7be9952e67a5cdad6f3531a22654db198e7d106.tar.xz
Use std::make_shared<>
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/accerso/accerso.cc3
-rw-r--r--src/clients/adjutrix/downgrade_check.cc5
-rw-r--r--src/clients/appareo/appareo.cc3
-rw-r--r--src/clients/cave/cmd_config.cc3
-rw-r--r--src/clients/cave/cmd_contents.cc3
-rw-r--r--src/clients/cave/cmd_display_resolution.cc7
-rw-r--r--src/clients/cave/cmd_executables.cc3
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc12
-rw-r--r--src/clients/cave/cmd_find_candidates.cc5
-rw-r--r--src/clients/cave/cmd_fix_cache.cc3
-rw-r--r--src/clients/cave/cmd_fix_linkage.cc6
-rw-r--r--src/clients/cave/cmd_help.cc5
-rw-r--r--src/clients/cave/cmd_import.cc3
-rw-r--r--src/clients/cave/cmd_info.cc3
-rw-r--r--src/clients/cave/cmd_match.cc3
-rw-r--r--src/clients/cave/cmd_owner.cc3
-rw-r--r--src/clients/cave/cmd_perform.cc7
-rw-r--r--src/clients/cave/cmd_print_categories.cc3
-rw-r--r--src/clients/cave/cmd_print_commands.cc5
-rw-r--r--src/clients/cave/cmd_print_environment_metadata.cc5
-rw-r--r--src/clients/cave/cmd_print_id_actions.cc3
-rw-r--r--src/clients/cave/cmd_print_id_contents.cc5
-rw-r--r--src/clients/cave/cmd_print_id_executables.cc3
-rw-r--r--src/clients/cave/cmd_print_id_masks.cc4
-rw-r--r--src/clients/cave/cmd_print_id_metadata.cc5
-rw-r--r--src/clients/cave/cmd_print_ids.cc5
-rw-r--r--src/clients/cave/cmd_print_owners.cc3
-rw-r--r--src/clients/cave/cmd_print_packages.cc3
-rw-r--r--src/clients/cave/cmd_print_repositories.cc3
-rw-r--r--src/clients/cave/cmd_print_repository_formats.cc3
-rw-r--r--src/clients/cave/cmd_print_repository_metadata.cc3
-rw-r--r--src/clients/cave/cmd_print_set.cc3
-rw-r--r--src/clients/cave/cmd_print_sets.cc3
-rw-r--r--src/clients/cave/cmd_print_sync_protocols.cc4
-rw-r--r--src/clients/cave/cmd_purge.cc12
-rw-r--r--src/clients/cave/cmd_resolve.cc5
-rw-r--r--src/clients/cave/cmd_resume.cc11
-rw-r--r--src/clients/cave/cmd_search.cc3
-rw-r--r--src/clients/cave/cmd_show.cc4
-rw-r--r--src/clients/cave/cmd_sync.cc3
-rw-r--r--src/clients/cave/cmd_uninstall.cc12
-rw-r--r--src/clients/cave/cmd_update_world.cc3
-rw-r--r--src/clients/cave/cmd_verify.cc3
-rw-r--r--src/clients/cave/command_factory.cc5
-rw-r--r--src/clients/cave/executables_common.cc1
-rw-r--r--src/clients/cave/owner_common.cc1
-rw-r--r--src/clients/cave/resolve_common.cc36
-rw-r--r--src/clients/inquisitio/do_search.cc7
-rw-r--r--src/clients/paludis/query.cc6
-rw-r--r--src/clients/reconcilio/fix_linkage.cc3
50 files changed, 107 insertions, 148 deletions
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index a1d10f72d..baac1b759 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -30,7 +30,6 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/pretty_print.hh>
#include <paludis/util/return_literal_function.hh>
#include <paludis/standard_output_manager.hh>
@@ -144,7 +143,7 @@ main(int argc, char *argv[])
OutputManagerFromEnvironment output_manager_holder(&env, *i, oe_exclusive, ClientOutputFeatures());
FetchAction a(make_named_values<FetchActionOptions>(
- n::errors() = make_shared_ptr(new Sequence<FetchActionFailure>),
+ n::errors() = std::make_shared<Sequence<FetchActionFailure>>(),
n::exclude_unmirrorable() = true,
n::fetch_parts() = FetchParts() + fp_regulars + fp_unneeded,
n::ignore_not_in_manifest() = false,
diff --git a/src/clients/adjutrix/downgrade_check.cc b/src/clients/adjutrix/downgrade_check.cc
index 836cd01ab..46b87afc2 100644
--- a/src/clients/adjutrix/downgrade_check.cc
+++ b/src/clients/adjutrix/downgrade_check.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -24,7 +24,6 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/iterator_funcs.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/named_value.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/safe_ofstream.hh>
@@ -117,7 +116,7 @@ namespace
PartiallyMadePackageDepSpec part_spec((PartiallyMadePackageDepSpecOptions()));
part_spec.package(b->first.first);
if ("(none)" != b->first.second)
- part_spec.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(SlotName(b->first.second))));
+ part_spec.slot_requirement(std::make_shared<UserSlotExactRequirement>(SlotName(b->first.second)));
if (! env[selection::SomeArbitraryVersion(generator::Matches(part_spec, MatchPackageOptions()))]->empty())
{
results.insert(std::make_pair(b->first, stringify(b->second) + " -> nothing on " + desc));
diff --git a/src/clients/appareo/appareo.cc b/src/clients/appareo/appareo.cc
index a4bea0827..e3b6b0a4b 100644
--- a/src/clients/appareo/appareo.cc
+++ b/src/clients/appareo/appareo.cc
@@ -31,7 +31,6 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/return_literal_function.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/standard_output_manager.hh>
@@ -57,7 +56,7 @@ namespace
{
std::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
{
- return make_shared_ptr(new StandardOutputManager);
+ return std::make_shared<StandardOutputManager>();
}
FSEntry get_location_and_add_filters()
diff --git a/src/clients/cave/cmd_config.cc b/src/clients/cave/cmd_config.cc
index ae0fa2f72..f004bf33d 100644
--- a/src/clients/cave/cmd_config.cc
+++ b/src/clients/cave/cmd_config.cc
@@ -22,7 +22,6 @@
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
@@ -116,6 +115,6 @@ ConfigCommand::run(
std::shared_ptr<args::ArgsHandler>
ConfigCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ConfigCommandLine);
+ return std::make_shared<ConfigCommandLine>();
}
diff --git a/src/clients/cave/cmd_contents.cc b/src/clients/cave/cmd_contents.cc
index 48b1884c8..334e1db48 100644
--- a/src/clients/cave/cmd_contents.cc
+++ b/src/clients/cave/cmd_contents.cc
@@ -27,7 +27,6 @@
#include <paludis/contents.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
@@ -149,6 +148,6 @@ ContentsCommand::run(
std::shared_ptr<args::ArgsHandler>
ContentsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ContentsCommandLine);
+ return std::make_shared<ContentsCommandLine>();
}
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 4312b16c3..fa20f97ea 100644
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -25,7 +25,6 @@
#include "colour_formatter.hh"
#include "match_qpns.hh"
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/system.hh>
#include <paludis/util/destringify.hh>
@@ -40,6 +39,7 @@
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/log.hh>
#include <paludis/util/pretty_print.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/sanitised_dependencies.hh>
@@ -608,8 +608,7 @@ namespace
if (show_description)
choices_to_explain.insert(std::make_pair((*k)->human_name(),
ChoiceValuesToExplain())).first->second.insert(std::make_pair(
- (*i)->name_with_prefix(), make_shared_ptr(
- new PackageIDSequence))).first->second->push_back(id);
+ (*i)->name_with_prefix(), std::make_shared<PackageIDSequence>())).first->second->push_back(id);
}
}
@@ -1561,6 +1560,6 @@ DisplayResolutionCommand::run(
std::shared_ptr<args::ArgsHandler>
DisplayResolutionCommand::make_doc_cmdline()
{
- return make_shared_ptr(new DisplayResolutionCommandLine);
+ return std::make_shared<DisplayResolutionCommandLine>();
}
diff --git a/src/clients/cave/cmd_executables.cc b/src/clients/cave/cmd_executables.cc
index ad8bbedf7..87941ce10 100644
--- a/src/clients/cave/cmd_executables.cc
+++ b/src/clients/cave/cmd_executables.cc
@@ -28,7 +28,6 @@
#include <paludis/args/do_help.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/system.hh>
#include <paludis/util/tokeniser.hh>
@@ -99,6 +98,6 @@ ExecutablesCommand::run(
std::shared_ptr<args::ArgsHandler>
ExecutablesCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ExecutablesCommandLine);
+ return std::make_shared<ExecutablesCommandLine>();
}
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index f22035f75..935339e95 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -27,7 +27,6 @@
#include "resume_data.hh"
#include <paludis/args/do_help.hh>
#include <paludis/args/escape.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
#include <paludis/util/system.hh>
@@ -47,6 +46,7 @@
#include <paludis/util/executor.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/timestamp.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/sanitised_dependencies.hh>
@@ -1207,7 +1207,7 @@ namespace
else if (! already_done)
{
Lock lock(job_mutex);
- job->set_state(make_shared_ptr(new JobSkippedState));
+ job->set_state(std::make_shared<JobSkippedState>());
}
}
@@ -1323,8 +1323,8 @@ namespace
for (JobList<ExecuteJob>::ConstIterator c(lists->execute_job_list()->begin()),
c_end(lists->execute_job_list()->end()) ;
c != c_end ; ++c)
- executor.add(make_shared_ptr(new ExecuteJobExecutive(env, cmdline, *c, lists, require_if, retcode_mutex,
- retcode, counts, old_heading)));
+ executor.add(std::make_shared<ExecuteJobExecutive>(env, cmdline, *c, lists, require_if, retcode_mutex,
+ retcode, counts, old_heading));
executor.execute();
@@ -1345,7 +1345,7 @@ namespace
c_end(lists->execute_job_list()->end()) ;
c != c_end ; ++c)
if (! (*c)->state())
- (*c)->set_state(make_shared_ptr(new JobPendingState));
+ (*c)->set_state(std::make_shared<JobPendingState>());
int retcode(0);
@@ -1627,6 +1627,6 @@ ExecuteResolutionCommand::run(
std::shared_ptr<args::ArgsHandler>
ExecuteResolutionCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ExecuteResolutionCommandLine);
+ return std::make_shared<ExecuteResolutionCommandLine>();
}
diff --git a/src/clients/cave/cmd_find_candidates.cc b/src/clients/cave/cmd_find_candidates.cc
index f5e5524a1..8f9af293c 100644
--- a/src/clients/cave/cmd_find_candidates.cc
+++ b/src/clients/cave/cmd_find_candidates.cc
@@ -27,7 +27,6 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/simple_visitor_cast.hh>
@@ -218,7 +217,7 @@ FindCandidatesCommand::run_hosted(
generator::Matches m(parse_user_package_dep_spec(*k, env.get(), UserPackageDepSpecOptions() + updso_allow_wildcards), MatchPackageOptions());
if (match_generator)
- match_generator = make_shared_ptr(new generator::Union(*match_generator, m));
+ match_generator = std::make_shared<generator::Union>(*match_generator, m);
else
match_generator = make_shared_copy(m);
}
@@ -241,6 +240,6 @@ FindCandidatesCommand::run_hosted(
std::shared_ptr<args::ArgsHandler>
FindCandidatesCommand::make_doc_cmdline()
{
- return make_shared_ptr(new FindCandidatesCommandLine);
+ return std::make_shared<FindCandidatesCommandLine>();
}
diff --git a/src/clients/cave/cmd_fix_cache.cc b/src/clients/cave/cmd_fix_cache.cc
index b50628a68..062de5edc 100644
--- a/src/clients/cave/cmd_fix_cache.cc
+++ b/src/clients/cave/cmd_fix_cache.cc
@@ -26,7 +26,6 @@
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
#include <paludis/repository.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <iostream>
@@ -152,5 +151,5 @@ FixCacheCommand::run(
std::shared_ptr<args::ArgsHandler>
FixCacheCommand::make_doc_cmdline()
{
- return make_shared_ptr(new FixCacheCommandLine);
+ return std::make_shared<FixCacheCommandLine>();
}
diff --git a/src/clients/cave/cmd_fix_linkage.cc b/src/clients/cave/cmd_fix_linkage.cc
index 03a7adf2f..6036246a3 100644
--- a/src/clients/cave/cmd_fix_linkage.cc
+++ b/src/clients/cave/cmd_fix_linkage.cc
@@ -23,10 +23,10 @@
#include "resolve_common.hh"
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/join.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/broken_linkage_finder.hh>
#include <paludis/package_id.hh>
#include <paludis/name.hh>
@@ -213,7 +213,7 @@ FixLinkageCommand::run(
PartiallyMadePackageDepSpec part_spec((PartiallyMadePackageDepSpecOptions()));
part_spec.package((*pkg_it)->name());
if ((*pkg_it)->slot_key())
- part_spec.slot_requirement(make_shared_ptr(new UserSlotExactRequirement((*pkg_it)->slot_key()->value())));
+ part_spec.slot_requirement(std::make_shared<UserSlotExactRequirement>((*pkg_it)->slot_key()->value()));
if (cmdline.a_exact.specified())
part_spec.version_requirement(make_named_values<VersionRequirement>(
@@ -254,6 +254,6 @@ FixLinkageCommand::run(
std::shared_ptr<args::ArgsHandler>
FixLinkageCommand::make_doc_cmdline()
{
- return make_shared_ptr(new FixLinkageCommandLine);
+ return std::make_shared<FixLinkageCommandLine>();
}
diff --git a/src/clients/cave/cmd_help.cc b/src/clients/cave/cmd_help.cc
index ba460a97f..baab367c5 100644
--- a/src/clients/cave/cmd_help.cc
+++ b/src/clients/cave/cmd_help.cc
@@ -25,7 +25,6 @@
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include "command_factory.hh"
#include "command_command_line.hh"
@@ -148,7 +147,7 @@ HelpCommand::run(const std::shared_ptr<Environment> & env,
}
else
{
- std::shared_ptr< Sequence<std::string> > help(make_shared_ptr(new Sequence<std::string>));
+ std::shared_ptr< Sequence<std::string> > help(std::make_shared<Sequence<std::string>>());
help->push_back("--help");
return CommandFactory::get_instance()->create(*cmdline.begin_parameters())->run(env, help);
@@ -160,6 +159,6 @@ HelpCommand::run(const std::shared_ptr<Environment> & env,
std::shared_ptr<args::ArgsHandler>
HelpCommand::make_doc_cmdline()
{
- return make_shared_ptr(new HelpCommandLine);
+ return std::make_shared<HelpCommandLine>();
}
diff --git a/src/clients/cave/cmd_import.cc b/src/clients/cave/cmd_import.cc
index aa4799dec..e8df8ef17 100644
--- a/src/clients/cave/cmd_import.cc
+++ b/src/clients/cave/cmd_import.cc
@@ -23,7 +23,6 @@
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
#include <paludis/util/iterator_funcs.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/join.hh>
#include <paludis/util/map.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -289,6 +288,6 @@ ImportCommand::run(
std::shared_ptr<args::ArgsHandler>
ImportCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ImportCommandLine);
+ return std::make_shared<ImportCommandLine>();
}
diff --git a/src/clients/cave/cmd_info.cc b/src/clients/cave/cmd_info.cc
index dbbeff16d..cabbca29d 100644
--- a/src/clients/cave/cmd_info.cc
+++ b/src/clients/cave/cmd_info.cc
@@ -38,7 +38,6 @@
#include <paludis/metadata_key.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/pretty_print.hh>
#include <paludis/util/timestamp.hh>
@@ -430,6 +429,6 @@ InfoCommand::run(
std::shared_ptr<args::ArgsHandler>
InfoCommand::make_doc_cmdline()
{
- return make_shared_ptr(new InfoCommandLine);
+ return std::make_shared<InfoCommandLine>();
}
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 05867daad..0153374cb 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -27,7 +27,6 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/iterator_funcs.hh>
@@ -427,6 +426,6 @@ MatchCommand::run_hosted(
std::shared_ptr<args::ArgsHandler>
MatchCommand::make_doc_cmdline()
{
- return make_shared_ptr(new MatchCommandLine);
+ return std::make_shared<MatchCommandLine>();
}
diff --git a/src/clients/cave/cmd_owner.cc b/src/clients/cave/cmd_owner.cc
index 7c032e315..15c9980cd 100644
--- a/src/clients/cave/cmd_owner.cc
+++ b/src/clients/cave/cmd_owner.cc
@@ -28,7 +28,6 @@
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/stringify.hh>
@@ -108,6 +107,6 @@ OwnerCommand::run(
std::shared_ptr<args::ArgsHandler>
OwnerCommand::make_doc_cmdline()
{
- return make_shared_ptr(new OwnerCommandLine);
+ return std::make_shared<OwnerCommandLine>();
}
diff --git a/src/clients/cave/cmd_perform.cc b/src/clients/cave/cmd_perform.cc
index 65f6af279..8722c2849 100644
--- a/src/clients/cave/cmd_perform.cc
+++ b/src/clients/cave/cmd_perform.cc
@@ -39,10 +39,10 @@
#include <paludis/ipc_output_manager.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/return_literal_function.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <cstdlib>
#include <iostream>
#include <algorithm>
@@ -460,7 +460,7 @@ PerformCommand::run(
OutputManagerFromIPCOrEnvironment output_manager_holder(env.get(), cmdline, id);
FetchActionOptions options(make_named_values<FetchActionOptions>(
- n::errors() = make_shared_ptr(new Sequence<FetchActionFailure>),
+ n::errors() = std::make_shared<Sequence<FetchActionFailure>>(),
n::exclude_unmirrorable() = cmdline.a_exclude_unmirrorable.specified(),
n::fetch_parts() = parts,
n::ignore_not_in_manifest() = false,
@@ -575,7 +575,6 @@ PerformCommand::run(
std::shared_ptr<args::ArgsHandler>
PerformCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PerformCommandLine);
+ return std::make_shared<PerformCommandLine>();
}
-
diff --git a/src/clients/cave/cmd_print_categories.cc b/src/clients/cave/cmd_print_categories.cc
index 445267f07..e8d24adbe 100644
--- a/src/clients/cave/cmd_print_categories.cc
+++ b/src/clients/cave/cmd_print_categories.cc
@@ -26,7 +26,6 @@
#include <paludis/repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <cstdlib>
#include <iostream>
#include <algorithm>
@@ -129,6 +128,6 @@ PrintCategoriesCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintCategoriesCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintCategoriesCommandLine);
+ return std::make_shared<PrintCategoriesCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_commands.cc b/src/clients/cave/cmd_print_commands.cc
index 46d899ee9..6fcf8ae31 100644
--- a/src/clients/cave/cmd_print_commands.cc
+++ b/src/clients/cave/cmd_print_commands.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -19,7 +19,6 @@
#include "cmd_print_commands.hh"
#include "command_factory.hh"
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/stringify.hh>
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
@@ -103,6 +102,6 @@ PrintCommandsCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintCommandsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintCommandsCommandLine);
+ return std::make_shared<PrintCommandsCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_environment_metadata.cc b/src/clients/cave/cmd_print_environment_metadata.cc
index a3e27512b..deab36767 100644
--- a/src/clients/cave/cmd_print_environment_metadata.cc
+++ b/src/clients/cave/cmd_print_environment_metadata.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,7 +22,6 @@
#include "exceptions.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/environment.hh>
@@ -140,6 +139,6 @@ PrintEnvironmentMetadataCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintEnvironmentMetadataCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintEnvironmentMetadataCommandLine);
+ return std::make_shared<PrintEnvironmentMetadataCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_id_actions.cc b/src/clients/cave/cmd_print_id_actions.cc
index c61927bfa..20be20a1d 100644
--- a/src/clients/cave/cmd_print_id_actions.cc
+++ b/src/clients/cave/cmd_print_id_actions.cc
@@ -21,7 +21,6 @@
#include "exceptions.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/stringify.hh>
@@ -130,6 +129,6 @@ PrintIDActionsCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintIDActionsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintIDActionsCommandLine);
+ return std::make_shared<PrintIDActionsCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_id_contents.cc b/src/clients/cave/cmd_print_id_contents.cc
index 1cc8f4368..c4b1e21f0 100644
--- a/src/clients/cave/cmd_print_id_contents.cc
+++ b/src/clients/cave/cmd_print_id_contents.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -26,7 +26,6 @@
#include <paludis/contents.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
@@ -137,6 +136,6 @@ PrintIDContentsCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintIDContentsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintContentsCommandLine);
+ return std::make_shared<PrintContentsCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_id_executables.cc b/src/clients/cave/cmd_print_id_executables.cc
index 670f68f02..9607d69b0 100644
--- a/src/clients/cave/cmd_print_id_executables.cc
+++ b/src/clients/cave/cmd_print_id_executables.cc
@@ -25,7 +25,6 @@
#include <paludis/args/do_help.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/system.hh>
#include <paludis/util/tokeniser.hh>
@@ -97,6 +96,6 @@ PrintIDExecutablesCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintIDExecutablesCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintIDExecutablesCommandLine);
+ return std::make_shared<PrintIDExecutablesCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_id_masks.cc b/src/clients/cave/cmd_print_id_masks.cc
index 4d401eef1..8123f214e 100644
--- a/src/clients/cave/cmd_print_id_masks.cc
+++ b/src/clients/cave/cmd_print_id_masks.cc
@@ -23,13 +23,13 @@
#include "format_string.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
#include <paludis/util/map.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/environment.hh>
#include <paludis/metadata_key.hh>
#include <paludis/user_dep_spec.hh>
@@ -208,6 +208,6 @@ PrintIDMasksCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintIDMasksCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintIDMasksCommandLine);
+ return std::make_shared<PrintIDMasksCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_id_metadata.cc b/src/clients/cave/cmd_print_id_metadata.cc
index aaa0c59d2..f9228395a 100644
--- a/src/clients/cave/cmd_print_id_metadata.cc
+++ b/src/clients/cave/cmd_print_id_metadata.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,7 +22,6 @@
#include "exceptions.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
@@ -168,6 +167,6 @@ PrintIDMetadataCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintIDMetadataCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintIDMetadataCommandLine);
+ return std::make_shared<PrintIDMetadataCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_ids.cc b/src/clients/cave/cmd_print_ids.cc
index 64201bbce..45be918d7 100644
--- a/src/clients/cave/cmd_print_ids.cc
+++ b/src/clients/cave/cmd_print_ids.cc
@@ -27,7 +27,6 @@
#include <paludis/repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
@@ -240,7 +239,7 @@ namespace
Filter
{
WithMaskFilter(const PrintIDsCommandLine & c, const std::string & f) :
- Filter(make_shared_ptr(new WithMaskFilterHandler(c, f)))
+ Filter(std::make_shared<WithMaskFilterHandler>(c, f))
{
}
};
@@ -342,6 +341,6 @@ PrintIDsCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintIDsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintIDsCommandLine);
+ return std::make_shared<PrintIDsCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_owners.cc b/src/clients/cave/cmd_print_owners.cc
index 33ebb779c..462439962 100644
--- a/src/clients/cave/cmd_print_owners.cc
+++ b/src/clients/cave/cmd_print_owners.cc
@@ -23,7 +23,6 @@
#include "owner_common.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <iostream>
#include <cstdlib>
@@ -99,6 +98,6 @@ PrintOwnersCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintOwnersCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintOwnersCommandLine);
+ return std::make_shared<PrintOwnersCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_packages.cc b/src/clients/cave/cmd_print_packages.cc
index 5f1cf583d..87f90a415 100644
--- a/src/clients/cave/cmd_print_packages.cc
+++ b/src/clients/cave/cmd_print_packages.cc
@@ -26,7 +26,6 @@
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
#include <paludis/repository.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/set.hh>
@@ -102,5 +101,5 @@ PrintPackagesCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintPackagesCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintPackagesCommandLine);
+ return std::make_shared<PrintPackagesCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_repositories.cc b/src/clients/cave/cmd_print_repositories.cc
index 862fb9467..841d0c997 100644
--- a/src/clients/cave/cmd_print_repositories.cc
+++ b/src/clients/cave/cmd_print_repositories.cc
@@ -24,7 +24,6 @@
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
#include <paludis/repository.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -122,5 +121,5 @@ PrintRepositoriesCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintRepositoriesCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintRepositoriesCommandLine);
+ return std::make_shared<PrintRepositoriesCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_repository_formats.cc b/src/clients/cave/cmd_print_repository_formats.cc
index faba2e7ed..5b89af6c3 100644
--- a/src/clients/cave/cmd_print_repository_formats.cc
+++ b/src/clients/cave/cmd_print_repository_formats.cc
@@ -22,7 +22,6 @@
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
#include <paludis/repository_factory.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -93,5 +92,5 @@ PrintRepositoryFormatsCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintRepositoryFormatsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintRepositoryFormatsCommandLine);
+ return std::make_shared<PrintRepositoryFormatsCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_repository_metadata.cc b/src/clients/cave/cmd_print_repository_metadata.cc
index 8eeecfc8c..3796ef941 100644
--- a/src/clients/cave/cmd_print_repository_metadata.cc
+++ b/src/clients/cave/cmd_print_repository_metadata.cc
@@ -22,7 +22,6 @@
#include "exceptions.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
@@ -146,6 +145,6 @@ PrintRepositoryMetadataCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintRepositoryMetadataCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintRepositoryMetadataCommandLine);
+ return std::make_shared<PrintRepositoryMetadataCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_set.cc b/src/clients/cave/cmd_print_set.cc
index b2c720942..c336811c3 100644
--- a/src/clients/cave/cmd_print_set.cc
+++ b/src/clients/cave/cmd_print_set.cc
@@ -29,7 +29,6 @@
#include <paludis/spec_tree.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/map.hh>
@@ -153,6 +152,6 @@ PrintSetCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintSetCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintSetCommandLine);
+ return std::make_shared<PrintSetCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_sets.cc b/src/clients/cave/cmd_print_sets.cc
index 7ade5213b..0df75faf1 100644
--- a/src/clients/cave/cmd_print_sets.cc
+++ b/src/clients/cave/cmd_print_sets.cc
@@ -25,7 +25,6 @@
#include <paludis/package_database.hh>
#include <paludis/repository.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
@@ -89,5 +88,5 @@ PrintSetsCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintSetsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintSetsCommandLine);
+ return std::make_shared<PrintSetsCommandLine>();
}
diff --git a/src/clients/cave/cmd_print_sync_protocols.cc b/src/clients/cave/cmd_print_sync_protocols.cc
index 89c8fcaee..9c2f4ed89 100644
--- a/src/clients/cave/cmd_print_sync_protocols.cc
+++ b/src/clients/cave/cmd_print_sync_protocols.cc
@@ -26,7 +26,6 @@
#include <paludis/repository.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fs_entry.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <cstdlib>
#include <iostream>
@@ -113,5 +112,6 @@ PrintSyncProtocolsCommand::run(
std::shared_ptr<args::ArgsHandler>
PrintSyncProtocolsCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PrintSyncProtocolsCommandLine);
+ return std::make_shared<PrintSyncProtocolsCommandLine>();
}
+
diff --git a/src/clients/cave/cmd_purge.cc b/src/clients/cave/cmd_purge.cc
index deee0a55d..2729ff3e6 100644
--- a/src/clients/cave/cmd_purge.cc
+++ b/src/clients/cave/cmd_purge.cc
@@ -22,8 +22,8 @@
#include "resolve_common.hh"
#include "exceptions.hh"
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
@@ -53,10 +53,10 @@ namespace
std::shared_ptr<ResolveCommandLineProgramOptions> program_options;
PurgeCommandLine(const bool for_docs) :
- resolution_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineResolutionOptions(this))),
- execution_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineExecutionOptions(this))),
- display_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineDisplayOptions(this))),
- program_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineProgramOptions(this)))
+ resolution_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineResolutionOptions>(this)),
+ execution_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineExecutionOptions>(this)),
+ display_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineDisplayOptions>(this)),
+ program_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineProgramOptions>(this))
{
add_usage_line("[ -x|--execute ]");
add_note("All options available for 'cave resolve' are also permitted. See 'man cave-resolve' for details.");
@@ -114,6 +114,6 @@ PurgeCommand::run(
std::shared_ptr<args::ArgsHandler>
PurgeCommand::make_doc_cmdline()
{
- return make_shared_ptr(new PurgeCommandLine(true));
+ return std::make_shared<PurgeCommandLine>(true);
}
diff --git a/src/clients/cave/cmd_resolve.cc b/src/clients/cave/cmd_resolve.cc
index eb714ec2d..1b7a82b38 100644
--- a/src/clients/cave/cmd_resolve.cc
+++ b/src/clients/cave/cmd_resolve.cc
@@ -20,8 +20,7 @@
#include "cmd_resolve.hh"
#include "cmd_resolve_cmdline.hh"
#include "resolve_common.hh"
-
-#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <iostream>
#include <cstdlib>
@@ -109,6 +108,6 @@ ResolveCommand::run(
std::shared_ptr<args::ArgsHandler>
ResolveCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ResolveCommandLine);
+ return std::make_shared<ResolveCommandLine>();
}
diff --git a/src/clients/cave/cmd_resume.cc b/src/clients/cave/cmd_resume.cc
index 5883e41fe..44b8ece43 100644
--- a/src/clients/cave/cmd_resume.cc
+++ b/src/clients/cave/cmd_resume.cc
@@ -27,7 +27,6 @@
#include "resume_data.hh"
#include <paludis/args/do_help.hh>
#include <paludis/args/escape.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
#include <paludis/util/system.hh>
@@ -234,13 +233,13 @@ namespace
(*c)->state()->accept(s);
if (s.is_active)
- (*c)->set_state(make_shared_ptr(new JobPendingState));
+ (*c)->set_state(std::make_shared<JobPendingState>());
else if (cmdline.a_retry_failed.specified() && s.is_failed)
- (*c)->set_state(make_shared_ptr(new JobPendingState));
+ (*c)->set_state(std::make_shared<JobPendingState>());
else if (cmdline.a_skip_failed.specified() && s.is_failed)
- (*c)->set_state(make_shared_ptr(new JobSkippedState));
+ (*c)->set_state(std::make_shared<JobSkippedState>());
else if (cmdline.a_retry_skipped.specified() && s.is_skipped)
- (*c)->set_state(make_shared_ptr(new JobPendingState));
+ (*c)->set_state(std::make_shared<JobPendingState>());
}
}
}
@@ -287,6 +286,6 @@ ResumeCommand::run(
std::shared_ptr<args::ArgsHandler>
ResumeCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ResumeCommandLine);
+ return std::make_shared<ResumeCommandLine>();
}
diff --git a/src/clients/cave/cmd_search.cc b/src/clients/cave/cmd_search.cc
index 87e2d2712..6d6e08e9d 100644
--- a/src/clients/cave/cmd_search.cc
+++ b/src/clients/cave/cmd_search.cc
@@ -37,7 +37,6 @@
#include <paludis/metadata_key.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/mutex.hh>
@@ -320,6 +319,6 @@ SearchCommand::run(
std::shared_ptr<args::ArgsHandler>
SearchCommand::make_doc_cmdline()
{
- return make_shared_ptr(new SearchCommandLine);
+ return std::make_shared<SearchCommandLine>();
}
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index 091a7097f..09a456310 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -38,11 +38,11 @@
#include <paludis/metadata_key.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/pretty_print.hh>
#include <paludis/util/timestamp.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/action.hh>
#include <paludis/mask.hh>
#include <paludis/choice.hh>
@@ -1121,6 +1121,6 @@ ShowCommand::run(
std::shared_ptr<args::ArgsHandler>
ShowCommand::make_doc_cmdline()
{
- return make_shared_ptr(new ShowCommandLine);
+ return std::make_shared<ShowCommandLine>();
}
diff --git a/src/clients/cave/cmd_sync.cc b/src/clients/cave/cmd_sync.cc
index 5740ee203..141a624ec 100644
--- a/src/clients/cave/cmd_sync.cc
+++ b/src/clients/cave/cmd_sync.cc
@@ -21,7 +21,6 @@
#include "exceptions.hh"
#include "formats.hh"
#include "format_general.hh"
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/package_database.hh>
#include <paludis/util/action_queue.hh>
#include <paludis/util/mutex.hh>
@@ -412,6 +411,6 @@ SyncCommand::run(
std::shared_ptr<args::ArgsHandler>
SyncCommand::make_doc_cmdline()
{
- return make_shared_ptr(new SyncCommandLine);
+ return std::make_shared<SyncCommandLine>();
}
diff --git a/src/clients/cave/cmd_uninstall.cc b/src/clients/cave/cmd_uninstall.cc
index e66aa6c0d..907550975 100644
--- a/src/clients/cave/cmd_uninstall.cc
+++ b/src/clients/cave/cmd_uninstall.cc
@@ -22,10 +22,10 @@
#include "resolve_common.hh"
#include "exceptions.hh"
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
@@ -62,10 +62,10 @@ namespace
g_target_options(main_options_section(), "Target options", "Target options"),
a_all_versions(&g_target_options, "all-versions", 'a', "If a supplied spec matches multiple versions, "
"uninstall all versions rather than erroring", true),
- resolution_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineResolutionOptions(this))),
- execution_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineExecutionOptions(this))),
- display_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineDisplayOptions(this))),
- program_options(for_docs ? make_null_shared_ptr() : make_shared_ptr(new ResolveCommandLineProgramOptions(this)))
+ resolution_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineResolutionOptions>(this)),
+ execution_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineExecutionOptions>(this)),
+ display_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineDisplayOptions>(this)),
+ program_options(for_docs ? make_null_shared_ptr() : std::make_shared<ResolveCommandLineProgramOptions>(this))
{
add_usage_line("[ -x|--execute ] [ --uninstalls-may-break */* ] [ --remove-if-dependent */* ] spec ...");
add_note("All options available for 'cave resolve' are also permitted. See 'man cave-resolve' for details.");
@@ -192,6 +192,6 @@ UninstallCommand::run(
std::shared_ptr<args::ArgsHandler>
UninstallCommand::make_doc_cmdline()
{
- return make_shared_ptr(new UninstallCommandLine(true));
+ return std::make_shared<UninstallCommandLine>(true);
}
diff --git a/src/clients/cave/cmd_update_world.cc b/src/clients/cave/cmd_update_world.cc
index a2d508b47..a4a1f6aa4 100644
--- a/src/clients/cave/cmd_update_world.cc
+++ b/src/clients/cave/cmd_update_world.cc
@@ -23,7 +23,6 @@
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
@@ -154,6 +153,6 @@ UpdateWorldCommand::run(
std::shared_ptr<args::ArgsHandler>
UpdateWorldCommand::make_doc_cmdline()
{
- return make_shared_ptr(new UpdateWorldCommandLine);
+ return std::make_shared<UpdateWorldCommandLine>();
}
diff --git a/src/clients/cave/cmd_verify.cc b/src/clients/cave/cmd_verify.cc
index f8a7b60c3..c682e8249 100644
--- a/src/clients/cave/cmd_verify.cc
+++ b/src/clients/cave/cmd_verify.cc
@@ -24,7 +24,6 @@
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -232,6 +231,6 @@ VerifyCommand::run(
std::shared_ptr<args::ArgsHandler>
VerifyCommand::make_doc_cmdline()
{
- return make_shared_ptr(new VerifyCommandLine);
+ return std::make_shared<VerifyCommandLine>();
}
diff --git a/src/clients/cave/command_factory.cc b/src/clients/cave/command_factory.cc
index cb5e18edf..a0c723dea 100644
--- a/src/clients/cave/command_factory.cc
+++ b/src/clients/cave/command_factory.cc
@@ -22,7 +22,6 @@
#include <paludis/util/singleton-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/member_iterator-impl.hh>
#include <paludis/util/tokeniser.hh>
@@ -100,12 +99,12 @@ namespace
template <typename T_>
const std::shared_ptr<T_> make_command()
{
- return make_shared_ptr(new T_);
+ return std::make_shared<T_>();
}
const std::shared_ptr<ScriptCommand> make_script_command(const std::string & s, const FSEntry & f)
{
- return make_shared_ptr(new ScriptCommand(s, f));
+ return std::make_shared<ScriptCommand>(s, f);
}
}
diff --git a/src/clients/cave/executables_common.cc b/src/clients/cave/executables_common.cc
index f7f94771e..ea08d23d2 100644
--- a/src/clients/cave/executables_common.cc
+++ b/src/clients/cave/executables_common.cc
@@ -31,7 +31,6 @@
#include <paludis/user_dep_spec.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/system.hh>
#include <paludis/util/tokeniser.hh>
diff --git a/src/clients/cave/owner_common.cc b/src/clients/cave/owner_common.cc
index 3dc0f341f..4c7544456 100644
--- a/src/clients/cave/owner_common.cc
+++ b/src/clients/cave/owner_common.cc
@@ -32,7 +32,6 @@
#include <paludis/repository.hh>
#include <paludis/selection.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <algorithm>
#include <functional>
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 89ae9b16a..0beaabc17 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -26,7 +26,6 @@
#include "command_command_line.hh"
#include "match_qpns.hh"
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/make_named_values.hh>
@@ -42,6 +41,7 @@
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/sequence-impl.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
+#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/args/do_help.hh>
#include <paludis/args/escape.hh>
#include <paludis/resolver/resolver.hh>
@@ -527,14 +527,14 @@ namespace
if ((-1 != n) && installed_is_scm_older_than(env, resolution_options, all_binary_repos_generator, resolvent, n)
&& ! use_existing_from_withish(env, resolvent.package(), without))
{
- result->add(make_shared_ptr(new Constraint(make_named_values<Constraint>(
+ result->add(std::make_shared<Constraint>(make_named_values<Constraint>(
n::destination_type() = resolvent.destination_type(),
n::nothing_is_fine_too() = true,
- n::reason() = make_shared_ptr(new PresetReason("is scm", make_null_shared_ptr())),
+ n::reason() = std::make_shared<PresetReason>("is scm", make_null_shared_ptr()),
n::spec() = make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(resolvent.package()),
n::untaken() = false,
n::use_existing() = ue_only_if_transient
- ))));
+ )));
}
return result;
@@ -1202,9 +1202,9 @@ namespace
PartiallyMadePackageDepSpec partial_spec((PartiallyMadePackageDepSpecOptions()));
partial_spec.package(id->name());
if (id->slot_key())
- partial_spec.slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement(
- id->slot_key()->value(), false)));
- spec = make_shared_ptr(new PackageDepSpec(partial_spec));
+ partial_spec.slot_requirement(std::make_shared<ELikeSlotExactRequirement>(
+ id->slot_key()->value(), false));
+ spec = std::make_shared<PackageDepSpec>(partial_spec);
}
for (ChangeByResolventSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ;
@@ -1212,14 +1212,14 @@ namespace
{
const std::shared_ptr<DependentReason> reason(new DependentReason(*i));
- result->push_back(make_shared_ptr(new Constraint(make_named_values<Constraint>(
+ result->push_back(std::make_shared<Constraint>(make_named_values<Constraint>(
n::destination_type() = dt_install_to_slash,
n::nothing_is_fine_too() = true,
n::reason() = reason,
n::spec() = BlockDepSpec("!" + stringify(*spec), *spec, false),
n::untaken() = false,
n::use_existing() = ue_if_possible
- ))));
+ )));
}
return result;
@@ -1237,20 +1237,20 @@ namespace
PartiallyMadePackageDepSpec partial_spec((PartiallyMadePackageDepSpecOptions()));
partial_spec.package(id->name());
if (id->slot_key())
- partial_spec.slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement(
- id->slot_key()->value(), false)));
+ partial_spec.slot_requirement(std::make_shared<ELikeSlotExactRequirement>(
+ id->slot_key()->value(), false));
PackageDepSpec spec(partial_spec);
const std::shared_ptr<WasUsedByReason> reason(new WasUsedByReason(ids));
- result->push_back(make_shared_ptr(new Constraint(make_named_values<Constraint>(
+ result->push_back(std::make_shared<Constraint>(make_named_values<Constraint>(
n::destination_type() = dt_install_to_slash,
n::nothing_is_fine_too() = true,
n::reason() = reason,
n::spec() = BlockDepSpec("!" + stringify(spec), spec, false),
n::untaken() = ! match_any(env, list, id),
n::use_existing() = ue_if_possible
- ))));
+ )));
return result;
}
@@ -1268,14 +1268,14 @@ namespace
const std::shared_ptr<ViaBinaryReason> reason(new ViaBinaryReason(other_resolution->resolvent()));
- result->push_back(make_shared_ptr(new Constraint(make_named_values<Constraint>(
+ result->push_back(std::make_shared<Constraint>(make_named_values<Constraint>(
n::destination_type() = resolution->resolvent().destination_type(),
n::nothing_is_fine_too() = false,
n::reason() = reason,
n::spec() = spec,
n::untaken() = true,
n::use_existing() = ue_never
- ))));
+ )));
return result;
}
@@ -1889,7 +1889,7 @@ paludis::cave::resolve_common(
initial_constraints.insert(std::make_pair(e.resolvent(), make_initial_constraints_for(
env.get(), resolution_options, all_binary_repos_generator, without, e.resolvent()))).first->second->add(
e.suggested_preset());
- resolver = make_shared_ptr(new Resolver(env.get(), resolver_functions));
+ resolver = std::make_shared<Resolver>(env.get(), resolver_functions);
if (restarts.size() > 9000)
throw InternalError(PALUDIS_HERE, "Restarted over nine thousand times. Something's "
@@ -1906,7 +1906,7 @@ paludis::cave::resolve_common(
retcode |= display_resolution(env, resolver->resolved(), resolution_options,
display_options, program_options, keys_if_import,
- purge ? make_shared_ptr(new const Sequence<std::pair<std::string, std::string> >) : targets_if_not_purge);
+ purge ? std::make_shared<const Sequence<std::pair<std::string, std::string> > >() : targets_if_not_purge);
if (! resolver->resolved()->taken_unable_to_make_decisions()->empty())
retcode |= 1;
@@ -1920,7 +1920,7 @@ paludis::cave::resolve_common(
if (0 == retcode)
return perform_resolution(env, resolver->resolved(), resolution_options,
execution_options, program_options, keys_if_import,
- purge ? make_shared_ptr(new const Sequence<std::pair<std::string, std::string> >) : targets_if_not_purge,
+ purge ? std::make_shared<const Sequence<std::pair<std::string, std::string> > >() : targets_if_not_purge,
world_specs_if_not_auto ? world_specs_if_not_auto : targets_cleaned_up,
is_set);
}
diff --git a/src/clients/inquisitio/do_search.cc b/src/clients/inquisitio/do_search.cc
index 0427ee7d2..7b029a5b5 100644
--- a/src/clients/inquisitio/do_search.cc
+++ b/src/clients/inquisitio/do_search.cc
@@ -33,7 +33,6 @@
#include <paludis/notifier_callback.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/create_iterator-impl.hh>
#include <paludis/util/forward_parallel_for_each.hh>
#include <paludis/util/system.hh>
@@ -336,14 +335,14 @@ do_search(Environment & env)
std::list<std::shared_ptr<Extractor> > extractors;
if (CommandLine::get_instance()->a_keys.begin_args() == CommandLine::get_instance()->a_keys.end_args())
- extractors.push_back(make_shared_ptr(new NameDescriptionExtractor));
+ extractors.push_back(std::make_shared<NameDescriptionExtractor>());
else
for (args::StringSetArg::ConstIterator i(CommandLine::get_instance()->a_keys.begin_args()),
i_end(CommandLine::get_instance()->a_keys.end_args()) ; i != i_end ; ++i)
- extractors.push_back(make_shared_ptr(new KeyExtractor(*i,
+ extractors.push_back(std::make_shared<KeyExtractor>(*i,
CommandLine::get_instance()->a_flatten.specified(),
CommandLine::get_instance()->a_enabled_only.specified(),
- env)));
+ env));
std::list<std::shared_ptr<const Repository> > repos;
for (PackageDatabase::RepositoryConstIterator r(env.package_database()->begin_repositories()),
diff --git a/src/clients/paludis/query.cc b/src/clients/paludis/query.cc
index 105d03bc5..aa0a9e78d 100644
--- a/src/clients/paludis/query.cc
+++ b/src/clients/paludis/query.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -126,8 +126,8 @@ void do_one_query(
try
{
- do_one_package_query(env, masks_to_explain, make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec(q, env.get(), UserPackageDepSpecOptions() + updso_throw_if_set + updso_allow_wildcards))));
+ do_one_package_query(env, masks_to_explain, std::make_shared<PackageDepSpec>(
+ parse_user_package_dep_spec(q, env.get(), UserPackageDepSpecOptions() + updso_throw_if_set + updso_allow_wildcards)));
}
catch (const GotASetNotAPackageDepSpec &)
{
diff --git a/src/clients/reconcilio/fix_linkage.cc b/src/clients/reconcilio/fix_linkage.cc
index 80254408e..afe4c6a15 100644
--- a/src/clients/reconcilio/fix_linkage.cc
+++ b/src/clients/reconcilio/fix_linkage.cc
@@ -24,7 +24,6 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/make_named_values.hh>
@@ -100,7 +99,7 @@ do_fix_linkage(const std::shared_ptr<Environment> & env)
PartiallyMadePackageDepSpec part_spec((PartiallyMadePackageDepSpecOptions()));
part_spec.package((*pkg_it)->name());
if ((*pkg_it)->slot_key())
- part_spec.slot_requirement(make_shared_ptr(new UserSlotExactRequirement((*pkg_it)->slot_key()->value())));
+ part_spec.slot_requirement(std::make_shared<UserSlotExactRequirement>((*pkg_it)->slot_key()->value()));
if (CommandLine::get_instance()->a_exact.specified())
part_spec.version_requirement(make_named_values<VersionRequirement>(