From dbf58b1b1d318b4a82cf22b5b8e720c753388f4b Mon Sep 17 00:00:00 2001 From: hop311 Date: Thu, 31 Oct 2024 19:29:34 +0000 Subject: Load defines directly into named and typed variables rather than using an IdentifierRegistry --- src/openvic-simulation/dataloader/NodeTools.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/openvic-simulation/dataloader') diff --git a/src/openvic-simulation/dataloader/NodeTools.cpp b/src/openvic-simulation/dataloader/NodeTools.cpp index ad130ad..b7b3e34 100644 --- a/src/openvic-simulation/dataloader/NodeTools.cpp +++ b/src/openvic-simulation/dataloader/NodeTools.cpp @@ -234,19 +234,19 @@ node_callback_t NodeTools::expect_date_identifier_or_string(callback_t cal } node_callback_t NodeTools::expect_years(callback_t callback) { - return expect_uint([callback](Timespan::day_t val) -> bool { + return expect_int([callback](Timespan::day_t val) -> bool { return callback(Timespan::from_years(val)); }); } node_callback_t NodeTools::expect_months(callback_t callback) { - return expect_uint([callback](Timespan::day_t val) -> bool { + return expect_int([callback](Timespan::day_t val) -> bool { return callback(Timespan::from_months(val)); }); } node_callback_t NodeTools::expect_days(callback_t callback) { - return expect_uint([callback](Timespan::day_t val) -> bool { + return expect_int([callback](Timespan::day_t val) -> bool { return callback(Timespan::from_days(val)); }); } -- cgit v1.2.3-56-ga3b1