소스 검색

snapshot: avoid warnings due to deprecated functions

Michele Caini 2 년 전
부모
커밋
f6f01ef1bc
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/entt/entity/snapshot.hpp

+ 3 - 1
src/entt/entity/snapshot.hpp

@@ -211,7 +211,9 @@ public:
     basic_snapshot_loader(registry_type &source) noexcept
         : reg{&source} {
         // restoring a snapshot as a whole requires a clean registry
-        ENTT_ASSERT(reg->empty(), "Registry must be empty");
+        for([[maybe_unused]] auto elem: source.storage()) {
+            ENTT_ASSERT(elem.second.empty(), "Registry must be empty");
+        }
     }
 
     /*! @brief Default move constructor. */