Przeglądaj źródła

registry: a couple of extra move calls here and there

Michele Caini 3 lat temu
rodzic
commit
295f3b32e4
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/entt/entity/registry.hpp

+ 2 - 2
src/entt/entity/registry.hpp

@@ -700,7 +700,7 @@ public:
     template<typename It>
     void assign(It first, It last, const entity_type destroyed) {
         ENTT_ASSERT(!alive(), "Entities still alive");
-        epool.assign(first, last);
+        epool.assign(std::move(first), std::move(last));
         free_list = destroyed;
     }
 
@@ -839,7 +839,7 @@ public:
      */
     template<typename Type, typename It>
     void insert(It first, It last, const Type &value = {}) {
-        assure<Type>().insert(first, last, value);
+        assure<Type>().insert(std::move(first), std::move(last), value);
     }
 
     /**