Przeglądaj źródła

workaround of an bug of gcc-7

Michele Caini 6 lat temu
rodzic
commit
2fc6fe442d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/entt/entity/registry.hpp

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

@@ -746,7 +746,7 @@ public:
     template<typename... Component>
     void remove_if_exists(const entity_type entity) {
         ENTT_ASSERT(valid(entity));
-        ([this, entity]() { if(auto &cpool = assure<Component>(); cpool.has(entity)) { cpool.remove(*this, entity); } }(), ...);
+        ([this, entity](auto &&cpool) { if(cpool.has(entity)) { cpool.remove(*this, entity); } }(assure<Component>()), ...);
     }
 
     /**