diff options
author | hop311 <hop3114@gmail.com> | 2024-01-08 23:20:46 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-01-09 20:07:11 +0100 |
commit | 41d35fbecc9061720625cf2d6ef2b84a3a85272a (patch) | |
tree | a7b0df56cac7a87e039e1d489ea66e64b67ccf9c /extension/src/openvic-extension/singletons/GameSingleton.cpp | |
parent | cf34ce1d7459ee91fc75e89835a8e7171fac636b (diff) |
Updated SIM submodule and switched to ordered_map
Diffstat (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/GameSingleton.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extension/src/openvic-extension/singletons/GameSingleton.cpp b/extension/src/openvic-extension/singletons/GameSingleton.cpp index e10efb3..8564d54 100644 --- a/extension/src/openvic-extension/singletons/GameSingleton.cpp +++ b/extension/src/openvic-extension/singletons/GameSingleton.cpp @@ -609,9 +609,12 @@ Error GameSingleton::_load_flag_images() { flag_types.emplace_back(std_to_godot_string_name(type)); } + flag_image_map.reserve(country_manager.get_countries().size()); + Error ret = OK; for (Country const& country : country_manager.get_countries()) { - std::map<StringName, Ref<Image>>& flag_images = flag_image_map[&country]; + ordered_map<StringName, Ref<Image>>& flag_images = flag_image_map[&country]; + flag_images.reserve(flag_types.size()); const String country_name = std_view_to_godot_string(country.get_identifier()); for (StringName const& flag_type : flag_types) { const StringName flag_path = |