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/AssetManager.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'extension/src/openvic-extension/singletons/AssetManager.hpp') diff --git a/extension/src/openvic-extension/singletons/AssetManager.hpp b/extension/src/openvic-extension/singletons/AssetManager.hpp index 40577ad..7f73e4c 100644 --- a/extension/src/openvic-extension/singletons/AssetManager.hpp +++ b/extension/src/openvic-extension/singletons/AssetManager.hpp @@ -17,14 +17,15 @@ namespace OpenVic { godot::Ref image; godot::Ref texture; }; - using image_asset_map_t = std::map; - using font_map_t = std::map>; + /* deque_ordered_map to avoid the need to reallocate. */ + using image_asset_map_t = deque_ordered_map; + using font_map_t = deque_ordered_map>; image_asset_map_t image_assets; font_map_t fonts; static godot::Ref _load_image(godot::StringName const& path); - image_asset_map_t::iterator _get_image_asset(godot::StringName const& path); + image_asset_t* _get_image_asset(godot::StringName const& path); protected: static void _bind_methods(); -- cgit v1.2.3-56-ga3b1