mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 04:38:30 +09:00
[Improvement] (MG_Util/Types): Use FastSTL::unordered_map as the default implementation.
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user