Browse Source

container: suppress a few shadow warnings

Michele Caini 3 years ago
parent
commit
afd91b4e5a
2 changed files with 32 additions and 32 deletions
  1. 16 16
      src/entt/container/dense_map.hpp
  2. 16 16
      src/entt/container/dense_set.hpp

+ 16 - 16
src/entt/container/dense_map.hpp

@@ -384,35 +384,35 @@ public:
     /**
     /**
      * @brief Constructs an empty container with a given allocator and user
      * @brief Constructs an empty container with a given allocator and user
      * supplied minimal number of buckets.
      * supplied minimal number of buckets.
-     * @param bucket_count Minimal number of buckets.
+     * @param cnt Minimal number of buckets.
      * @param allocator The allocator to use.
      * @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
      * @brief Constructs an empty container with a given allocator, hash
      * function and user supplied minimal number of buckets.
      * 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 hash Hash function to use.
      * @param allocator The allocator 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
      * @brief Constructs an empty container with a given allocator, hash
      * function, compare function and user supplied minimal number of buckets.
      * 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 hash Hash function to use.
      * @param equal Compare function to use.
      * @param equal Compare function to use.
      * @param allocator The allocator 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},
         : sparse{allocator, hash},
           packed{allocator, equal},
           packed{allocator, equal},
           threshold{default_threshold} {
           threshold{default_threshold} {
-        rehash(bucket_count);
+        rehash(cnt);
     }
     }
 
 
     /*! @brief Default copy constructor. */
     /*! @brief Default copy constructor. */
@@ -984,10 +984,10 @@ public:
     /**
     /**
      * @brief Reserves at least the specified number of buckets and regenerates
      * @brief Reserves at least the specified number of buckets and regenerates
      * the hash table.
      * 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_type>(size() / max_load_factor());
         const auto cap = static_cast<size_type>(size() / max_load_factor());
         value = value > cap ? value : cap;
         value = value > cap ? value : cap;
 
 
@@ -1008,11 +1008,11 @@ public:
     /**
     /**
      * @brief Reserves space for at least the specified number of elements and
      * @brief Reserves space for at least the specified number of elements and
      * regenerates the hash table.
      * 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<size_type>(std::ceil(count / max_load_factor())));
+    void reserve(const size_type cnt) {
+        packed.first().reserve(cnt);
+        rehash(static_cast<size_type>(std::ceil(cnt / max_load_factor())));
     }
     }
 
 
     /**
     /**

+ 16 - 16
src/entt/container/dense_set.hpp

@@ -330,35 +330,35 @@ public:
     /**
     /**
      * @brief Constructs an empty container with a given allocator and user
      * @brief Constructs an empty container with a given allocator and user
      * supplied minimal number of buckets.
      * supplied minimal number of buckets.
-     * @param bucket_count Minimal number of buckets.
+     * @param cnt Minimal number of buckets.
      * @param allocator The allocator to use.
      * @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
      * @brief Constructs an empty container with a given allocator, hash
      * function and user supplied minimal number of buckets.
      * 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 hash Hash function to use.
      * @param allocator The allocator 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
      * @brief Constructs an empty container with a given allocator, hash
      * function, compare function and user supplied minimal number of buckets.
      * 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 hash Hash function to use.
      * @param equal Compare function to use.
      * @param equal Compare function to use.
      * @param allocator The allocator 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},
         : sparse{allocator, hash},
           packed{allocator, equal},
           packed{allocator, equal},
           threshold{default_threshold} {
           threshold{default_threshold} {
-        rehash(bucket_count);
+        rehash(cnt);
     }
     }
 
 
     /*! @brief Default copy constructor. */
     /*! @brief Default copy constructor. */
@@ -837,10 +837,10 @@ public:
     /**
     /**
      * @brief Reserves at least the specified number of buckets and regenerates
      * @brief Reserves at least the specified number of buckets and regenerates
      * the hash table.
      * 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_type>(size() / max_load_factor());
         const auto cap = static_cast<size_type>(size() / max_load_factor());
         value = value > cap ? value : cap;
         value = value > cap ? value : cap;
 
 
@@ -861,11 +861,11 @@ public:
     /**
     /**
      * @brief Reserves space for at least the specified number of elements and
      * @brief Reserves space for at least the specified number of elements and
      * regenerates the hash table.
      * 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<size_type>(std::ceil(count / max_load_factor())));
+    void reserve(const size_type cnt) {
+        packed.first().reserve(cnt);
+        rehash(static_cast<size_type>(std::ceil(cnt / max_load_factor())));
     }
     }
 
 
     /**
     /**