aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r--src/openvic-simulation/economy/Good.cpp4
-rw-r--r--src/openvic-simulation/economy/ProductionType.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp
index f1da8bd..8a04e39 100644
--- a/src/openvic-simulation/economy/Good.cpp
+++ b/src/openvic-simulation/economy/Good.cpp
@@ -112,8 +112,8 @@ bool GoodManager::load_goods_file(ast::NodeCPtr root) {
[this, good_category](std::string_view key, ast::NodeCPtr value) -> bool {
colour_t colour = NULL_COLOUR;
Good::price_t base_price;
- bool available_from_start, tradeable = true;
- bool money, overseas_penalty = false;
+ bool available_from_start = true, tradeable = true;
+ bool money = false, overseas_penalty = false;
bool ret = expect_dictionary_keys(
"color", ONE_EXACTLY, expect_colour(assign_variable_callback(colour)),
diff --git a/src/openvic-simulation/economy/ProductionType.cpp b/src/openvic-simulation/economy/ProductionType.cpp
index 4ea7967..40ac2a3 100644
--- a/src/openvic-simulation/economy/ProductionType.cpp
+++ b/src/openvic-simulation/economy/ProductionType.cpp
@@ -264,10 +264,12 @@ bool ProductionTypeManager::load_production_types_file(GoodManager& good_manager
}
}
- return ret & PARSE_NODE(node) & add_production_type(
+ ret &= PARSE_NODE(node);
+ ret &= add_production_type(
key, owner, employees, type, workforce, input_goods, output_goods, value,
bonuses, efficiency, coastal, farm, mine, good_manager
);
+ return ret;
}
)(root);