From 5d092bcb18ec5697a490365a0f70eddd9348fce9 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 24 Mar 2023 16:35:22 +0100 Subject: [PATCH] snapshot: avoid unnecessary lookups --- src/entt/entity/snapshot.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entt/entity/snapshot.hpp b/src/entt/entity/snapshot.hpp index e39d983c9..ef208198b 100644 --- a/src/entt/entity/snapshot.hpp +++ b/src/entt/entity/snapshot.hpp @@ -37,7 +37,7 @@ class basic_snapshot { archive(static_cast(sz)); for(auto it = first; it != last; ++it) { - if(reg->template all_of(*it)) { + if(view.contains(*it)) { std::apply(archive, std::tuple_cat(std::make_tuple(*it), view.get(*it))); } }