Prechádzať zdrojové kódy

storage: improve asserts

Michele Caini 2 rokov pred
rodič
commit
6e4381934a
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/entt/entity/storage.hpp

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

@@ -1113,7 +1113,7 @@ public:
      */
     template<typename... Func>
     void patch([[maybe_unused]] const entity_type entt, Func &&...func) {
-        ENTT_ASSERT(base_type::contains(entt), "Storage does not contain entity");
+        ENTT_ASSERT(base_type::index(entt) < base_type::free_list(), "The requested entity is not a live one");
         (std::forward<Func>(func)(), ...);
     }