Explorar o código

snapshot: avoid unused variable warnings

Michele Caini %!s(int64=3) %!d(string=hai) anos
pai
achega
fbfde43477
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/entt/entity/snapshot.hpp

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

@@ -170,7 +170,7 @@ class basic_snapshot_loader {
                 archive(entt);
                 archive(entt);
                 const auto entity = reg->valid(entt) ? entt : reg->create(entt);
                 const auto entity = reg->valid(entt) ? entt : reg->create(entt);
                 ENTT_ASSERT(entity == entt, "Entity not available for use");
                 ENTT_ASSERT(entity == entt, "Entity not available for use");
-                reg->template emplace<Component>(entt);
+                reg->template emplace<Component>(entity);
             }
             }
         } else {
         } else {
             Component instance;
             Component instance;
@@ -179,7 +179,7 @@ class basic_snapshot_loader {
                 archive(entt, instance);
                 archive(entt, instance);
                 const auto entity = reg->valid(entt) ? entt : reg->create(entt);
                 const auto entity = reg->valid(entt) ? entt : reg->create(entt);
                 ENTT_ASSERT(entity == entt, "Entity not available for use");
                 ENTT_ASSERT(entity == entt, "Entity not available for use");
-                reg->template emplace<Component>(entt, std::move(instance));
+                reg->template emplace<Component>(entity, std::move(instance));
             }
             }
         }
         }
     }
     }