Explorar el Código

sparse_set: minor changes

Michele Caini hace 4 años
padre
commit
4576f27f6e
Se han modificado 1 ficheros con 1 adiciones y 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);
     }
 
     /**