Skip to content

Commit

Permalink
Remove some compile warnings (#2199)
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin authored Jun 26, 2024
1 parent fc04d70 commit 0348175
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 19 deletions.
3 changes: 1 addition & 2 deletions src/libs/antares/study/area/area.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ void Area::internalInitialize()

Area::Area():
reserves(fhrMax, HOURS_PER_YEAR),
miscGen(fhhMax, HOURS_PER_YEAR),
hydro(*this)
miscGen(fhhMax, HOURS_PER_YEAR)
{
internalInitialize();
}
Expand Down
3 changes: 1 addition & 2 deletions src/libs/antares/study/include/antares/study/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ class Parameters final
** \return True if the settings have been loaded, false if at least one error has occured
*/
bool loadFromFile(const AnyString& filename,
const StudyVersion& version,
const StudyLoadOptions& options);
const StudyVersion& version);

/*!
** \brief Prepare all settings for a simulation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class PartHydro
/*!
** \brief Default Constructor
*/
PartHydro(const Data::Area& area);
PartHydro();
//! Destructor
~PartHydro();

Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ bool Study::internalLoadIni(const String& path, const StudyLoadOptions& options)
}
// Load the general data
buffer.clear() << folderSettings << SEP << "generaldata.ini";
bool errorWhileLoading = !parameters.loadFromFile(buffer, header.version, options);
bool errorWhileLoading = !parameters.loadFromFile(buffer, header.version);

parameters.validateOptions(options);

Expand Down
3 changes: 1 addition & 2 deletions src/libs/antares/study/parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1958,8 +1958,7 @@ void Parameters::saveToINI(IniFile& ini) const
}

bool Parameters::loadFromFile(const AnyString& filename,
const StudyVersion& version,
const StudyLoadOptions& options)
const StudyVersion& version)
{
// Loading the INI file
IniFile ini;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/parts/hydro/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using namespace Yuni;

namespace Antares::Data
{
PartHydro::PartHydro(const Data::Area& area) :
PartHydro::PartHydro() :
interDailyBreakdown(0.),
intraDailyModulation(2.),
intermonthlyBreakdown(0),
Expand Down
16 changes: 8 additions & 8 deletions src/libs/antares/study/parts/hydro/finalLevelValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ FinalLevelValidator::FinalLevelValidator(PartHydro& hydro,
double finalLevel,
const unsigned int year,
const unsigned int lastSimulationDay,
const unsigned int firstMonthOfSimulation)
: hydro_(hydro),
areaName_(areaName),
areaIndex_(areaIndex),
initialLevel_(initialLevel),
finalLevel_(finalLevel),
const unsigned int firstMonthOfSimulation) :
year_(year),
lastSimulationDay_(lastSimulationDay),
firstMonthOfSimulation_(firstMonthOfSimulation)
firstMonthOfSimulation_(firstMonthOfSimulation),
hydro_(hydro),
areaIndex_(areaIndex),
areaName_(areaName),
initialLevel_(initialLevel),
finalLevel_(finalLevel)
{
}

Expand Down Expand Up @@ -96,7 +96,7 @@ bool FinalLevelValidator::checkForInfeasibility()

bool FinalLevelValidator::hydroAllocationStartMatchesSimulation() const
{
int initReservoirLvlMonth = hydro_.initializeReservoirLevelDate; // month [0-11]
unsigned initReservoirLvlMonth = hydro_.initializeReservoirLevelDate; // month [0-11]
if (lastSimulationDay_ == DAYS_PER_YEAR && initReservoirLvlMonth == firstMonthOfSimulation_)
return true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ BOOST_FIXTURE_TEST_CASE(loadValid, Fixture)
options.optOptions.ortoolsSolver = "xpress";

writeValidFile();
p.loadFromFile(path.string(), version, options);
p.loadFromFile(path.string(), version);
p.validateOptions(options);
p.fixBadValues();

Expand All @@ -94,7 +94,7 @@ BOOST_FIXTURE_TEST_CASE(fixBadValue, Fixture)
BOOST_FIXTURE_TEST_CASE(invalidValues, Fixture)
{
writeInvalidFile();
BOOST_CHECK(p.loadFromFile(path.string(), version, options));
BOOST_CHECK(p.loadFromFile(path.string(), version));
p.validateOptions(options);
p.fixBadValues();

Expand Down

0 comments on commit 0348175

Please sign in to comment.