aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-08-05 23:51:36 -0700
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-08-06 11:58:04 -0700
commit64ba7d5be854122e1a5ec2c17949634abebca250 (patch)
tree23a645693d6bfea50c5c7d2c32da5d194944609b /src
parent1ad5f5ce2025f1db0ea5dd1fcf72223430f143b4 (diff)
downloadpaludis-64ba7d5be854122e1a5ec2c17949634abebca250.tar.gz
paludis-64ba7d5be854122e1a5ec2c17949634abebca250.tar.xz
modernize: use default method synthesis
Convert a number of destructors to default synthesized functions. Try to inline a few instances into the header. It should be possible to inline all of them, however, gcc seems to emit a number of warnings. Furthermore, some of the destructors are pure-virtualed, but provide an implementation. Placing the definition into the header causes ODR violations.
Diffstat (limited to 'src')
-rw-r--r--src/clients/cave/cmd_print_unmanaged_files.cc8
-rw-r--r--src/clients/cave/command.cc4
-rw-r--r--src/clients/cave/command_factory.cc4
-rw-r--r--src/clients/cave/script_command.cc4
4 files changed, 5 insertions, 15 deletions
diff --git a/src/clients/cave/cmd_print_unmanaged_files.cc b/src/clients/cave/cmd_print_unmanaged_files.cc
index ed3f25888..b5bba1f15 100644
--- a/src/clients/cave/cmd_print_unmanaged_files.cc
+++ b/src/clients/cave/cmd_print_unmanaged_files.cc
@@ -90,9 +90,7 @@ namespace
{
}
- ~CollectRecursiveDirectoryContents()
- {
- }
+ ~CollectRecursiveDirectoryContents() = default;
void operator()(const FSPath& path)
{
@@ -125,9 +123,7 @@ namespace
{
}
- ~CollectPackageContents()
- {
- }
+ ~CollectPackageContents() = default;
void operator()(const std::shared_ptr<const PackageID>& package)
{
diff --git a/src/clients/cave/command.cc b/src/clients/cave/command.cc
index 659b4c1e3..7b58c6180 100644
--- a/src/clients/cave/command.cc
+++ b/src/clients/cave/command.cc
@@ -22,7 +22,5 @@
using namespace paludis;
using namespace cave;
-Command::~Command()
-{
-}
+Command::~Command() = default;
diff --git a/src/clients/cave/command_factory.cc b/src/clients/cave/command_factory.cc
index e1e7d5c34..269e89330 100644
--- a/src/clients/cave/command_factory.cc
+++ b/src/clients/cave/command_factory.cc
@@ -221,9 +221,7 @@ CommandFactory::CommandFactory() :
_imp->handlers.insert(std::make_pair("verify", std::bind(&make_command<VerifyCommand>)));
}
-CommandFactory::~CommandFactory()
-{
-}
+CommandFactory::~CommandFactory() = default;
const std::shared_ptr<cave::Command>
CommandFactory::create(const std::string & s) const
diff --git a/src/clients/cave/script_command.cc b/src/clients/cave/script_command.cc
index e09411ca6..00deec5f6 100644
--- a/src/clients/cave/script_command.cc
+++ b/src/clients/cave/script_command.cc
@@ -56,9 +56,7 @@ ScriptCommand::ScriptCommand(const std::string &, const FSPath & e) :
{
}
-ScriptCommand::~ScriptCommand()
-{
-}
+ScriptCommand::~ScriptCommand() = default;
int
ScriptCommand::run(