Procházet zdrojové kódy

workaround of an bug of gcc-7

Michele Caini před 6 roky
rodič
revize
2fc6fe442d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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>()), ...);
     }
 
     /**