diff options
author | kobewi <kobewi4e@gmail.com> | 2022-03-08 15:10:48 +0100 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2022-03-09 16:24:32 +0100 |
commit | 39d429e49705fe153a20dfb27421f1246237a683 (patch) | |
tree | ce97a5171b951dc2e31ff12b84ce3a0637862ddc /core/templates | |
parent | 922348f4c00e694961a7c9717abdcd0310c11973 (diff) |
Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
Diffstat (limited to 'core/templates')
-rw-r--r-- | core/templates/oa_hash_map.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<TKey *>(Memory::alloc_static(sizeof(TKey) * capacity)); values = static_cast<TValue *>(Memory::alloc_static(sizeof(TValue) * capacity)); |