Bläddra i källkod

group: drop deprecated member sort_as

Michele Caini 2 år sedan
förälder
incheckning
406ba3cb7d
2 ändrade filer med 2 tillägg och 9 borttagningar
  1. 0 8
      src/entt/entity/group.hpp
  2. 2 1
      test/entt/entity/group.cpp

+ 0 - 8
src/entt/entity/group.hpp

@@ -656,14 +656,6 @@ public:
         }
         }
     }
     }
 
 
-    /**
-     * @brief Sort entities according to their order in a range.
-     * @param other The storage to use to impose the order.
-     */
-    [[deprecated("use iterator based sort_as instead")]] void sort_as(const common_type &other) const {
-        sort_as(other.begin(), other.end());
-    }
-
 private:
 private:
     handler *descriptor;
     handler *descriptor;
 };
 };

+ 2 - 1
test/entt/entity/group.cpp

@@ -320,7 +320,8 @@ TEST(NonOwningGroup, SortAsAPool) {
     }
     }
 
 
     registry.sort<unsigned int>(std::less<unsigned int>{});
     registry.sort<unsigned int>(std::less<unsigned int>{});
-    group.sort_as(*group.storage<unsigned int>()); // NOLINT
+    const entt::sparse_set &other = *group.storage<unsigned int>();
+    group.sort_as(other.begin(), other.end());
 
 
     ASSERT_EQ((group.get<const int, unsigned int>(e0)), (std::make_tuple(0, 0u)));
     ASSERT_EQ((group.get<const int, unsigned int>(e0)), (std::make_tuple(0, 0u)));
     ASSERT_EQ((group.get<0, 1>(e1)), (std::make_tuple(1, 1u)));
     ASSERT_EQ((group.get<0, 1>(e1)), (std::make_tuple(1, 1u)));