Browse Source

storage: entity storage no longer has component traits exposed

Michele Caini 2 years ago
parent
commit
4e7368f79a
2 changed files with 3 additions and 5 deletions
  1. 0 2
      src/entt/entity/storage.hpp
  2. 3 3
      test/entt/entity/view.cpp

+ 0 - 2
src/entt/entity/storage.hpp

@@ -979,8 +979,6 @@ public:
     using base_type = basic_sparse_set<Entity, Allocator>;
     /*! @brief Type of the objects assigned to entities. */
     using value_type = Entity;
-    /*! @brief Component traits. */
-    using traits_type = component_traits<value_type>;
     /*! @brief Underlying entity identifier. */
     using entity_type = Entity;
     /*! @brief Unsigned integer type. */

+ 3 - 3
test/entt/entity/view.cpp

@@ -580,7 +580,7 @@ TEST(SingleComponentView, StorageEntity) {
 
     registry.destroy(entity, entt::to_version(entity));
 
-    ASSERT_EQ(view.size(), 2u);
+    ASSERT_EQ(view.size_hint(), 2u);
     ASSERT_NE(view.begin(), view.end());
 
     // returns all matching identifiers, both in-use and available ones
@@ -589,8 +589,8 @@ TEST(SingleComponentView, StorageEntity) {
     ASSERT_EQ(*(++view.begin()), other);
 
     // skips available identifiers automatically, only returns in-use elements
-    for(auto [entt]: view.each()) {
-        ASSERT_EQ(entt, other);
+    for(auto elem: view.each()) {
+        ASSERT_EQ(std::get<0>(elem), other);
     }
 
     // skips available identifiers automatically, only returns in-use elements