Forráskód Böngészése

sparse_set: suppress warnings due to unused expressions

Michele Caini 3 éve
szülő
commit
59f807fd02
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      src/entt/entity/sparse_set.hpp

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

@@ -975,7 +975,9 @@ public:
 
     /*! @brief Clears a sparse set. */
     void clear() {
-        empty() || (clear_all(), true);
+        if(!empty()) {
+            clear_all();
+        }
     }
 
     /**