Explorar el Código

registry: minor changes

Michele Caini hace 4 años
padre
commit
1ddad3577c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/entt/entity/registry.hpp

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

@@ -198,7 +198,7 @@ struct registry_context {
     template<typename Type>
     [[nodiscard]] bool contains(const id_type id = type_id<Type>().hash()) const {
         const auto it = data.find(id);
-        return it != data.end() && it->second.type() == type_id<Type>();
+        return it != data.cend() && it->second.type() == type_id<Type>();
     }
 
 private: