diff --git a/src/entt/core/any.hpp b/src/entt/core/any.hpp index f951cd29a..044282cb2 100644 --- a/src/entt/core/any.hpp +++ b/src/entt/core/any.hpp @@ -341,9 +341,9 @@ public: if(vtable && mode != any_policy::cref && *info == *other.info) { if(auto *val = other.data(); val) { return (vtable(operation::transfer, *this, val) != nullptr); - } else { - return (vtable(operation::assign, *this, std::as_const(other).data()) != nullptr); } + + return (vtable(operation::assign, *this, std::as_const(other).data()) != nullptr); } return false; @@ -453,9 +453,9 @@ template if constexpr(std::is_copy_constructible_v>>) { if(auto *const instance = any_cast>(&data); instance) { return static_cast(std::move(*instance)); - } else { - return any_cast(data); } + + return any_cast(data); } else { auto *const instance = any_cast>(&data); ENTT_ASSERT(instance, "Invalid instance");