From 41d35fbecc9061720625cf2d6ef2b84a3a85272a Mon Sep 17 00:00:00 2001 From: hop311 Date: Mon, 8 Jan 2024 22:20:46 +0000 Subject: Updated SIM submodule and switched to ordered_map --- extension/src/openvic-extension/singletons/GameSingleton.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp') 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>& flag_images = flag_image_map[&country]; + ordered_map>& 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 = -- cgit v1.2.3-56-ga3b1