ソースを参照

meta: explicit check to avoid warnings due to implicit conversions

Michele Caini 1 年間 前
コミット
3b371e9e52
1 ファイル変更1 行追加1 行削除
  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>();
     }
 
     /**