Browse Source

any: remove deprecated functions

skypjack 3 months ago
parent
commit
ea3de5499e
2 changed files with 3 additions and 8 deletions
  1. 0 5
      src/entt/core/any.hpp
  2. 3 3
      test/entt/core/any.cpp

+ 0 - 5
src/entt/core/any.hpp

@@ -354,11 +354,6 @@ public:
         return *static_cast<const type_info *>(vtable(request::info, *this, nullptr));
     }
 
-    /*! @copydoc info */
-    [[deprecated("use ::info instead")]] [[nodiscard]] const type_info &type() const noexcept {
-        return info();
-    }
-
     /**
      * @brief Returns an opaque pointer to the contained instance.
      * @return An opaque pointer the contained instance, if any.

+ 3 - 3
test/entt/core/any.cpp

@@ -52,7 +52,7 @@ TEST(Any, Empty) {
     ASSERT_FALSE(any);
     ASSERT_FALSE(any.owner());
     ASSERT_EQ(any.policy(), entt::any_policy::empty);
-    ASSERT_EQ(any.type(), entt::type_id<void>());
+    ASSERT_EQ(any.info(), entt::type_id<void>());
     ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
     ASSERT_EQ(any.data(), nullptr);
 }
@@ -81,7 +81,7 @@ TEST(Any, SBO) {
     ASSERT_TRUE(any);
     ASSERT_TRUE(any.owner());
     ASSERT_EQ(any.policy(), entt::any_policy::embedded);
-    ASSERT_EQ(any.type(), entt::type_id<char>());
+    ASSERT_EQ(any.info(), entt::type_id<char>());
     ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
     ASSERT_EQ(entt::any_cast<char>(any), 'c');
 }
@@ -93,7 +93,7 @@ TEST(Any, NoSBO) {
     ASSERT_TRUE(any);
     ASSERT_TRUE(any.owner());
     ASSERT_EQ(any.policy(), entt::any_policy::dynamic);
-    ASSERT_EQ(any.type(), entt::type_id<fat>());
+    ASSERT_EQ(any.info(), entt::type_id<fat>());
     ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
     ASSERT_EQ(entt::any_cast<fat>(any), instance);
 }