meta: rename things to avoid confusion

This commit is contained in:
Michele Caini
2024-07-25 12:32:11 +02:00
parent 8b5fd1ff2e
commit 4e10e60c18
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -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 {