Răsfoiți Sursa

registry: prepare to turn the entity pool in a plain storage

Michele Caini 3 ani în urmă
părinte
comite
04d734e76c
1 a modificat fișierele cu 1 adăugiri și 5 ștergeri
  1. 1 5
      src/entt/entity/registry.hpp

+ 1 - 5
src/entt/entity/registry.hpp

@@ -395,8 +395,6 @@ public:
           pools{std::move(other.pools)},
           pools{std::move(other.pools)},
           entities{std::move(other.entities)},
           entities{std::move(other.entities)},
           groups{std::move(other.groups)} {
           groups{std::move(other.groups)} {
-        ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a registry is not allowed");
-
         rebind();
         rebind();
     }
     }
 
 
@@ -406,8 +404,6 @@ public:
      * @return This registry.
      * @return This registry.
      */
      */
     basic_registry &operator=(basic_registry &&other) noexcept {
     basic_registry &operator=(basic_registry &&other) noexcept {
-        ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a registry is not allowed");
-
         vars = std::move(other.vars);
         vars = std::move(other.vars);
         pools = std::move(other.pools);
         pools = std::move(other.pools);
         entities = std::move(other.entities);
         entities = std::move(other.entities);
@@ -439,7 +435,7 @@ public:
      * @return The associated allocator.
      * @return The associated allocator.
      */
      */
     [[nodiscard]] constexpr allocator_type get_allocator() const noexcept {
     [[nodiscard]] constexpr allocator_type get_allocator() const noexcept {
-        return entities.get_allocator();
+        return pools.get_allocator();
     }
     }
 
 
     /**
     /**