Преглед на файлове

sparse_set: minor changes

Michele Caini преди 4 години
родител
ревизия
4576f27f6e
променени са 1 файла, в които са добавени 1 реда и са изтрити 6 реда
  1. 1 6
      src/entt/entity/sparse_set.hpp

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

@@ -665,12 +665,7 @@ public:
      * @return True if the entity is actually removed, false otherwise.
      * @return True if the entity is actually removed, false otherwise.
      */
      */
     bool remove(const entity_type entt, void *ud = nullptr) {
     bool remove(const entity_type entt, void *ud = nullptr) {
-        if(contains(entt)) {
-            erase(entt, ud);
-            return true;
-        }
-
-        return false;
+        return contains(entt) && (erase(entt, ud), true);
     }
     }
 
 
     /**
     /**