Explorar o código

registry: workaround for an issue of gcc7

Michele Caini %!s(int64=6) %!d(string=hai) anos
pai
achega
7e5edad32b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/entt/entity/registry.hpp

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

@@ -771,7 +771,7 @@ public:
     template<typename Component, typename... Func>
     template<typename Component, typename... Func>
     [[deprecated("use registry::patch instead")]]
     [[deprecated("use registry::patch instead")]]
     auto replace(const entity_type entity, Func &&... func)
     auto replace(const entity_type entity, Func &&... func)
-    -> decltype((func(std::declval<Component &>()), ...), patch<Component>(entity, std::forward<Func>(func)...)) {
+    -> decltype((func(std::declval<Component &>()), ...), assign<Component>(entity)) {
         return patch<Component>(entity, std::forward<Func>(func)...);
         return patch<Component>(entity, std::forward<Func>(func)...);
     }
     }