Explorar el Código

registry: minor changes

Michele Caini hace 6 años
padre
commit
f7e3a055fb
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

@@ -191,7 +191,7 @@ class basic_registry {
         if(const auto length = pools.size(); !(index < length) || pools[index].type_id != type_info<Component>::id()) {
             for(index = {}; index < length && pools[index].type_id != type_info<Component>::id(); ++index);
 
-            if(index == pools.size()) {
+            if(index == length) {
                 pools.push_back(pool_data{
                     type_info<Component>::id(),
                     std::unique_ptr<sparse_set<entity_type>>{new pool_handler<Component>()},