Browse Source

any: cleanup

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

+ 1 - 1
src/entt/core/any.hpp

@@ -372,7 +372,7 @@ public:
      * @return An opaque pointer the contained instance, if any.
      */
     [[nodiscard]] const void *data(const type_info &req) const noexcept {
-        return (info() == req) ? data() : nullptr;
+        return has_value(req) ? data() : nullptr;
     }
 
     /**