aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Dataloader.cpp
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-05-15 10:57:21 +0200
committer Spartan322 <Megacake1234@gmail.com>2024-07-07 01:11:10 +0200
commit71b846dc5dd1ac49626c8b479571050224a4cca1 (patch)
treed38d333b55e6ec42c28adf4554153aad378159fc /src/openvic-simulation/dataloader/Dataloader.cpp
parent8c8b9349e26b4f606e18810a201ff378eaac19b2 (diff)
Update OpenVicProject/OpenVic-Dataloader@4a49007dryad
Update .clang-format categories Move type_name and SelfType functioanlity to utility/Getters
Diffstat (limited to 'src/openvic-simulation/dataloader/Dataloader.cpp')
-rw-r--r--src/openvic-simulation/dataloader/Dataloader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp
index dab479f..f42a518 100644
--- a/src/openvic-simulation/dataloader/Dataloader.cpp
+++ b/src/openvic-simulation/dataloader/Dataloader.cpp
@@ -204,7 +204,7 @@ template<std::derived_from<detail::BasicParser> Parser, bool (*parse_func)(Parse
static Parser _run_ovdl_parser(fs::path const& path) {
Parser parser;
std::string buffer;
- auto error_log_stream = detail::CallbackStream {
+ auto error_log_stream = detail::make_callback_stream<char>(
[](void const* s, std::streamsize n, void* user_data) -> std::streamsize {
if (s != nullptr && n > 0 && user_data != nullptr) {
static_cast<std::string*>(user_data)->append(static_cast<char const*>(s), n);
@@ -215,7 +215,7 @@ static Parser _run_ovdl_parser(fs::path const& path) {
}
},
&buffer
- };
+ );
parser.set_error_log_to(error_log_stream);
parser.load_from_file(path);
if (!buffer.empty()) {
@@ -255,12 +255,12 @@ v2script::Parser Dataloader::parse_lua_defines(fs::path const& path) {
return _run_ovdl_parser<v2script::Parser, &_lua_parse>(path);
}
-static bool _csv_parse(csv::Windows1252Parser& parser) {
+static bool _csv_parse(csv::Parser& parser) {
return parser.parse_csv();
}
-csv::Windows1252Parser Dataloader::parse_csv(fs::path const& path) {
- return _run_ovdl_parser<csv::Windows1252Parser, &_csv_parse>(path);
+csv::Parser Dataloader::parse_csv(fs::path const& path) {
+ return _run_ovdl_parser<csv::Parser, &_csv_parse>(path);
}
v2script::Parser& Dataloader::parse_defines_cached(fs::path const& path) {