aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/Good.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/economy/Good.cpp')
-rw-r--r--src/openvic-simulation/economy/Good.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp
index 8675369..f1da8bd 100644
--- a/src/openvic-simulation/economy/Good.cpp
+++ b/src/openvic-simulation/economy/Good.cpp
@@ -97,13 +97,7 @@ bool GoodManager::load_goods_file(ast::NodeCPtr root) {
bool ret = expect_dictionary_reserve_length(
good_categories,
[this, &total_expected_goods](std::string_view key, ast::NodeCPtr value) -> bool {
- bool ret = expect_list_and_length(
- [&total_expected_goods](size_t size) -> size_t {
- total_expected_goods += size;
- return 0;
- },
- success_callback
- )(value);
+ bool ret = expect_length(add_variable_callback(total_expected_goods))(value);
ret &= add_good_category(key);
return ret;
}