sparse_set/storage: avoid virtual erase
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user