diff options
author | Hop311 <Hop3114@gmail.com> | 2024-01-18 23:52:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 23:52:14 +0100 |
commit | c1bac9acee88a7ce1123aed3a748712fb2441762 (patch) | |
tree | 346cd26d4a74c92cb78c674242703283895aa5f4 /src/openvic-simulation/economy/BuildingType.cpp | |
parent | 75878b11821d8fd78ebdd7b0a11a82970a531616 (diff) | |
parent | e33a330129364b4bd632b2fd531a996b8c57cefb (diff) |
Merge pull request #131 from OpenVicProject/misc-changes
Parse missing variables, Logger counting, misc cleanup
Diffstat (limited to 'src/openvic-simulation/economy/BuildingType.cpp')
-rw-r--r-- | src/openvic-simulation/economy/BuildingType.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/openvic-simulation/economy/BuildingType.cpp b/src/openvic-simulation/economy/BuildingType.cpp index c9ed410..e06beea 100644 --- a/src/openvic-simulation/economy/BuildingType.cpp +++ b/src/openvic-simulation/economy/BuildingType.cpp @@ -97,13 +97,13 @@ bool BuildingTypeManager::load_buildings_file( lock_building_types(); for (BuildingType const& building_type : building_types.get_items()) { - std::string max_modifier_prefix = "max_"; - std::string min_modifier_prefix = "min_build_"; - modifier_manager.add_modifier_effect( - max_modifier_prefix.append(building_type.get_identifier()), true, ModifierEffect::format_t::INT + static constexpr std::string_view max_prefix = "max_"; + static constexpr std::string_view min_prefix = "min_build_"; + ret &= modifier_manager.add_modifier_effect( + StringUtils::append_string_views(max_prefix, building_type.get_identifier()), true, ModifierEffect::format_t::INT ); - modifier_manager.add_modifier_effect( - min_modifier_prefix.append(building_type.get_identifier()), false, ModifierEffect::format_t::INT + ret &= modifier_manager.add_modifier_effect( + StringUtils::append_string_views(min_prefix, building_type.get_identifier()), false, ModifierEffect::format_t::INT ); if (building_type.is_in_province()) { |