Sfoglia il codice sorgente

stl: std::uninitialized_fill

skypjack 3 settimane fa
parent
commit
c0c5b81993
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 1 1
      src/entt/entity/sparse_set.hpp
  2. 1 0
      src/entt/stl/memory.hpp

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

@@ -186,7 +186,7 @@ class basic_sparse_set {
             constexpr entity_type init = null;
             auto page_allocator{packed.get_allocator()};
             sparse[page] = alloc_traits::allocate(page_allocator, traits_type::page_size);
-            std::uninitialized_fill(sparse[page], sparse[page] + traits_type::page_size, init);
+            stl::uninitialized_fill(sparse[page], sparse[page] + traits_type::page_size, init);
         }
 
         return sparse[page][fast_mod(pos, traits_type::page_size)];

+ 1 - 0
src/entt/stl/memory.hpp

@@ -19,6 +19,7 @@ using std::make_unique;
 using std::pointer_traits;
 using std::shared_ptr;
 using std::static_pointer_cast;
+using std::uninitialized_fill;
 using std::unique_ptr;
 
 } // namespace entt::stl