Browse Source

sparse_set/storage: avoid virtual erase

Michele Caini 5 years ago
parent
commit
a22efb25c6
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/entt/entity/sparse_set.hpp
  2. 1 1
      src/entt/entity/storage.hpp

+ 1 - 1
src/entt/entity/sparse_set.hpp

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

+ 1 - 1
src/entt/entity/storage.hpp

@@ -424,7 +424,7 @@ public:
      *
      *
      * @param entt A valid entity identifier.
      * @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());
         auto other = std::move(instances.back());
         instances[underlying_type::index(entt)] = std::move(other);
         instances[underlying_type::index(entt)] = std::move(other);
         instances.pop_back();
         instances.pop_back();