From f98029186886f85dac9cb9c5b32ade9ba2bb4929 Mon Sep 17 00:00:00 2001 From: Dimitri Baron Date: Thu, 29 Feb 2024 10:43:47 +0100 Subject: [PATCH] #386 Delete explicit definition of the empty destructors to enable the compiler to generate implicit inline trivial destructors Signed-off-by: Dimitri Baron --- sources/API/multipleJobs/DYNMultipleJobs.cpp | 3 --- sources/API/multipleJobs/DYNMultipleJobs.h | 5 ---- .../DYNMultipleJobsXmlHandler.cpp | 15 ----------- .../multipleJobs/DYNMultipleJobsXmlHandler.h | 25 ------------------- sources/Common/DYNLoadIncreaseResult.cpp | 2 -- sources/Common/DYNLoadIncreaseResult.h | 5 ---- sources/Common/DYNSimulationResult.cpp | 3 --- sources/Common/DYNSimulationResult.h | 5 ---- .../DYNRobustnessAnalysisLauncher.cpp | 3 --- .../Launcher/DYNRobustnessAnalysisLauncher.h | 2 +- sources/Test/initXml.cpp | 2 -- 11 files changed, 1 insertion(+), 69 deletions(-) diff --git a/sources/API/multipleJobs/DYNMultipleJobs.cpp b/sources/API/multipleJobs/DYNMultipleJobs.cpp index b1df18b4..739cd165 100644 --- a/sources/API/multipleJobs/DYNMultipleJobs.cpp +++ b/sources/API/multipleJobs/DYNMultipleJobs.cpp @@ -30,9 +30,6 @@ namespace multipleJobs { MultipleJobs::MultipleJobs() { } -MultipleJobs::~MultipleJobs() { -} - void MultipleJobs::setScenarios(const boost::shared_ptr& scenarios) { scenarios_ = scenarios; diff --git a/sources/API/multipleJobs/DYNMultipleJobs.h b/sources/API/multipleJobs/DYNMultipleJobs.h index 7b0f2583..12420478 100644 --- a/sources/API/multipleJobs/DYNMultipleJobs.h +++ b/sources/API/multipleJobs/DYNMultipleJobs.h @@ -40,11 +40,6 @@ class MultipleJobs { */ MultipleJobs(); - /** - * @brief default desctructor - */ - ~MultipleJobs(); - /** * @brief Set the scenarios description to launch * @param scenarios scenarios description to launch diff --git a/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.cpp b/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.cpp index 63fe22ee..0e4566c0 100644 --- a/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.cpp +++ b/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.cpp @@ -57,9 +57,6 @@ marginCalculationHandler_(parser::ElementName(multipleJobs_ns, "marginCalculatio marginCalculationHandler_.onEnd(lambda::bind(&XmlHandler::addMarginCalculation, lambda::ref(*this))); } -XmlHandler::~XmlHandler() { -} - boost::shared_ptr XmlHandler::getMultipleJobs() { return multipleJobsRead_; @@ -87,9 +84,6 @@ loadIncreaseHandler_(parser::ElementName(multipleJobs_ns, "loadIncrease")) { loadIncreaseHandler_.onEnd(lambda::bind(&MarginCalculationHandler::setLoadIncrease, lambda::ref(*this))); } -MarginCalculationHandler::~MarginCalculationHandler() { -} - void MarginCalculationHandler::create(attributes_type const& attributes) { marginCalculation_ = boost::shared_ptr(new MarginCalculation()); @@ -127,9 +121,6 @@ scenarioHandler_(parser::ElementName(multipleJobs_ns, "scenario")) { scenarioHandler_.onEnd(lambda::bind(&ScenariosHandler::addScenario, lambda::ref(*this))); } -ScenariosHandler::~ScenariosHandler() { -} - void ScenariosHandler::create(attributes_type const& attributes) { scenarios_ = boost::shared_ptr(new Scenarios()); @@ -150,9 +141,6 @@ ScenarioHandler::ScenarioHandler(const elementName_type& root_element) { onStartElement(root_element, lambda::bind(&ScenarioHandler::create, lambda::ref(*this), lambda_args::arg2)); } -ScenarioHandler::~ScenarioHandler() { -} - void ScenarioHandler::create(attributes_type const& attributes) { scenario_ = boost::shared_ptr(new Scenario()); @@ -172,9 +160,6 @@ LoadIncreaseHandler::LoadIncreaseHandler(const elementName_type& root_element) { onStartElement(root_element, lambda::bind(&LoadIncreaseHandler::create, lambda::ref(*this), lambda_args::arg2)); } -LoadIncreaseHandler::~LoadIncreaseHandler() { -} - void LoadIncreaseHandler::create(attributes_type const& attributes) { loadIncrease_ = boost::shared_ptr(new LoadIncrease()); diff --git a/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.h b/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.h index 50cc4e3c..3a849073 100644 --- a/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.h +++ b/sources/API/multipleJobs/DYNMultipleJobsXmlHandler.h @@ -45,11 +45,6 @@ class ScenarioHandler : public xml::sax::parser::ComposableElementHandler { */ explicit ScenarioHandler(elementName_type const& root_element); - /** - * @brief default destructor - */ - ~ScenarioHandler(); - /** * @brief return the current scenario read in xml file * @return scenario object build thanks to infos read in xml file @@ -80,11 +75,6 @@ class LoadIncreaseHandler : public xml::sax::parser::ComposableElementHandler { */ explicit LoadIncreaseHandler(elementName_type const& root_element); - /** - * @brief default destructor - */ - ~LoadIncreaseHandler(); - /** * @brief return the current load increase read in xml file * @return load increase object build thanks to infos read in xml file @@ -114,11 +104,6 @@ class ScenariosHandler : public xml::sax::parser::ComposableElementHandler { */ explicit ScenariosHandler(elementName_type const& root_element); - /** - * @brief default destructor - */ - ~ScenariosHandler(); - /** * @brief add a scenario */ @@ -154,11 +139,6 @@ class MarginCalculationHandler : public xml::sax::parser::ComposableElementHandl */ explicit MarginCalculationHandler(elementName_type const& root_element); - /** - * @brief default destructor - */ - ~MarginCalculationHandler(); - /** * @brief add a scenario */ @@ -202,11 +182,6 @@ class XmlHandler : public xml::sax::parser::ComposableDocumentHandler { */ XmlHandler(); - /** - * @brief Destructor - */ - ~XmlHandler(); - /** * @brief Parsed MultipleJobs instance getter * diff --git a/sources/Common/DYNLoadIncreaseResult.cpp b/sources/Common/DYNLoadIncreaseResult.cpp index 216a9530..9a1beffe 100644 --- a/sources/Common/DYNLoadIncreaseResult.cpp +++ b/sources/Common/DYNLoadIncreaseResult.cpp @@ -19,8 +19,6 @@ LoadIncreaseResult::LoadIncreaseResult(): status_(EXECUTION_PROBLEM_STATUS), loadLevel_(-1.) { } -LoadIncreaseResult::~LoadIncreaseResult() { } - double LoadIncreaseResult::getLoadLevel() const { return loadLevel_; diff --git a/sources/Common/DYNLoadIncreaseResult.h b/sources/Common/DYNLoadIncreaseResult.h index 7c3675b9..32d9ba4a 100644 --- a/sources/Common/DYNLoadIncreaseResult.h +++ b/sources/Common/DYNLoadIncreaseResult.h @@ -33,11 +33,6 @@ class LoadIncreaseResult { */ LoadIncreaseResult(); - /** - * @brief default destructor - */ - ~LoadIncreaseResult(); - /** * @brief get the load level of the load increase * @return load level of the load increase diff --git a/sources/Common/DYNSimulationResult.cpp b/sources/Common/DYNSimulationResult.cpp index 879c5e73..c59752a3 100644 --- a/sources/Common/DYNSimulationResult.cpp +++ b/sources/Common/DYNSimulationResult.cpp @@ -32,9 +32,6 @@ SimulationResult::SimulationResult(): lostEquipmentsFileExtension_("xml") { } -SimulationResult::~SimulationResult() { -} - SimulationResult::SimulationResult(const SimulationResult& result): scenarioId_(result.scenarioId_), variation_(result.variation_), diff --git a/sources/Common/DYNSimulationResult.h b/sources/Common/DYNSimulationResult.h index 28ea8ba1..af556009 100644 --- a/sources/Common/DYNSimulationResult.h +++ b/sources/Common/DYNSimulationResult.h @@ -41,11 +41,6 @@ class SimulationResult { */ SimulationResult(); - /** - * @brief default destructor - */ - ~SimulationResult(); - /** * @brief copy constructor * @param result : result to copy diff --git a/sources/Launcher/DYNRobustnessAnalysisLauncher.cpp b/sources/Launcher/DYNRobustnessAnalysisLauncher.cpp index faa84700..e2408040 100644 --- a/sources/Launcher/DYNRobustnessAnalysisLauncher.cpp +++ b/sources/Launcher/DYNRobustnessAnalysisLauncher.cpp @@ -73,9 +73,6 @@ RobustnessAnalysisLauncher::RobustnessAnalysisLauncher() : logTag_("DYN-ALGO") { } -RobustnessAnalysisLauncher::~RobustnessAnalysisLauncher() { -} - void RobustnessAnalysisLauncher::setInputFile(const std::string& inputFile) { inputFile_ = inputFile; diff --git a/sources/Launcher/DYNRobustnessAnalysisLauncher.h b/sources/Launcher/DYNRobustnessAnalysisLauncher.h index cca7d5e9..b675ed13 100644 --- a/sources/Launcher/DYNRobustnessAnalysisLauncher.h +++ b/sources/Launcher/DYNRobustnessAnalysisLauncher.h @@ -52,7 +52,7 @@ class RobustnessAnalysisLauncher { /** * @brief default destructor */ - virtual ~RobustnessAnalysisLauncher(); + virtual ~RobustnessAnalysisLauncher() = default; /** * @brief set the inputFile of the analysis diff --git a/sources/Test/initXml.cpp b/sources/Test/initXml.cpp index 65a2cf24..40fd2b94 100644 --- a/sources/Test/initXml.cpp +++ b/sources/Test/initXml.cpp @@ -16,8 +16,6 @@ class XmlEnvironment : public testing::Environment { public: - ~XmlEnvironment() {} - // Override this to define how to set up the environment. void SetUp() { xercesc::XMLPlatformUtils::Initialize();