From 39d429e49705fe153a20dfb27421f1246237a683 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 8 Mar 2022 15:10:48 +0100 Subject: Change some math macros to constexpr Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`. --- core/templates/oa_hash_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/templates') diff --git a/core/templates/oa_hash_map.h b/core/templates/oa_hash_map.h index c91d27ebe1..4e712fccf2 100644 --- a/core/templates/oa_hash_map.h +++ b/core/templates/oa_hash_map.h @@ -145,7 +145,7 @@ private: uint32_t old_capacity = capacity; // Capacity can't be 0. - capacity = MAX(1, p_new_capacity); + capacity = MAX(1u, p_new_capacity); TKey *old_keys = keys; TValue *old_values = values; @@ -367,7 +367,7 @@ public: OAHashMap(uint32_t p_initial_capacity = 64) { // Capacity can't be 0. - capacity = MAX(1, p_initial_capacity); + capacity = MAX(1u, p_initial_capacity); keys = static_cast(Memory::alloc_static(sizeof(TKey) * capacity)); values = static_cast(Memory::alloc_static(sizeof(TValue) * capacity)); -- cgit v1.2.3