sparse_set/storage: avoid virtual erase

This commit is contained in:
Michele Caini
2020-09-25 17:09:07 +02:00
parent f7e80879ae
commit a22efb25c6
2 changed files with 2 additions and 2 deletions

View File

@@ -425,7 +425,7 @@ public:
*
* @param entt A valid entity identifier.
*/
virtual void erase(const entity_type entt) {
void erase(const entity_type entt) {
ENTT_ASSERT(contains(entt));
const auto curr = page(entt);
const auto pos = offset(entt);

View File

@@ -424,7 +424,7 @@ public:
*
* @param entt A valid entity identifier.
*/
void erase(const entity_type entt) override {
void erase(const entity_type entt) {
auto other = std::move(instances.back());
instances[underlying_type::index(entt)] = std::move(other);
instances.pop_back();