Skip to content

Commit

Permalink
group: drop deprecated member sort_as
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Jan 22, 2024
1 parent 8962212 commit 406ba3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/entt/entity/group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,14 +656,6 @@ class basic_group<owned_t<>, get_t<Get...>, exclude_t<Exclude...>> {
}
}

/**
* @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:
handler *descriptor;
};
Expand Down
3 changes: 2 additions & 1 deletion test/entt/entity/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ TEST(NonOwningGroup, SortAsAPool) {
}

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<0, 1>(e1)), (std::make_tuple(1, 1u)));
Expand Down

0 comments on commit 406ba3c

Please sign in to comment.