Просмотр исходного кода

meta: always forward the context to meta_data

Michele Caini 3 лет назад
Родитель
Сommit
a0e5d2c495
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/entt/meta/meta.hpp

+ 2 - 2
src/entt/meta/meta.hpp

@@ -706,7 +706,7 @@ struct meta_data {
      * @param curr The underlying node with which to construct the instance.
      * @param curr The underlying node with which to construct the instance.
      * @param area The context from which to search for meta types.
      * @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},
         : node{&curr},
           ctx{&area} {}
           ctx{&area} {}
 
 
@@ -1205,7 +1205,7 @@ public:
     [[nodiscard]] meta_data data(const id_type id) const {
     [[nodiscard]] meta_data data(const id_type id) const {
         if(node.details) {
         if(node.details) {
             if(const auto it = node.details->data.find(id); it != node.details->data.cend()) {
             if(const auto it = node.details->data.find(id); it != node.details->data.cend()) {
-                return it->second;
+                return meta_data{it->second, *ctx};
             }
             }
         }
         }