diff options
Diffstat (limited to 'src/openvic-simulation/dataloader')
-rw-r--r-- | src/openvic-simulation/dataloader/NodeTools.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<Date> cal } node_callback_t NodeTools::expect_years(callback_t<Timespan> callback) { - return expect_uint<Timespan::day_t>([callback](Timespan::day_t val) -> bool { + return expect_int<Timespan::day_t>([callback](Timespan::day_t val) -> bool { return callback(Timespan::from_years(val)); }); } node_callback_t NodeTools::expect_months(callback_t<Timespan> callback) { - return expect_uint<Timespan::day_t>([callback](Timespan::day_t val) -> bool { + return expect_int<Timespan::day_t>([callback](Timespan::day_t val) -> bool { return callback(Timespan::from_months(val)); }); } node_callback_t NodeTools::expect_days(callback_t<Timespan> callback) { - return expect_uint<Timespan::day_t>([callback](Timespan::day_t val) -> bool { + return expect_int<Timespan::day_t>([callback](Timespan::day_t val) -> bool { return callback(Timespan::from_days(val)); }); } |