meta: favor top-level conversion functions over bases lookup
This commit is contained in:
@@ -1528,6 +1528,10 @@ bool meta_any::set(const id_type id, Type &&value) {
|
||||
}
|
||||
|
||||
if(const auto *value = data(); node.details) {
|
||||
if(auto it = node.details->conv.find(type.info().hash()); it != node.details->conv.cend()) {
|
||||
return it->second.conv(*ctx, data());
|
||||
}
|
||||
|
||||
for(auto &&curr: node.details->base) {
|
||||
const auto &as_const = curr.second.type(internal::meta_context::from(*ctx)).from_void(*ctx, nullptr, curr.second.cast(value));
|
||||
|
||||
@@ -1535,10 +1539,6 @@ bool meta_any::set(const id_type id, Type &&value) {
|
||||
return other;
|
||||
}
|
||||
}
|
||||
|
||||
if(auto it = node.details->conv.find(type.info().hash()); it != node.details->conv.cend()) {
|
||||
return it->second.conv(*ctx, data());
|
||||
}
|
||||
}
|
||||
|
||||
if(node.conversion_helper && (type.is_arithmetic() || type.is_enum())) {
|
||||
|
||||
Reference in New Issue
Block a user