From afd91b4e5a093b6a014cf8655c57b1b40255ced5 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 10 Oct 2022 16:46:26 +0200 Subject: [PATCH] container: suppress a few shadow warnings --- src/entt/container/dense_map.hpp | 32 ++++++++++++++++---------------- src/entt/container/dense_set.hpp | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/entt/container/dense_map.hpp b/src/entt/container/dense_map.hpp index 33080fe67..df77fa147 100644 --- a/src/entt/container/dense_map.hpp +++ b/src/entt/container/dense_map.hpp @@ -384,35 +384,35 @@ public: /** * @brief Constructs an empty container with a given allocator and user * supplied minimal number of buckets. - * @param bucket_count Minimal number of buckets. + * @param cnt Minimal number of buckets. * @param allocator The allocator to use. */ - dense_map(const size_type bucket_count, const allocator_type &allocator) - : dense_map{bucket_count, hasher{}, key_equal{}, allocator} {} + dense_map(const size_type cnt, const allocator_type &allocator) + : dense_map{cnt, hasher{}, key_equal{}, allocator} {} /** * @brief Constructs an empty container with a given allocator, hash * function and user supplied minimal number of buckets. - * @param bucket_count Minimal number of buckets. + * @param cnt Minimal number of buckets. * @param hash Hash function to use. * @param allocator The allocator to use. */ - dense_map(const size_type bucket_count, const hasher &hash, const allocator_type &allocator) - : dense_map{bucket_count, hash, key_equal{}, allocator} {} + dense_map(const size_type cnt, const hasher &hash, const allocator_type &allocator) + : dense_map{cnt, hash, key_equal{}, allocator} {} /** * @brief Constructs an empty container with a given allocator, hash * function, compare function and user supplied minimal number of buckets. - * @param bucket_count Minimal number of buckets. + * @param cnt Minimal number of buckets. * @param hash Hash function to use. * @param equal Compare function to use. * @param allocator The allocator to use. */ - explicit dense_map(const size_type bucket_count, const hasher &hash = hasher{}, const key_equal &equal = key_equal{}, const allocator_type &allocator = allocator_type{}) + explicit dense_map(const size_type cnt, const hasher &hash = hasher{}, const key_equal &equal = key_equal{}, const allocator_type &allocator = allocator_type{}) : sparse{allocator, hash}, packed{allocator, equal}, threshold{default_threshold} { - rehash(bucket_count); + rehash(cnt); } /*! @brief Default copy constructor. */ @@ -984,10 +984,10 @@ public: /** * @brief Reserves at least the specified number of buckets and regenerates * the hash table. - * @param count New number of buckets. + * @param cnt New number of buckets. */ - void rehash(const size_type count) { - auto value = count > minimum_capacity ? count : minimum_capacity; + void rehash(const size_type cnt) { + auto value = cnt > minimum_capacity ? cnt : minimum_capacity; const auto cap = static_cast(size() / max_load_factor()); value = value > cap ? value : cap; @@ -1008,11 +1008,11 @@ public: /** * @brief Reserves space for at least the specified number of elements and * regenerates the hash table. - * @param count New number of elements. + * @param cnt New number of elements. */ - void reserve(const size_type count) { - packed.first().reserve(count); - rehash(static_cast(std::ceil(count / max_load_factor()))); + void reserve(const size_type cnt) { + packed.first().reserve(cnt); + rehash(static_cast(std::ceil(cnt / max_load_factor()))); } /** diff --git a/src/entt/container/dense_set.hpp b/src/entt/container/dense_set.hpp index 65b1f3238..ab5c1bbbc 100644 --- a/src/entt/container/dense_set.hpp +++ b/src/entt/container/dense_set.hpp @@ -330,35 +330,35 @@ public: /** * @brief Constructs an empty container with a given allocator and user * supplied minimal number of buckets. - * @param bucket_count Minimal number of buckets. + * @param cnt Minimal number of buckets. * @param allocator The allocator to use. */ - dense_set(const size_type bucket_count, const allocator_type &allocator) - : dense_set{bucket_count, hasher{}, key_equal{}, allocator} {} + dense_set(const size_type cnt, const allocator_type &allocator) + : dense_set{cnt, hasher{}, key_equal{}, allocator} {} /** * @brief Constructs an empty container with a given allocator, hash * function and user supplied minimal number of buckets. - * @param bucket_count Minimal number of buckets. + * @param cnt Minimal number of buckets. * @param hash Hash function to use. * @param allocator The allocator to use. */ - dense_set(const size_type bucket_count, const hasher &hash, const allocator_type &allocator) - : dense_set{bucket_count, hash, key_equal{}, allocator} {} + dense_set(const size_type cnt, const hasher &hash, const allocator_type &allocator) + : dense_set{cnt, hash, key_equal{}, allocator} {} /** * @brief Constructs an empty container with a given allocator, hash * function, compare function and user supplied minimal number of buckets. - * @param bucket_count Minimal number of buckets. + * @param cnt Minimal number of buckets. * @param hash Hash function to use. * @param equal Compare function to use. * @param allocator The allocator to use. */ - explicit dense_set(const size_type bucket_count, const hasher &hash = hasher{}, const key_equal &equal = key_equal{}, const allocator_type &allocator = allocator_type{}) + explicit dense_set(const size_type cnt, const hasher &hash = hasher{}, const key_equal &equal = key_equal{}, const allocator_type &allocator = allocator_type{}) : sparse{allocator, hash}, packed{allocator, equal}, threshold{default_threshold} { - rehash(bucket_count); + rehash(cnt); } /*! @brief Default copy constructor. */ @@ -837,10 +837,10 @@ public: /** * @brief Reserves at least the specified number of buckets and regenerates * the hash table. - * @param count New number of buckets. + * @param cnt New number of buckets. */ - void rehash(const size_type count) { - auto value = count > minimum_capacity ? count : minimum_capacity; + void rehash(const size_type cnt) { + auto value = cnt > minimum_capacity ? cnt : minimum_capacity; const auto cap = static_cast(size() / max_load_factor()); value = value > cap ? value : cap; @@ -861,11 +861,11 @@ public: /** * @brief Reserves space for at least the specified number of elements and * regenerates the hash table. - * @param count New number of elements. + * @param cnt New number of elements. */ - void reserve(const size_type count) { - packed.first().reserve(count); - rehash(static_cast(std::ceil(count / max_load_factor()))); + void reserve(const size_type cnt) { + packed.first().reserve(cnt); + rehash(static_cast(std::ceil(cnt / max_load_factor()))); } /**