Skip to content

Commit

Permalink
Use clang-format 18.1.3 (1)
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Jun 25, 2024
1 parent 410ba6c commit f366bbb
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 36 deletions.
3 changes: 1 addition & 2 deletions src/analyzer/atsp/preflight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,7 @@ bool ATSP::preflight(const uint areaIndex)
//
f << "[general]"
<< "\ndistribution = " << Data::XCast::DistributionToNameID(info.distribution)
<< "\ncapacity = 1"
<< "\nconversion = false";
<< "\ncapacity = 1" << "\nconversion = false";
if (info.rawData)
{
f << "\ntranslation = never\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class SimulationInfoCollector
{
public:
SimulationInfoCollector(const OptimizationInfo& optInfo):
opt_info_(optInfo) {};
opt_info_(optInfo){};

void toFileContent(FileContent& file_content);

Expand Down
3 changes: 1 addition & 2 deletions src/libs/antares/date/date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,7 @@ static inline DayOfTheWeek NextDayOfTheWeek(DayOfTheWeek weekday)
void Calendar::reset()
{
#ifndef NDEBUG
logs.debug() << " reset calendar"
<< ", month : " << MonthToString(settings_.firstMonth)
logs.debug() << " reset calendar" << ", month : " << MonthToString(settings_.firstMonth)
<< ", january 1rst : " << DayOfTheWeekToString(settings_.weekday1rstJanuary)
<< ", first weekday : " << DayOfTheWeekToString(settings_.weekFirstDay);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/libs/antares/study/area/links.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ bool AreaLinksInternalLoadFromProperty(AreaLink& link, const String& key, const
uint indirect)
{
logs.error() << "Link (" << link.from->name << "/" << link.with->name << "): Found " << direct
<< " direct TS "
<< " and " << indirect << " indirect TS, expected the same number";
<< " direct TS " << " and " << indirect
<< " indirect TS, expected the same number";
throw Antares::Error::ReadingStudy();
}
} // anonymous namespace
Expand Down
9 changes: 3 additions & 6 deletions src/libs/antares/study/cleaner/cleaner-v20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,16 @@ void listOfFilesAnDirectoriesToKeepForLinks(PathList& p, const Area* area, Strin
auto& link = *(i->second);
// Parameters
buffer.clear() << "input" << SEP << "links" << SEP << link.from->id << SEP << link.with->id
<< "_parameters"
<< ".txt";
<< "_parameters" << ".txt";
p.add(buffer);

// Indirect capacities
buffer.clear() << "input" << SEP << "links" << SEP << link.from->id << SEP << "capacities"
<< SEP << link.with->id << "_direct"
<< ".txt";
<< SEP << link.with->id << "_direct" << ".txt";
p.add(buffer);
// Direct capacities
buffer.clear() << "input" << SEP << "links" << SEP << link.from->id << SEP << "capacities"
<< SEP << link.with->id << "_indirect"
<< ".txt";
<< SEP << link.with->id << "_indirect" << ".txt";
p.add(buffer);
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/libs/antares/study/layerdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ bool LayerData::saveLayers(const AnyString& filename)
}

data << "[activeLayer]\n";
data << "activeLayerID"
<< " = " << activeLayerID;
data << "activeLayerID" << " = " << activeLayerID;
data << '\n';
data << "showAllLayer"
<< " = " << showAllLayer;
data << "showAllLayer" << " = " << showAllLayer;

file << data;

Expand Down
4 changes: 2 additions & 2 deletions src/libs/antares/study/parts/hydro/finalLevelValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ bool FinalLevelValidator::hydroAllocationStartMatchesSimulation() const
return true;
}

logs.error() << "Year " << year_ + 1 << ", area '" << areaName_ << "' : "
<< "Hydro allocation must start on the 1st simulation month and "
logs.error() << "Year " << year_ + 1 << ", area '" << areaName_
<< "' : " << "Hydro allocation must start on the 1st simulation month and "
<< "simulation last a whole year";
return false;
}
Expand Down
10 changes: 4 additions & 6 deletions src/libs/antares/study/parts/short-term-storage/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,20 @@ bool Properties::validate()
}
if (reservoirCapacity < 0)
{
logs.error() << "Property reservoircapacity must be >= 0 "
<< "for short term storage " << name;
logs.error() << "Property reservoircapacity must be >= 0 " << "for short term storage "
<< name;
return false;
}

