summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbitsawer <sawerduster@gmail.com>2023-04-24 16:17:01 +0300
committerbitsawer <sawerduster@gmail.com>2023-04-24 16:18:58 +0300
commit723f2f342f18b02501bc68dca4e47f7064963817 (patch)
treebd210390b1748a87ef3b736eed415fa9e4d13ea1
parentf178cad04a39bc40e759ef50675606b12bb07fff (diff)
downloadredot-engine-723f2f342f18b02501bc68dca4e47f7064963817.tar.gz
Optimize HashMap size
-rw-r--r--core/templates/hash_map.h6
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;