瀏覽代碼

sparse_set/storage: suppress shadow warnings

Michele Caini 4 年之前
父節點
當前提交
48939abafa
共有 2 個文件被更改,包括 8 次插入8 次删除
  1. 4 4
      src/entt/entity/sparse_set.hpp
  2. 4 4
      src/entt/entity/storage.hpp

+ 4 - 4
src/entt/entity/sparse_set.hpp

@@ -303,8 +303,8 @@ public:
      * @param pol Type of deletion policy.
      * @param alloc Allocator to use (possibly default-constructed).
      */
-    explicit basic_sparse_set(deletion_policy pol, const allocator_type &alloc = {})
-        : reserved{alloc, 0u},
+    explicit basic_sparse_set(deletion_policy pol, const allocator_type &allocator = {})
+        : reserved{allocator, 0u},
           sparse{alloc_ptr_traits::allocate(alloc_ptr{reserved.first()}, 0u)},
           packed{alloc_traits::allocate(reserved.first(), 0u)},
           bucket{0u},
@@ -317,8 +317,8 @@ public:
      * @brief Constructs an empty container with the given allocator.
      * @param alloc Allocator to use (possibly default-constructed).
      */
-    explicit basic_sparse_set(const allocator_type &alloc = {})
-        : basic_sparse_set{deletion_policy::swap_and_pop, alloc}
+    explicit basic_sparse_set(const allocator_type &allocator = {})
+        : basic_sparse_set{deletion_policy::swap_and_pop, allocator}
     {}
 
     /**

+ 4 - 4
src/entt/entity/storage.hpp

@@ -325,8 +325,8 @@ public:
      * @brief Default constructor.
      * @param alloc Allocator to use (possibly default-constructed).
      */
-    explicit basic_storage_impl(const allocator_type &alloc = {})
-        : underlying_type{deletion_policy{comp_traits::in_place_delete::value}, alloc},
+    explicit basic_storage_impl(const allocator_type &allocator = {})
+        : underlying_type{deletion_policy{comp_traits::in_place_delete::value}, allocator},
           packed{alloc_ptr_traits::allocate(alloc_ptr{get_allocator()}, 0u)},
           bucket{}
     {}
@@ -732,8 +732,8 @@ public:
      * @brief Default constructor.
      * @param alloc Allocator to use (possibly default-constructed).
      */
-    explicit basic_storage_impl(const allocator_type &alloc = {})
-        : underlying_type{deletion_policy{comp_traits::in_place_delete::value}, alloc}
+    explicit basic_storage_impl(const allocator_type &allocator = {})
+        : underlying_type{deletion_policy{comp_traits::in_place_delete::value}, allocator}
     {}
 
     /**