mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08: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 <string_view>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
// Include FastSTL
|
||||||
|
#include <FastSTL/UnorderedMap.h>
|
||||||
|
|
||||||
// Include ankerl::unordered_dense
|
// Include ankerl::unordered_dense
|
||||||
#include <ankerl/unordered_dense.h>
|
#include <ankerl/unordered_dense.h>
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,9 @@ namespace MobileGL {
|
|||||||
using SizeT = std::size_t;
|
using SizeT = std::size_t;
|
||||||
template <typename T, SizeT N>
|
template <typename T, SizeT N>
|
||||||
using Array = std::array<T, N>;
|
using Array = std::array<T, N>;
|
||||||
template <typename Key, typename Value>
|
template <typename Key, typename T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>,
|
||||||
using UnorderedMap = ankerl::unordered_dense::map<Key, Value>;
|
class Allocator = std::allocator<std::pair<const Key, T>>>
|
||||||
|
using UnorderedMap = FastSTL::unordered_map<Key, T, Hash, KeyEqual, Allocator>;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline constexpr std::remove_reference_t<T>&& Move(T&& t) noexcept {
|
inline constexpr std::remove_reference_t<T>&& Move(T&& t) noexcept {
|
||||||
return static_cast<std::remove_reference_t<T>&&>(t);
|
return static_cast<std::remove_reference_t<T>&&>(t);
|
||||||
|
|||||||
Reference in New Issue
Block a user