diff --git a/core/include/cubos/core/reflection/type.hpp b/core/include/cubos/core/reflection/type.hpp index cf127dfd8..bf3b768fe 100644 --- a/core/include/cubos/core/reflection/type.hpp +++ b/core/include/cubos/core/reflection/type.hpp @@ -56,7 +56,8 @@ namespace cubos::core::reflection template Type& with(T trait) { - return this->with(Type::id(), new T(trait), [](void* trait) { delete static_cast(trait); }); + return this->with(Type::id(), new T(static_cast(trait)), + [](void* trait) { delete static_cast(trait); }); } /// @brief Returns whether the type has the given trait.