Michele Caini 6 лет назад
Родитель
Сommit
f7e3a055fb
1 измененных файлов с 1 добавлено и 1 удалено
  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>()},