From f11b844c7b1f24c81e5a73ece538d6fbd648d990 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Tue, 15 Oct 2024 13:01:00 +0200 Subject: [PATCH] more rm useless conversion --- src/solver/hydro/management/daily.cpp | 4 ++-- src/solver/hydro/management/monthly.cpp | 2 +- src/solver/ts-generator/hydro.cpp | 4 ++-- src/solver/ts-generator/xcast/xcast.cpp | 2 +- src/solver/variable/surveyresults/surveyresults.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/solver/hydro/management/daily.cpp b/src/solver/hydro/management/daily.cpp index 8bf59df763..ee11407f1f 100644 --- a/src/solver/hydro/management/daily.cpp +++ b/src/solver/hydro/management/daily.cpp @@ -141,7 +141,7 @@ struct DebugData buffer << '\n'; } auto buffer_str = buffer.str(); - pWriter.addEntryFromBuffer(path.string(), buffer_str); + pWriter.addEntryFromBuffer(path, buffer_str); } void writeDailyDebugData(const Date::Calendar& calendar, @@ -210,7 +210,7 @@ struct DebugData } } auto buffer_str = buffer.str(); - pWriter.addEntryFromBuffer(path.string(), buffer_str); + pWriter.addEntryFromBuffer(path, buffer_str); } }; diff --git a/src/solver/hydro/management/monthly.cpp b/src/solver/hydro/management/monthly.cpp index 62658e277d..0b004a11ef 100644 --- a/src/solver/hydro/management/monthly.cpp +++ b/src/solver/hydro/management/monthly.cpp @@ -304,7 +304,7 @@ void HydroManagement::prepareMonthlyOptimalGenerations(const double* random_rese buffer << '\n'; } auto content = buffer.str(); - resultWriter_.addEntryFromBuffer(path.string(), content); + resultWriter_.addEntryFromBuffer(path, content); } indexArea++; }); diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index 1b677d8aef..ece387df29 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -291,11 +291,11 @@ bool GenerateHydroTimeSeries(Data::Study& study, uint currentYear, Solver::IResu std::string buffer; area.hydro.series->ror.timeSeries.saveToBuffer(buffer, precision); fs::path outputFile = outputFolder / "ror.txt"; - writer.addEntryFromBuffer(outputFile.string(), buffer); + writer.addEntryFromBuffer(outputFile, buffer); area.hydro.series->storage.timeSeries.saveToBuffer(buffer, precision); outputFile = outputFolder / "storage.txt"; - writer.addEntryFromBuffer(outputFile.string(), buffer); + writer.addEntryFromBuffer(outputFile, buffer); ++progression; }); diff --git a/src/solver/ts-generator/xcast/xcast.cpp b/src/solver/ts-generator/xcast/xcast.cpp index 0038e8c197..7af0d35da5 100644 --- a/src/solver/ts-generator/xcast/xcast.cpp +++ b/src/solver/ts-generator/xcast/xcast.cpp @@ -78,7 +78,7 @@ void XCast::exportTimeSeriesToTheOutput(Progression::Task& progression, Predicat std::string buffer; predicate.matrix(area).saveToBuffer(buffer); - pWriter.addEntryFromBuffer(filename.string(), buffer); + pWriter.addEntryFromBuffer(filename, buffer); ++progression; }); diff --git a/src/solver/variable/surveyresults/surveyresults.cpp b/src/solver/variable/surveyresults/surveyresults.cpp index 6a89d2cb14..4b460e85f5 100644 --- a/src/solver/variable/surveyresults/surveyresults.cpp +++ b/src/solver/variable/surveyresults/surveyresults.cpp @@ -166,7 +166,7 @@ static void ExportGridInfosAreas(const Data::Study& study, std::filesystem::path path = originalOutput; path /= "grid"; path /= filename; - writer.addEntryFromBuffer(path.string(), buffer); + writer.addEntryFromBuffer(path, buffer); }; add("areas.txt", std::move(out));