From ad94df2b512a344b5c9068ac0cfcf99d7276a69a Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Fri, 17 Nov 2023 10:13:33 +0100 Subject: [PATCH] Fix clang warnings --- src/ext/yuni/src/yuni/core/logs/handler/file.hxx | 1 - src/ext/yuni/src/yuni/core/logs/handler/stdcout.h | 2 -- src/ext/yuni/src/yuni/core/nullable/extension.hxx | 2 +- src/ext/yuni/src/yuni/core/nullable/nullable.hxx | 6 +++--- .../array/antares/array/matrix-to-buffer.h | 6 +----- src/libs/antares/array/antares/array/matrix.hxx | 2 +- .../antares/benchmarking/DurationCollector.h | 3 +++ src/libs/antares/object/intrusive-reference.hxx | 4 ++-- src/libs/antares/study/runtime/runtime.cpp | 1 - .../antares/study/scenario-builder/TSnumberData.h | 9 ++------- .../study/scenario-builder/ThermalTSNumberData.h | 1 + src/solver/application.h | 2 +- src/solver/constraints-builder/grid.hxx | 2 +- .../BindingConstraintsTimeSeriesNumbersWriter.h | 2 +- src/solver/simulation/adequacy.h | 1 - src/solver/simulation/economy.h | 1 - src/solver/simulation/solver.hxx | 2 +- src/solver/simulation/timeseries-numbers.cpp | 6 ++++++ src/solver/utils/mps_utils.h | 4 ++++ src/solver/utils/name_translator.h | 7 +++++++ src/solver/utils/named_problem.cpp | 15 ++++++--------- src/solver/variable/commons/spatial-aggregate.h | 12 ++++++------ .../bindingConstraintsMarginalCost.h | 2 +- src/solver/variable/endoflist.h | 2 +- src/solver/variable/info.h | 6 +++--- .../end-to-end/simple_study/simple-study.cpp | 4 ++-- .../thermal-price-definition.cpp | 1 - .../test-unfeasible-problem-analyzer.cpp | 3 ++- src/ui/common/component/frame/local-frame.h | 2 +- .../simulator/toolbox/components/button/button.h | 2 +- 30 files changed, 58 insertions(+), 55 deletions(-) diff --git a/src/ext/yuni/src/yuni/core/logs/handler/file.hxx b/src/ext/yuni/src/yuni/core/logs/handler/file.hxx index fd8618aefa..8e8b1857cd 100644 --- a/src/ext/yuni/src/yuni/core/logs/handler/file.hxx +++ b/src/ext/yuni/src/yuni/core/logs/handler/file.hxx @@ -61,7 +61,6 @@ void File::internalDecoratorWriteWL(LoggerT& logger, const AnyStrin { if (pFile.opened()) { - typedef typename LoggerT::DecoratorsType DecoratorsType; // Append the message to the file logger.DecoratorsType::template internalDecoratorAddPrefix(pFile, s); diff --git a/src/ext/yuni/src/yuni/core/logs/handler/stdcout.h b/src/ext/yuni/src/yuni/core/logs/handler/stdcout.h index 19c27b05c7..5027f4fe18 100644 --- a/src/ext/yuni/src/yuni/core/logs/handler/stdcout.h +++ b/src/ext/yuni/src/yuni/core/logs/handler/stdcout.h @@ -38,8 +38,6 @@ class YUNI_DECL StdCout : public NextHandler template void internalDecoratorWriteWL(LoggerT& logger, const AnyString& s) const { - typedef typename LoggerT::DecoratorsType DecoratorsType; - // Write the message to the std::cout/cerr if (VerbosityType::shouldUsesStdCerr) { diff --git a/src/ext/yuni/src/yuni/core/nullable/extension.hxx b/src/ext/yuni/src/yuni/core/nullable/extension.hxx index 25c282a70c..3f17c4a231 100644 --- a/src/ext/yuni/src/yuni/core/nullable/extension.hxx +++ b/src/ext/yuni/src/yuni/core/nullable/extension.hxx @@ -17,7 +17,7 @@ namespace Extension namespace CString { template -struct Append> final +class Append> final { static void Perform(CStringT& s, const Yuni::Nullable& rhs) { diff --git a/src/ext/yuni/src/yuni/core/nullable/nullable.hxx b/src/ext/yuni/src/yuni/core/nullable/nullable.hxx index 9092035604..ba6c4b5c03 100644 --- a/src/ext/yuni/src/yuni/core/nullable/nullable.hxx +++ b/src/ext/yuni/src/yuni/core/nullable/nullable.hxx @@ -290,14 +290,14 @@ inline void Nullable::print(S& out, const U& nullValue) const } template -inline typename Nullable::reference Nullable::operator[](size_type n) +inline typename Nullable::reference Nullable::operator[](size_type) { return pHolder.reference(); } template inline typename Nullable::const_reference Nullable::operator[]( - size_type n) const + size_type) const { return pHolder.reference(); } @@ -327,7 +327,7 @@ inline typename Nullable::const_reference Nullable::back() c } template -inline bool Nullable::operator<(const Nullable& rhs) const +inline bool Nullable::operator<(const Nullable&) const { return false; } diff --git a/src/libs/antares/array/antares/array/matrix-to-buffer.h b/src/libs/antares/array/antares/array/matrix-to-buffer.h index acc6b4bf41..43fd3f83b2 100644 --- a/src/libs/antares/array/antares/array/matrix-to-buffer.h +++ b/src/libs/antares/array/antares/array/matrix-to-buffer.h @@ -46,8 +46,7 @@ class I_mtx_to_buffer_dumper; class matrix_to_buffer_dumper_factory { public: - matrix_to_buffer_dumper_factory(bool isDecimal, uint precision) : - any_decimal_(isDecimal and precision) + matrix_to_buffer_dumper_factory() { } @@ -59,9 +58,6 @@ class matrix_to_buffer_dumper_factory I_mtx_to_buffer_dumper* get_dumper(const Matrix* mtx, std::string& data, PredicateT& predicate); - -private: - bool any_decimal_; }; template diff --git a/src/libs/antares/array/antares/array/matrix.hxx b/src/libs/antares/array/antares/array/matrix.hxx index 9e2420624f..1ab9c3dc3a 100644 --- a/src/libs/antares/array/antares/array/matrix.hxx +++ b/src/libs/antares/array/antares/array/matrix.hxx @@ -1136,7 +1136,7 @@ void Matrix::saveToBuffer(std::string& data, // Does nothing if the matrix only contains zero return; - matrix_to_buffer_dumper_factory mtx_to_buffer_dumper_factory(isDecimal, precision); + matrix_to_buffer_dumper_factory mtx_to_buffer_dumper_factory; I_mtx_to_buffer_dumper* mtx_to_buffer_dpr = mtx_to_buffer_dumper_factory.get_dumper(this, data, predicate); diff --git a/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h b/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h index 511cfb554e..ace4bf6fcd 100644 --- a/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h +++ b/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h @@ -13,6 +13,7 @@ namespace Benchmarking class IDurationCollector { public: + virtual ~IDurationCollector() = default; virtual void addDuration(const std::string& name, int64_t duration) = 0; }; @@ -20,6 +21,7 @@ class NullDurationCollector : public IDurationCollector { public: NullDurationCollector() = default; + virtual ~NullDurationCollector() = default; void addDuration(const std::string& /* name */, int64_t /* duration */) override { /* Do nothing */ } @@ -29,6 +31,7 @@ class DurationCollector : public IDurationCollector { public: DurationCollector() = default; + virtual ~DurationCollector() = default; void toFileContent(FileContent& file_content); void addDuration(const std::string& name, int64_t duration) override; diff --git a/src/libs/antares/object/intrusive-reference.hxx b/src/libs/antares/object/intrusive-reference.hxx index c70e504e50..7bc8a1faea 100644 --- a/src/libs/antares/object/intrusive-reference.hxx +++ b/src/libs/antares/object/intrusive-reference.hxx @@ -43,14 +43,14 @@ inline IIntrusiveReference::~IIntrusiveReference() template class TP> inline IIntrusiveReference::IIntrusiveReference( - const IIntrusiveReference& rhs) : + [[maybe_unused]] const IIntrusiveReference& rhs) : pRefCount(0) { } template class TP> inline IIntrusiveReference& IIntrusiveReference::operator=( - const IIntrusiveReference& rhs) const + [[maybe_unused]] const IIntrusiveReference& rhs) const { // Does nothing return *this; diff --git a/src/libs/antares/study/runtime/runtime.cpp b/src/libs/antares/study/runtime/runtime.cpp index 0a8f349847..1a58a14f73 100644 --- a/src/libs/antares/study/runtime/runtime.cpp +++ b/src/libs/antares/study/runtime/runtime.cpp @@ -443,7 +443,6 @@ StudyRuntimeInfos::~StudyRuntimeInfos() #ifndef NDEBUG void StudyRangeLimits::checkIntegrity() const { - assert(this != nullptr); assert(hour[rangeBegin] <= hour[rangeEnd]); assert(day[rangeBegin] <= day[rangeEnd]); assert(hour[rangeBegin] < 9000); // arbitrary value diff --git a/src/libs/antares/study/scenario-builder/TSnumberData.h b/src/libs/antares/study/scenario-builder/TSnumberData.h index ca2c1ee583..acac2c707c 100644 --- a/src/libs/antares/study/scenario-builder/TSnumberData.h +++ b/src/libs/antares/study/scenario-builder/TSnumberData.h @@ -65,17 +65,12 @@ class TSNumberData : public dataInterface void setTSnumber(uint index, uint year, uint value); //@} - uint width() const; - uint height() const; + uint width() const override; + uint height() const override; double get_value(uint x, uint y) const; void set_value(uint x, uint y, uint value); - /* - ** Give the study an access to TS numbers scenarii - */ - virtual bool apply(Study& study) = 0; - protected: virtual CString<512, false> get_prefix() const = 0; diff --git a/src/libs/antares/study/scenario-builder/ThermalTSNumberData.h b/src/libs/antares/study/scenario-builder/ThermalTSNumberData.h index 7831a13a0d..049613c64d 100644 --- a/src/libs/antares/study/scenario-builder/ThermalTSNumberData.h +++ b/src/libs/antares/study/scenario-builder/ThermalTSNumberData.h @@ -11,6 +11,7 @@ class thermalTSNumberData : public TSNumberData { public: thermalTSNumberData() = default; + virtual ~thermalTSNumberData() = default; bool reset(const Study& study) override; void saveToINIFile(const Study& study, Yuni::IO::File::Stream& file) const override; diff --git a/src/solver/application.h b/src/solver/application.h index 7740087a73..7211531efd 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -13,7 +13,7 @@ namespace Antares::Solver { -class Application : public Yuni::IEventObserver +class Application final : public Yuni::IEventObserver { public: //! \name Constructor & Destructor diff --git a/src/solver/constraints-builder/grid.hxx b/src/solver/constraints-builder/grid.hxx index 657f2c1eaa..db606af874 100644 --- a/src/solver/constraints-builder/grid.hxx +++ b/src/solver/constraints-builder/grid.hxx @@ -470,7 +470,7 @@ typename Grid::VectorEdgeP Grid::findShortestPath(NodeP node1, Nod Grid::VectorEdgeP path; Grid::NodeP currentNode = node2; - while (!prev[currentNode] == 0) + while (!(prev[currentNode] == 0)) { path.push_back(adjency.at(currentNode).at(prev[currentNode])); currentNode = prev[currentNode]; diff --git a/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h b/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h index 36b20d28fb..8016505879 100644 --- a/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h +++ b/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h @@ -14,7 +14,7 @@ class BindingConstraintsTimeSeriesNumbersWriter: public ITimeSeriesNumbersWriter public: explicit BindingConstraintsTimeSeriesNumbersWriter(IResultWriter& resultWriter); - BindingConstraintsTimeSeriesNumbersWriter() = default; + BindingConstraintsTimeSeriesNumbersWriter() = delete; void write(const Data::BindingConstraintGroupRepository &bindingConstraintGroupRepository) override; private: diff --git a/src/solver/simulation/adequacy.h b/src/solver/simulation/adequacy.h index 70807a880a..b15ce369eb 100644 --- a/src/solver/simulation/adequacy.h +++ b/src/solver/simulation/adequacy.h @@ -104,7 +104,6 @@ class Adequacy uint pNbWeeks; uint pStartTime; uint pNbMaxPerformedYearsInParallel; - bool pPreproOnly; std::vector pProblemesHebdo; Matrix<> pRES; IResultWriter& resultWriter; diff --git a/src/solver/simulation/economy.h b/src/solver/simulation/economy.h index 29741f7646..3aaba4b57c 100644 --- a/src/solver/simulation/economy.h +++ b/src/solver/simulation/economy.h @@ -101,7 +101,6 @@ class Economy uint pNbWeeks; uint pStartTime; uint pNbMaxPerformedYearsInParallel; - bool pPreproOnly; std::vector pProblemesHebdo; std::vector> weeklyOptProblems_; std::vector> postProcessesList_; diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 1f568015ec..611b1415ce 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -905,7 +905,7 @@ void ISimulation::computeAnnualCostsStatistics( } } -static void logPerformedYearsInAset(setOfParallelYears& set) +static inline void logPerformedYearsInAset(setOfParallelYears& set) { logs.info() << "parallel batch size : " << set.nbYears << " (" << set.nbPerformedYears << " perfomed)"; diff --git a/src/solver/simulation/timeseries-numbers.cpp b/src/solver/simulation/timeseries-numbers.cpp index a85da87f83..68ab5de362 100644 --- a/src/solver/simulation/timeseries-numbers.cpp +++ b/src/solver/simulation/timeseries-numbers.cpp @@ -126,6 +126,7 @@ class areaNumberOfTSretriever class loadAreaNumberOfTSretriever : public areaNumberOfTSretriever { public: + virtual ~loadAreaNumberOfTSretriever() = default; loadAreaNumberOfTSretriever(Study& study) : areaNumberOfTSretriever(study) { } @@ -143,6 +144,7 @@ class loadAreaNumberOfTSretriever : public areaNumberOfTSretriever class hydroAreaNumberOfTSretriever : public areaNumberOfTSretriever { public: + virtual ~hydroAreaNumberOfTSretriever() = default; hydroAreaNumberOfTSretriever(Study& study) : areaNumberOfTSretriever(study) { } @@ -160,6 +162,7 @@ class hydroAreaNumberOfTSretriever : public areaNumberOfTSretriever class windAreaNumberOfTSretriever : public areaNumberOfTSretriever { public: + virtual ~windAreaNumberOfTSretriever() = default; windAreaNumberOfTSretriever(Study& study) : areaNumberOfTSretriever(study) { } @@ -177,6 +180,7 @@ class windAreaNumberOfTSretriever : public areaNumberOfTSretriever class solarAreaNumberOfTSretriever : public areaNumberOfTSretriever { public: + virtual ~solarAreaNumberOfTSretriever() = default; solarAreaNumberOfTSretriever(Study& study) : areaNumberOfTSretriever(study) { } @@ -194,6 +198,7 @@ class solarAreaNumberOfTSretriever : public areaNumberOfTSretriever class thermalAreaNumberOfTSretriever : public areaNumberOfTSretriever { public: + virtual ~thermalAreaNumberOfTSretriever() = default; thermalAreaNumberOfTSretriever(Study& study) : areaNumberOfTSretriever(study) { } @@ -217,6 +222,7 @@ class thermalAreaNumberOfTSretriever : public areaNumberOfTSretriever class renewClustersAreaNumberOfTSretriever : public areaNumberOfTSretriever { public: + virtual ~renewClustersAreaNumberOfTSretriever() = default; renewClustersAreaNumberOfTSretriever(Study& study) : areaNumberOfTSretriever(study) { } diff --git a/src/solver/utils/mps_utils.h b/src/solver/utils/mps_utils.h index 11dfaaa6c7..9bff928bdc 100644 --- a/src/solver/utils/mps_utils.h +++ b/src/solver/utils/mps_utils.h @@ -27,6 +27,7 @@ class I_MPS_writer { } I_MPS_writer() = default; + virtual ~I_MPS_writer() = default; virtual void runIfNeeded(Solver::IResultWriter& writer, const std::string& filename) = 0; protected: @@ -46,6 +47,7 @@ class fullMPSwriter final : public I_MPS_writer class fullOrToolsMPSwriter : public I_MPS_writer { public: + virtual ~fullOrToolsMPSwriter() = default; fullOrToolsMPSwriter(MPSolver* solver, uint currentOptimNumber); void runIfNeeded(Solver::IResultWriter& writer, const std::string& filename) override; @@ -56,6 +58,7 @@ class fullOrToolsMPSwriter : public I_MPS_writer class nullMPSwriter : public I_MPS_writer { public: + virtual ~nullMPSwriter() = default; using I_MPS_writer::I_MPS_writer; void runIfNeeded(Solver::IResultWriter& /*writer*/, const std::string& /*filename*/) override @@ -67,6 +70,7 @@ class nullMPSwriter : public I_MPS_writer class mpsWriterFactory { public: + virtual ~mpsWriterFactory() = default; mpsWriterFactory(Data::mpsExportStatus exportMPS, bool exportMPSOnError, const int current_optim_number, diff --git a/src/solver/utils/name_translator.h b/src/solver/utils/name_translator.h index a179bf1caf..9963599e7e 100644 --- a/src/solver/utils/name_translator.h +++ b/src/solver/utils/name_translator.h @@ -7,6 +7,7 @@ class NameTranslator { public: + virtual ~NameTranslator() = default; virtual char** translate(const std::vector& src, std::vector& pointerVec) = 0; static std::unique_ptr create(bool useRealNames); @@ -14,12 +15,18 @@ class NameTranslator class RealName : public NameTranslator { +public: + ~RealName() override = default; +private: char** translate(const std::vector& src, std::vector& pointerVec) override; }; class NullName : public NameTranslator { +public: + ~NullName() override = default; +private: char** translate(const std::vector& src, std::vector& pointerVec) override; }; diff --git a/src/solver/utils/named_problem.cpp b/src/solver/utils/named_problem.cpp index e3fcc08643..44994f4abc 100644 --- a/src/solver/utils/named_problem.cpp +++ b/src/solver/utils/named_problem.cpp @@ -1,9 +1,7 @@ #include "named_problem.h" #include -namespace Antares -{ -namespace Optimization +namespace Antares::Optimization { PROBLEME_SIMPLEXE_NOMME::PROBLEME_SIMPLEXE_NOMME(const std::vector& NomDesVariables, @@ -12,15 +10,15 @@ PROBLEME_SIMPLEXE_NOMME::PROBLEME_SIMPLEXE_NOMME(const std::vector& std::vector& StatutDesVariables, std::vector& StatutDesContraintes, bool UseNamedProblems, - bool SolverLogs) : + bool SolverLogs) : PROBLEME_SIMPLEXE(), NomDesVariables(NomDesVariables), NomDesContraintes(NomDesContraintes), - VariablesEntieres(VariablesEntieres), + useNamedProblems_(UseNamedProblems), + solverLogs_(SolverLogs), StatutDesVariables(StatutDesVariables), StatutDesContraintes(StatutDesContraintes), - useNamedProblems_(UseNamedProblems), - solverLogs_(SolverLogs) + VariablesEntieres(VariablesEntieres) { AffichageDesTraces = SolverLogs ? OUI_SPX : NON_SPX; } @@ -36,5 +34,4 @@ bool PROBLEME_SIMPLEXE_NOMME::basisExists() const return !StatutDesVariables.empty() && !StatutDesContraintes.empty(); } -} // namespace Optimization -} // namespace Antares +} // namespace Antares::Optimization diff --git a/src/solver/variable/commons/spatial-aggregate.h b/src/solver/variable/commons/spatial-aggregate.h index 82c39279e5..8308b29b55 100644 --- a/src/solver/variable/commons/spatial-aggregate.h +++ b/src/solver/variable/commons/spatial-aggregate.h @@ -55,12 +55,12 @@ struct MultipleCaptionProxy template struct MultipleCaptionProxy<0, VCardT> { - static std::string Caption(const uint indx) + static std::string Caption(const uint) { return ""; } - static std::string Unit(const uint indx) + static std::string Unit(const uint) { return ""; } @@ -69,12 +69,12 @@ struct MultipleCaptionProxy<0, VCardT> template struct MultipleCaptionProxy<1, VCardT> { - static std::string Caption(const uint indx) + static std::string Caption(const uint) { return ""; } - static std::string Unit(const uint indx) + static std::string Unit(const uint) { return ""; } @@ -83,12 +83,12 @@ struct MultipleCaptionProxy<1, VCardT> template struct MultipleCaptionProxy { - static std::string Caption(const uint indx) + static std::string Caption(const uint) { return ""; } - static std::string Unit(const uint indx) + static std::string Unit(const uint) { return ""; } diff --git a/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h b/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h index c6836a0a01..c120753a7a 100644 --- a/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h +++ b/src/solver/variable/economy/bindingConstraints/bindingConstraintsMarginalCost.h @@ -305,7 +305,7 @@ class BindingConstMarginCost } Antares::Memory::Stored::ConstReturnType retrieveRawHourlyValuesForCurrentYear( - unsigned int column, + unsigned int, unsigned int numSpace) const { return pValuesForTheCurrentYear[numSpace].hour; diff --git a/src/solver/variable/endoflist.h b/src/solver/variable/endoflist.h index 13594f11ae..9983610812 100644 --- a/src/solver/variable/endoflist.h +++ b/src/solver/variable/endoflist.h @@ -154,7 +154,7 @@ class EndOfList }; template - void yearEndSpatialAggregates(V&, unsigned int, uint numSpace) + void yearEndSpatialAggregates(V&, unsigned int, uint) { } diff --git a/src/solver/variable/info.h b/src/solver/variable/info.h index b8c6e0d38c..416bbd188b 100644 --- a/src/solver/variable/info.h +++ b/src/solver/variable/info.h @@ -321,7 +321,7 @@ struct VariableAccessor } template - static void ComputeStatistics(U& intermediateValues, Type& container, uint year) + static void ComputeStatistics(U& intermediateValues, Type& container, uint) { for (uint i = 0; i != container.size(); ++i) { @@ -705,13 +705,13 @@ struct VariableAccessor } template - static void ComputeSum(U&, const VarT&, uint numSpace) + static void ComputeSum(U&, const VarT&, uint) { // Do nothing } template - static void ComputeMax(U&, const VarT&, uint numSpace) + static void ComputeMax(U&, const VarT&, uint) { // Do nothing } diff --git a/src/tests/end-to-end/simple_study/simple-study.cpp b/src/tests/end-to-end/simple_study/simple-study.cpp index 2152402d87..b79eacaae0 100644 --- a/src/tests/end-to-end/simple_study/simple-study.cpp +++ b/src/tests/end-to-end/simple_study/simple-study.cpp @@ -34,12 +34,12 @@ StudyFixture::StudyFixture() cluster = addClusterToArea(area, "some cluster"); loadInArea = 7.0; - loadTSconfig = std::move(TimeSeriesConfigurer(area->load.series.timeSeries)); + loadTSconfig = TimeSeriesConfigurer(area->load.series.timeSeries); loadTSconfig.setColumnCount(1) .fillColumnWith(0, loadInArea); clusterCost = 2.; - clusterConfig = std::move(ThermalClusterConfig(cluster.get())); + clusterConfig = ThermalClusterConfig(cluster.get()); clusterConfig.setNominalCapacity(100.) .setAvailablePower(0, 50.) .setCosts(clusterCost) diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index 8fb7c49d18..cbd8895d80 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -14,7 +14,6 @@ #include #include "cluster_list.h" -const auto SEP = Yuni::IO::Separator; using namespace Antares::Data; using std::filesystem::temp_directory_path; diff --git a/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp b/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp index 50c30983f7..0ae7bba823 100644 --- a/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp +++ b/src/tests/src/solver/infeasible-problem-analysis/test-unfeasible-problem-analyzer.cpp @@ -68,7 +68,7 @@ class AnalysisMock : public UnfeasibilityAnalysis ~AnalysisMock() override = default; - void run(operations_research::MPSolver *problem) override + void run(operations_research::MPSolver *) override { hasRun_ = true; hasDetectedInfeasibilityCause_ = shouldDetectCause_; @@ -99,6 +99,7 @@ BOOST_AUTO_TEST_CASE(analyzer_should_call_analysis_and_print_detected_issues) bool hasPrinted1 = false; bool hasRun2 = false; bool hasPrinted2 = false; + // Vector is moved, iterators are invalidated. Can't hold references to element to get values. std::vector> analysis; analysis.push_back(std::make_unique(false, hasRun1, hasPrinted1)); analysis.push_back(std::make_unique(true, hasRun2, hasPrinted2)); diff --git a/src/ui/common/component/frame/local-frame.h b/src/ui/common/component/frame/local-frame.h index da8e3f3fbf..8b04b39ad9 100644 --- a/src/ui/common/component/frame/local-frame.h +++ b/src/ui/common/component/frame/local-frame.h @@ -52,7 +52,7 @@ class WxLocalFrame : public wxFrame, public IFrame virtual ~WxLocalFrame(); - virtual bool Destroy(); + virtual bool Destroy() override; virtual bool excludeFromMenu() override; virtual void updateOpenWindowsMenu() override; diff --git a/src/ui/simulator/toolbox/components/button/button.h b/src/ui/simulator/toolbox/components/button/button.h index a3b65a7176..b71033bf6b 100644 --- a/src/ui/simulator/toolbox/components/button/button.h +++ b/src/ui/simulator/toolbox/components/button/button.h @@ -191,7 +191,7 @@ class Button final : public Panel virtual void onMouseLeave() override; //! Click up - virtual void onMouseUp(wxMouseEvent& evt); + virtual void onMouseUp(wxMouseEvent& evt) override; protected: //! Preload the Icon