From 3de8a04ebc9756c35f63fd8fbad567e6f6cccc20 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 10 Jan 2025 14:40:43 +0100 Subject: [PATCH] meta: check on key functions rather than on context validity --- src/entt/meta/meta.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 3e3e09244..95d1b6969 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -916,7 +916,7 @@ struct meta_data { * @return True if the object is valid, false otherwise. */ [[nodiscard]] explicit operator bool() const noexcept { - return (ctx != nullptr); + return (node.get != nullptr); } /** @@ -1045,7 +1045,7 @@ struct meta_func { * @return True if the object is valid, false otherwise. */ [[nodiscard]] explicit operator bool() const noexcept { - return (ctx != nullptr); + return (node.invoke != nullptr); } /*! @copydoc meta_data::operator== */ @@ -1495,7 +1495,7 @@ public: * @return True if the object is valid, false otherwise. */ [[nodiscard]] explicit operator bool() const noexcept { - return (ctx != nullptr); + return (node.info != nullptr); } /*! @copydoc meta_data::operator== */