Browse Source

registry: swap based move assignment operator

Michele Caini 1 year ago
parent
commit
3b4864aeae
1 changed files with 1 additions and 7 deletions
  1. 1 7
      src/entt/entity/registry.hpp

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

@@ -377,13 +377,7 @@ public:
      * @return This registry.
      * @return This registry.
      */
      */
     basic_registry &operator=(basic_registry &&other) noexcept {
     basic_registry &operator=(basic_registry &&other) noexcept {
-        vars = std::move(other.vars);
-        pools = std::move(other.pools);
-        groups = std::move(other.groups);
-        entities = std::move(other.entities);
-
-        rebind();
-
+        swap(other);
         return *this;
         return *this;
     }
     }