aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/NodeTools.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-10-31 20:29:34 +0100
committer hop311 <hop3114@gmail.com>2024-10-31 20:54:50 +0100
commitdbf58b1b1d318b4a82cf22b5b8e720c753388f4b (patch)
treed6d2be10697d6fa320f7f8da14eda45111bd9399 /src/openvic-simulation/dataloader/NodeTools.cpp
parentc763a0aedd834432b54b6e49c6bc7e1936be1131 (diff)
Load defines directly into named and typed variables rather than using an IdentifierRegistrydefines-variables
Diffstat (limited to 'src/openvic-simulation/dataloader/NodeTools.cpp')
-rw-r--r--src/openvic-simulation/dataloader/NodeTools.cpp6
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));
});
}