From 6edb54dc3f308c1e9b2ccb7bed21facb129ab963 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Sat, 23 Sep 2023 00:35:21 +0100 Subject: Various fixes, refactors and general cleanup --- src/openvic-simulation/economy/Good.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/openvic-simulation/economy') 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; } -- cgit v1.2.3-56-ga3b1