meta: early exit when assigning

This commit is contained in:
skypjack
2025-09-02 14:20:18 +02:00
parent 6241543fe2
commit 973f010d85

View File

@@ -1596,7 +1596,11 @@ bool meta_any::set(const id_type id, Type &&value) {
}
inline bool meta_any::assign(const meta_any &other) {
auto value = other.allow_cast({*ctx, node});
if(storage.info() == other.storage.info()) {
return storage.assign(other.storage);
}
auto value = other.allow_cast(type());
return value && storage.assign(value.storage);
}