Michele Caini 4 лет назад
Родитель
Сommit
ef5c1a1099
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/entt/entity/snapshot.hpp

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

@@ -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);