Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some compile warnings #2199

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading