Просмотр исходного кода

meta: drop deprecated function key_only

Michele Caini 2 лет назад
Родитель
Сommit
d0e2edc13f
2 измененных файлов с 0 добавлено и 11 удалено
  1. 0 9
      src/entt/meta/meta.hpp
  2. 0 2
      test/entt/meta/meta_container.cpp

+ 0 - 9
src/entt/meta/meta.hpp

@@ -143,7 +143,6 @@ public:
         data = &instance;
     }
 
-    [[nodiscard]] inline bool key_only() const noexcept;
     [[nodiscard]] inline meta_type key_type() const noexcept;
     [[nodiscard]] inline meta_type mapped_type() const noexcept;
     [[nodiscard]] inline meta_type value_type() const noexcept;
@@ -1890,14 +1889,6 @@ inline meta_sequence_container::iterator meta_sequence_container::erase(iterator
     return (data != nullptr);
 }
 
-/**
- * @brief Returns true if a container is also key-only, false otherwise.
- * @return True if the associative container is also key-only, false otherwise.
- */
-[[deprecated("use mapped_type() instead")]] [[nodiscard]] inline bool meta_associative_container::key_only() const noexcept {
-    return (mapped_type_node == nullptr);
-}
-
 /**
  * @brief Returns the meta key type of a container.
  * @return The meta key type of the a container.

+ 0 - 2
test/entt/meta/meta_container.cpp

@@ -477,7 +477,6 @@ TEST(AssociativeContainer, StdMap) {
     auto view = any.as_associative_container();
 
     ASSERT_TRUE(view);
-    ASSERT_FALSE(view.key_only()); // NOLINT
     ASSERT_EQ(view.key_type(), entt::resolve<int>());
     ASSERT_EQ(view.mapped_type(), entt::resolve<char>());
     ASSERT_EQ(view.value_type(), (entt::resolve<std::pair<const int, char>>()));
@@ -521,7 +520,6 @@ TEST(AssociativeContainer, StdSet) {
     auto view = any.as_associative_container();
 
     ASSERT_TRUE(view);
-    ASSERT_TRUE(view.key_only()); // NOLINT
     ASSERT_EQ(view.key_type(), entt::resolve<int>());
     ASSERT_EQ(view.mapped_type(), entt::meta_type{});
     ASSERT_EQ(view.value_type(), entt::resolve<int>());