if (efficiencyFactor < 0)
{
logs.warning() << "Property efficiency must be >= 0 "
<< "for short term storage " << name;
logs.warning() << "Property efficiency must be >= 0 " << "for short term storage " << name;
efficiencyFactor = 0;
}

if (efficiencyFactor > 1)
{
logs.warning() << "Property efficiency must be <= 1 "
<< "for short term storage " << name;
logs.warning() << "Property efficiency must be <= 1 " << "for short term storage " << name;
efficiencyFactor = 1;
}

Expand Down
5 changes: 2 additions & 3 deletions src/solver/hydro/management/monthly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,8 @@ void HydroManagement::prepareMonthlyOptimalGenerations(double* random_reservoir_
writeSolutionCost("Solution cost (noised) : ", solutionCostNoised);
buffer << "\n\n";

buffer << '\t' << "\tInflows" << '\t' << "\tTarget Gen."
<< "\tTurbined"
<< "\tLevels" << '\t' << "\tLvl min" << '\t' << "\tLvl max\n";
buffer << '\t' << "\tInflows" << '\t' << "\tTarget Gen." << "\tTurbined" << "\tLevels"
<< '\t' << "\tLvl min" << '\t' << "\tLvl max\n";
for (uint month = 0; month != 12; ++month)
{
uint realmonth = (initReservoirLvlMonth + month) % 12;
Expand Down
3 changes: 1 addition & 2 deletions src/solver/simulation/timeseries-numbers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ bool checkInterModalConsistencyForArea(const Area& area,
{
logs.error()
<< "Inter-modal correlation: time-series numbers of inter-modal modes in area '"
<< area.name << "'"
<< " are not identical";
<< area.name << "'" << " are not identical";

return false;
}
Expand Down
12 changes: 6 additions & 6 deletions src/tests/src/libs/antares/array/matrix-bypass-load.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ class Matrix_load_bypass: public Matrix_easy_to_fill<T, ReadWriteT>
public:
Matrix_load_bypass():
Matrix_easy_to_fill<T, ReadWriteT>(),
loadFromCSVFile_called(false) {};
loadFromCSVFile_called(false){};

Matrix_load_bypass(uint height, uint width):
Matrix_easy_to_fill<T, ReadWriteT>(height, width),
loadFromCSVFile_called(false) {};
loadFromCSVFile_called(false){};

Matrix_load_bypass(uint height, uint width, const vector<T>& vec):
Matrix_easy_to_fill<T, ReadWriteT>(height, width, vec),
loadFromCSVFile_called(false) {};
loadFromCSVFile_called(false){};

bool loadFromCSVFile(const AnyString& /* filename */,
uint /* minWidth */,
Expand Down Expand Up @@ -128,15 +128,15 @@ class Matrix_mock_load_to_buffer: public Matrix<T, ReadWriteT>
public:
Matrix_mock_load_to_buffer():
Matrix<T, ReadWriteT>(),
fake_mtx_error_when_loading_(IO::errNone) {};
fake_mtx_error_when_loading_(IO::errNone){};

Matrix_mock_load_to_buffer(uint height, uint width):
Matrix<T, ReadWriteT>(height, width),
fake_mtx_error_when_loading_(IO::errNone) {};
fake_mtx_error_when_loading_(IO::errNone){};

Matrix_mock_load_to_buffer(uint height, uint width, const vector<T>& vec):
Matrix<T, ReadWriteT>(height, width, vec),
fake_mtx_error_when_loading_(IO::errNone) {};
fake_mtx_error_when_loading_(IO::errNone){};

IO::Error loadFromFileToBuffer(typename Matrix<T, ReadWriteT>::BufferType& /* buffer */,
const AnyString& /* filename */) const override
Expand Down

0 comments on commit f366bbb

Please sign in to comment.