meta: always forward the context to meta_data

This commit is contained in:
Michele Caini
2022-10-09 11:34:07 +02:00
parent d2c89d2a40
commit a0e5d2c495

View File

@@ -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<meta_ctx>::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};
}
}