[Improvement] (MG_Util/Types): Use FastSTL::unordered_map as the default implementation.

This commit is contained in:
BZLZHH
2025-10-02 11:11:35 +08:00
parent 968d645d17
commit 19a965c1ef
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -33,6 +33,9 @@
#include <string_view>
#include <unordered_map>
// Include FastSTL
#include <FastSTL/UnorderedMap.h>
// Include ankerl::unordered_dense
#include <ankerl/unordered_dense.h>
+3 -2
View File
@@ -45,8 +45,9 @@ namespace MobileGL {
using SizeT = std::size_t;
template <typename T, SizeT N>
using Array = std::array<T, N>;
template <typename Key, typename Value>
using UnorderedMap = ankerl::unordered_dense::map<Key, Value>;
template <typename Key, typename T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>,
class Allocator = std::allocator<std::pair<const Key, T>>>
using UnorderedMap = FastSTL::unordered_map<Key, T, Hash, KeyEqual, Allocator>;
template <typename T>
inline constexpr std::remove_reference_t<T>&& Move(T&& t) noexcept {
return static_cast<std::remove_reference_t<T>&&>(t);