Răsfoiți Sursa

*: suppress some warnings here and there

Michele Caini 5 ani în urmă
părinte
comite
b919b172b1
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      src/entt/meta/factory.hpp
  2. 1 1
      src/entt/meta/meta.hpp

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

@@ -117,7 +117,7 @@ template<typename Type, auto Data>
 
 template<typename Type, auto Data, typename Policy>
 [[nodiscard]] meta_any getter([[maybe_unused]] meta_handle instance) {
-    auto dispatch = [](auto &&value) {
+    [[maybe_unused]] auto dispatch = [](auto &&value) {
         if constexpr(std::is_same_v<Policy, as_void_t>) {
             return meta_any{std::in_place_type<void>, std::forward<decltype(value)>(value)};
         } else if constexpr(std::is_same_v<Policy, as_ref_t>) {

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

@@ -786,7 +786,7 @@ inline bool meta_container::erase(meta_any it_or_key) {
  * @return True if the meta container is valid, false otherwise.
  */
 meta_container::operator bool() const ENTT_NOEXCEPT {
-    return view;
+    return (view != nullptr);
 }