sparse_set: drop deprecated member at
This commit is contained in:
@@ -749,15 +749,6 @@ public:
|
||||
return static_cast<size_type>(traits_type::to_entity(sparse_ref(entt)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the entity at specified location, with bounds checking.
|
||||
* @param pos The position for which to return the entity.
|
||||
* @return The entity at specified location if any, a null entity otherwise.
|
||||
*/
|
||||
[[deprecated("use .begin()[pos] instead")]] [[nodiscard]] entity_type at(const size_type pos) const noexcept {
|
||||
return pos < packed.size() ? packed[pos] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the entity at specified location, without bounds checking.
|
||||
* @param pos The position for which to return the entity.
|
||||
|
||||
@@ -951,23 +951,12 @@ TYPED_TEST(SparseSet, Indexing) {
|
||||
for(const auto policy: this->deletion_policy) {
|
||||
sparse_set_type set{policy};
|
||||
|
||||
ASSERT_EQ(set.size(), 0u);
|
||||
const std::array entity{entity_type{1}, entity_type{2}};
|
||||
|
||||
ASSERT_EQ(set.at(0u), static_cast<entity_type>(entt::null)); // NOLINT
|
||||
ASSERT_EQ(set.at(3u), static_cast<entity_type>(entt::null)); // NOLINT
|
||||
set.push(entity.begin(), entity.end());
|
||||
|
||||
const entity_type entity{1};
|
||||
const entity_type other{2};
|
||||
|
||||
set.push(entity);
|
||||
set.push(other);
|
||||
|
||||
ASSERT_EQ(set.size(), 2u);
|
||||
|
||||
ASSERT_EQ(set.at(0u), entity); // NOLINT
|
||||
ASSERT_EQ(set.at(1u), other); // NOLINT
|
||||
|
||||
ASSERT_EQ(set.at(2u), static_cast<entity_type>(entt::null)); // NOLINT
|
||||
ASSERT_EQ(set[0u], entity[0u]);
|
||||
ASSERT_EQ(set[1u], entity[1u]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user