aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/singletons/GameSingleton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp')
-rw-r--r--extension/src/openvic-extension/singletons/GameSingleton.cpp5
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 =