snapshot: minor changes

This commit is contained in:
Michele Caini
2021-07-19 15:24:12 +02:00
parent 2d92d8ee67
commit ef5c1a1099

View File

@@ -173,7 +173,7 @@ class basic_snapshot_loader {
entity_type entt{};
if constexpr(std::tuple_size_v<decltype(reg->template view<Type>().get({}))> == 0) {
if constexpr(ignore_as_empty_v<std::remove_const_t<Type>>) {
while(length--) {
archive(entt);
const auto entity = reg->valid(entt) ? entt : reg->create(entt);
@@ -392,7 +392,7 @@ class basic_continuous_loader {
entity_type entt{};
if constexpr(std::tuple_size_v<decltype(reg->template view<Other>().get({}))> == 0) {
if constexpr(ignore_as_empty_v<std::remove_const_t<Other>>) {
while(length--) {
archive(entt);
restore(entt);