From a0e5d2c495d58ba22c3d9e1bf63cdd345aa8b09e Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sun, 9 Oct 2022 11:34:07 +0200 Subject: [PATCH] meta: always forward the context to meta_data --- src/entt/meta/meta.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index cea89b995..f3f231c7d 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -706,7 +706,7 @@ struct meta_data { * @param curr The underlying node with which to construct the instance. * @param area The context from which to search for meta types. */ - meta_data(const internal::meta_data_node &curr, const meta_ctx /* _TODO*/ &area = locator::value_or()) noexcept + meta_data(const internal::meta_data_node &curr, const meta_ctx &area) noexcept : node{&curr}, ctx{&area} {} @@ -1205,7 +1205,7 @@ public: [[nodiscard]] meta_data data(const id_type id) const { if(node.details) { if(const auto it = node.details->data.find(id); it != node.details->data.cend()) { - return it->second; + return meta_data{it->second, *ctx}; } }