Преглед изворни кода

registry: swap based move assignment operator

Michele Caini пре 1 година
родитељ
комит
3b4864aeae
1 измењених фајлова са 1 додато и 7 уклоњено
  1. 1 7
      src/entt/entity/registry.hpp

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

@@ -377,13 +377,7 @@ public:
      * @return This registry.
      */
     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;
     }