Browse Source

meta: rename things to avoid confusion

Michele Caini 1 year ago
parent
commit
4e10e60c18
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/entt/meta/meta.hpp
  2. 1 1
      src/entt/meta/node.hpp

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

@@ -844,7 +844,7 @@ struct meta_custom {
      */
     template<typename Type>
     [[nodiscard]] operator const Type *() const noexcept {
-        return (type_id<Type>().hash() == node.type) ? std::static_pointer_cast<Type>(node.data).get() : nullptr;
+        return (type_id<Type>().hash() == node.type) ? std::static_pointer_cast<Type>(node.value).get() : nullptr;
     }
 
     /**
@@ -854,7 +854,7 @@ struct meta_custom {
     template<typename Type>
     [[nodiscard]] operator const Type &() const noexcept {
         ENTT_ASSERT(type_id<Type>().hash() == node.type, "Invalid type");
-        return *std::static_pointer_cast<Type>(node.data);
+        return *std::static_pointer_cast<Type>(node.value);
     }
 
 private:

+ 1 - 1
src/entt/meta/node.hpp

@@ -62,7 +62,7 @@ struct meta_type_node;
 
 struct meta_custom_node {
     id_type type{};
-    std::shared_ptr<void> data{};
+    std::shared_ptr<void> value{};
 };
 
 struct meta_prop_node {