From 636882316b5191931e144212d93665c10859ac95 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Fri, 7 Mar 2025 00:00:43 +0100 Subject: Some work on clang-tidy-ing things up --- asl/containers/hash_set.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'asl/containers/hash_set.hpp') diff --git a/asl/containers/hash_set.hpp b/asl/containers/hash_set.hpp index 61346fa..02a8036 100644 --- a/asl/containers/hash_set.hpp +++ b/asl/containers/hash_set.hpp @@ -75,7 +75,7 @@ protected: constexpr isize_t max_size() const { // Max load factor is 75% - return (m_capacity >> 1) + (m_capacity >> 2); + return (m_capacity >> 1) + (m_capacity >> 2); // NOLINT(*-signed-bitwise) } static isize_t size_to_capacity(isize_t size) @@ -131,8 +131,8 @@ protected: { ASL_ASSERT(new_capacity >= kMinCapacity && is_pow2(new_capacity) && new_capacity > m_capacity); - auto* new_tags = reinterpret_cast(m_allocator.alloc(layout::array(new_capacity))); - auto* new_values = reinterpret_cast*>(m_allocator.alloc(layout::array>(new_capacity))); + auto* new_tags = static_cast(m_allocator.alloc(layout::array(new_capacity))); + auto* new_values = static_cast*>(m_allocator.alloc(layout::array>(new_capacity))); asl::memzero(new_tags, new_capacity); isize_t new_size = 0; @@ -228,7 +228,6 @@ protected: result.tag = static_cast(hash & kHashMask) | kHasValue; // NOLINTBEGIN(*-pointer-arithmetic) - for ( isize_t i = starting_index; i != starting_index || result.first_available_index < 0; -- cgit