Michele Caini преди 1 година
родител
ревизия
e262b60225
променени са 2 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 1 1
      test/entt/core/memory.cpp
  2. 4 4
      test/entt/entity/registry.cpp

+ 1 - 1
test/entt/core/memory.cpp

@@ -14,7 +14,7 @@
 
 TEST(ToAddress, Functionalities) {
     const std::shared_ptr<int> shared = std::make_shared<int>();
-    auto *plain = std::addressof(*shared);
+    auto *plain = &*shared;
 
     ASSERT_EQ(entt::to_address(shared), plain);
     ASSERT_EQ(entt::to_address(plain), plain);

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

@@ -330,7 +330,7 @@ TEST(Registry, StorageIterable) {
         testing::StaticAssertTypeEq<decltype(id), entt::id_type>();
 
         ASSERT_TRUE(pool.contains(entity));
-        ASSERT_EQ(std::addressof(storage), std::addressof(pool));
+        ASSERT_EQ(&storage, &pool);
         ASSERT_EQ(id, "other"_hs);
     }
 }
@@ -349,7 +349,7 @@ TEST(Registry, ConstStorageIterable) {
         testing::StaticAssertTypeEq<decltype(curr.first), entt::id_type>();
 
         ASSERT_TRUE(curr.second.contains(entity));
-        ASSERT_EQ(std::addressof(storage), std::addressof(curr.second));
+        ASSERT_EQ(&storage, &curr.second);
         ASSERT_EQ(curr.first, "other"_hs);
     }
 }
@@ -389,7 +389,7 @@ TEST(Registry, RegistryStorageIterator) {
     ASSERT_EQ(end + (begin - end), iterable.begin());
 
     ASSERT_EQ(begin[0u].first, iterable.begin()->first);
-    ASSERT_EQ(std::addressof(begin[0u].second), std::addressof((*iterable.begin()).second));
+    ASSERT_EQ(&begin[0u].second, &(*iterable.begin()).second);
 
     ASSERT_LT(begin, end);
     ASSERT_LE(begin, iterable.begin());
@@ -436,7 +436,7 @@ TEST(Registry, RegistryConstStorageIterator) {
     ASSERT_EQ(end + (begin - end), iterable.begin());
 
     ASSERT_EQ(begin[0u].first, iterable.begin()->first);
-    ASSERT_EQ(std::addressof(begin[0u].second), std::addressof((*iterable.begin()).second));
+    ASSERT_EQ(&begin[0u].second, &(*iterable.begin()).second);
 
     ASSERT_LT(begin, end);
     ASSERT_LE(begin, iterable.begin());