Michele Caini пре 1 година
родитељ
комит
699dff81b7
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 2 2
      test/entt/entity/registry.cpp
  2. 1 0
      test/entt/entity/storage_no_instance.cpp

+ 2 - 2
test/entt/entity/registry.cpp

@@ -524,10 +524,10 @@ ENTT_DEBUG_TEST(RegistryDeathTest, Storage) {
     registry.storage<test::empty>("other"_hs);
     registry.storage<test::empty>("other"_hs);
 
 
     ASSERT_DEATH(registry.storage<int>("other"_hs), "");
     ASSERT_DEATH(registry.storage<int>("other"_hs), "");
-    ASSERT_DEATH(std::as_const(registry).storage<int>("other"_hs), "");
+    ASSERT_DEATH([[maybe_unused]] const auto *storage = std::as_const(registry).storage<int>("other"_hs), "");
 
 
     ASSERT_DEATH(registry.storage<entt::entity>("other"_hs), "");
     ASSERT_DEATH(registry.storage<entt::entity>("other"_hs), "");
-    ASSERT_DEATH(std::as_const(registry).storage<entt::entity>("other"_hs), "");
+    ASSERT_DEATH([[maybe_unused]] const auto *storage = std::as_const(registry).storage<entt::entity>("other"_hs), "");
 }
 }
 
 
 TEST(Registry, Identifiers) {
 TEST(Registry, Identifiers) {

+ 1 - 0
test/entt/entity/storage_no_instance.cpp

@@ -8,6 +8,7 @@
 #include <gtest/gtest.h>
 #include <gtest/gtest.h>
 #include <entt/core/iterator.hpp>
 #include <entt/core/iterator.hpp>
 #include <entt/core/type_info.hpp>
 #include <entt/core/type_info.hpp>
+#include <entt/entity/component.hpp>
 #include <entt/entity/entity.hpp>
 #include <entt/entity/entity.hpp>
 #include <entt/entity/storage.hpp>
 #include <entt/entity/storage.hpp>
 #include "../../common/config.h"
 #include "../../common/config.h"