Explorar o código

sparse_set: minor changes

Michele Caini %!s(int64=4) %!d(string=hai) anos
pai
achega
4576f27f6e
Modificáronse 1 ficheiros con 1 adicións e 6 borrados
  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.
      */
     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);
     }
 
     /**