Преглед изворни кода

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>();
     }
 
     /**