Преглед изворни кода

meta: update meta_custom_node for consistency

skypjack пре 1 месец
родитељ
комит
72b2c5ac8e
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      src/entt/meta/meta.hpp
  2. 1 1
      src/entt/meta/node.hpp

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

@@ -756,7 +756,7 @@ struct meta_custom {
      */
      */
     template<typename Type>
     template<typename Type>
     [[nodiscard]] operator Type *() const noexcept {
     [[nodiscard]] operator Type *() const noexcept {
-        return ((node != nullptr) && (type_hash<std::remove_const_t<Type>>::value() == node->type)) ? static_cast<Type *>(node->value.get()) : nullptr;
+        return ((node != nullptr) && (type_hash<std::remove_const_t<Type>>::value() == node->id)) ? static_cast<Type *>(node->value.get()) : nullptr;
     }
     }
 
 
     /**
     /**

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

@@ -61,7 +61,7 @@ template<typename Type>
 struct meta_type_node;
 struct meta_type_node;
 
 
 struct meta_custom_node {
 struct meta_custom_node {
-    id_type type{};
+    id_type id{};
     std::shared_ptr<void> value{};
     std::shared_ptr<void> value{};
 };
 };