From 09d4bb6c4ce477dc89cd776127fee4ff69c0b83c Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 18 Apr 2026 13:40:02 +0200 Subject: [PATCH] Use unordered map to have 0(1) access time --- contrib/vcpkg | 2 +- src/tinyui.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/vcpkg b/contrib/vcpkg index 594ad88..f1fe3ac 160000 --- a/contrib/vcpkg +++ b/contrib/vcpkg @@ -1 +1 @@ -Subproject commit 594ad8871e1e8e45f8e626c015fd611163430207 +Subproject commit f1fe3acb62b7aba476e48e3395c40d88478ac444 diff --git a/src/tinyui.h b/src/tinyui.h index 2c21aa4..95534d7 100644 --- a/src/tinyui.h +++ b/src/tinyui.h @@ -30,7 +30,7 @@ SOFTWARE. #include #include #include -#include +#include #include "stb_image.h" @@ -136,7 +136,7 @@ struct Image { }; /// @brief The image cache. -using ImageCache = std::map; +using ImageCache = std::unordered_map; /// @brief A 2-dimensional vector /// @tparam T The pod template type @@ -281,7 +281,7 @@ struct Font { }; /// @brief The font cache. -using FontCache = std::map; +using FontCache = std::unordered_map; /// @brief The style struct. /// @@ -403,7 +403,7 @@ struct CallbackI { using EventCallbackArray = std::vector; /// @brief The event dispatch map. -using EventDispatchMap = std::map; +using EventDispatchMap = std::unordered_map; /// @brief Function pointer declaration for callbacks. typedef void (*tui_log_func) (LogSeverity severity, const char *message);