Browse Source

meta: explicit check to avoid warnings due to implicit conversions

Michele Caini 1 năm trước cách đây
mục cha
commit
3b371e9e52
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

@@ -1156,7 +1156,7 @@ public:
      * @return The type info object of the underlying type.
      */
     [[nodiscard]] const type_info &info() const noexcept {
-        return node.info ? *node.info : type_id<void>();
+        return (node.info != nullptr) ? *node.info : type_id<void>();
     }
 
     /**