Browse Source

meta: use the right guard

skypjack 6 tháng trước cách đây
mục cha
commit
0aa503e69e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/entt/meta/meta.hpp

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

@@ -1582,7 +1582,7 @@ bool meta_any::set(const id_type id, Type &&value) {
     if(storage.has_value(type.info())) {
     if(storage.has_value(type.info())) {
         return as_ref();
         return as_ref();
     } else if(*this) {
     } else if(*this) {
-        if(const auto &from = fetch_node(); from.conversion_helper && type.is_arithmetic() || type.is_enum()) {
+        if(const auto &from = fetch_node(); from.conversion_helper && (type.is_arithmetic() || type.is_enum())) {
             auto other = type.construct();
             auto other = type.construct();
             const auto value = from.conversion_helper(nullptr, storage.data());
             const auto value = from.conversion_helper(nullptr, storage.data());
             other.fetch_node().conversion_helper(other.storage.data(), &value);
             other.fetch_node().conversion_helper(other.storage.data(), &value);