Skip to content

Commit

Permalink
#386 Delete explicit definition of the empty destructors to enable th…
Browse files Browse the repository at this point in the history
…e compiler to generate implicit inline trivial destructors

Signed-off-by: Dimitri Baron <[email protected]>
  • Loading branch information
barondim authored and rosiereflo committed Mar 4, 2024
1 parent ef3b176 commit f980291
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 69 deletions.
3 changes: 0 additions & 3 deletions sources/API/multipleJobs/DYNMultipleJobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ namespace multipleJobs {
MultipleJobs::MultipleJobs() {
}

MultipleJobs::~MultipleJobs() {
}

void
MultipleJobs::setScenarios(const boost::shared_ptr<Scenarios>& scenarios) {
scenarios_ = scenarios;
Expand Down
5 changes: 0 additions & 5 deletions sources/API/multipleJobs/DYNMultipleJobs.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ class MultipleJobs {
*/
MultipleJobs();

/**
* @brief default desctructor
*/
~MultipleJobs();

/**
* @brief Set the scenarios description to launch
* @param scenarios scenarios description to launch
Expand Down
15 changes: 0 additions & 15 deletions sources/API/multipleJobs/DYNMultipleJobsXmlHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ marginCalculationHandler_(parser::ElementName(multipleJobs_ns, "marginCalculatio
marginCalculationHandler_.onEnd(lambda::bind(&XmlHandler::addMarginCalculation, lambda::ref(*this)));
}

XmlHandler::~XmlHandler() {
}

boost::shared_ptr<MultipleJobs>
XmlHandler::getMultipleJobs() {
return multipleJobsRead_;
Expand Down Expand Up @@ -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<MarginCalculation>(new MarginCalculation());
Expand Down Expand Up @@ -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<Scenarios>(new Scenarios());
Expand All @@ -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<Scenario>(new Scenario());
Expand All @@ -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<LoadIncrease>(new LoadIncrease());
Expand Down
25 changes: 0 additions & 25 deletions sources/API/multipleJobs/DYNMultipleJobsXmlHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -202,11 +182,6 @@ class XmlHandler : public xml::sax::parser::ComposableDocumentHandler {
*/
XmlHandler();

/**
* @brief Destructor
*/
~XmlHandler();

/**
* @brief Parsed MultipleJobs instance getter
*
Expand Down
2 changes: 0 additions & 2 deletions sources/Common/DYNLoadIncreaseResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ LoadIncreaseResult::LoadIncreaseResult():
status_(EXECUTION_PROBLEM_STATUS),
loadLevel_(-1.) { }

LoadIncreaseResult::~LoadIncreaseResult() { }

double
LoadIncreaseResult::getLoadLevel() const {
return loadLevel_;
Expand Down
5 changes: 0 additions & 5 deletions sources/Common/DYNLoadIncreaseResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions sources/Common/DYNSimulationResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ SimulationResult::SimulationResult():
lostEquipmentsFileExtension_("xml") {
}

SimulationResult::~SimulationResult() {
}

SimulationResult::SimulationResult(const SimulationResult& result):
scenarioId_(result.scenarioId_),
variation_(result.variation_),
Expand Down
5 changes: 0 additions & 5 deletions sources/Common/DYNSimulationResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ class SimulationResult {
*/
SimulationResult();

/**
* @brief default destructor
*/
~SimulationResult();

/**
* @brief copy constructor
* @param result : result to copy
Expand Down
3 changes: 0 additions & 3 deletions sources/Launcher/DYNRobustnessAnalysisLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ RobustnessAnalysisLauncher::RobustnessAnalysisLauncher() :
logTag_("DYN-ALGO") {
}

RobustnessAnalysisLauncher::~RobustnessAnalysisLauncher() {
}

void
RobustnessAnalysisLauncher::setInputFile(const std::string& inputFile) {
inputFile_ = inputFile;
Expand Down
2 changes: 1 addition & 1 deletion sources/Launcher/DYNRobustnessAnalysisLauncher.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RobustnessAnalysisLauncher {
/**
* @brief default destructor
*/
virtual ~RobustnessAnalysisLauncher();
virtual ~RobustnessAnalysisLauncher() = default;

/**
* @brief set the inputFile of the analysis
Expand Down
2 changes: 0 additions & 2 deletions sources/Test/initXml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f980291

Please sign in to comment.