diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-04-24 16:49:12 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-04-24 16:49:12 +0200 |
commit | 14c582bca81046fdde35e16088ddfd5df0136d56 (patch) | |
tree | bd80c9fc27e749cb3c03010a1bcb31ae9c8d3a84 | |
parent | 9098698d17c85601fd8f807ddd29d6a6d9db2f4a (diff) | |
parent | 723f2f342f18b02501bc68dca4e47f7064963817 (diff) | |
download | redot-engine-14c582bca81046fdde35e16088ddfd5df0136d56.tar.gz |
Merge pull request #76403 from bitsawer/reduce_hashmap_size
Optimize HashMap size
-rw-r--r-- | core/templates/hash_map.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/templates/hash_map.h b/core/templates/hash_map.h index f3944fcd0d..0b846dfaba 100644 --- a/core/templates/hash_map.h +++ b/core/templates/hash_map.h @@ -67,9 +67,9 @@ template <class TKey, class TValue, class Allocator = DefaultTypedAllocator<HashMapElement<TKey, TValue>>> class HashMap { public: - const uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime. - const float MAX_OCCUPANCY = 0.75; - const uint32_t EMPTY_HASH = 0; + static constexpr uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime. + static constexpr float MAX_OCCUPANCY = 0.75; + static constexpr uint32_t EMPTY_HASH = 0; private: Allocator element_alloc; |