Browse Source

any: drop deprecated function owner

Michele Caini 2 years ago
parent
commit
1eb4b36643
2 changed files with 0 additions and 10 deletions
  1. 0 8
      src/entt/core/any.hpp
  2. 0 2
      test/entt/core/any.cpp

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

@@ -396,14 +396,6 @@ public:
         return basic_any{*this, any_policy::cref};
     }
 
-    /**
-     * @brief Returns true if a wrapper owns its object, false otherwise.
-     * @return True if the wrapper owns its object, false otherwise.
-     */
-    [[deprecated("use policy() and any_policy instead")]] [[nodiscard]] bool owner() const noexcept {
-        return (mode == any_policy::owner);
-    }
-
     /**
      * @brief Returns the current mode of an any object.
      * @return The current mode of the any object.

+ 0 - 2
test/entt/core/any.cpp

@@ -63,7 +63,6 @@ TEST_F(Any, SBO) {
     entt::any any{'c'};
 
     ASSERT_TRUE(any);
-    ASSERT_TRUE(any.owner()); // NOLINT
     ASSERT_EQ(any.policy(), entt::any_policy::owner);
     ASSERT_EQ(any.type(), entt::type_id<char>());
     ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
@@ -75,7 +74,6 @@ TEST_F(Any, NoSBO) {
     entt::any any{instance};
 
     ASSERT_TRUE(any);
-    ASSERT_TRUE(any.owner()); // NOLINT
     ASSERT_EQ(any.policy(), entt::any_policy::owner);
     ASSERT_EQ(any.type(), entt::type_id<fat>());
     ASSERT_EQ(entt::any_cast<double>(&any), nullptr);