diff --git a/devel/include/detail/wtr/watcher/adapter/windows/watch.hpp b/devel/include/detail/wtr/watcher/adapter/windows/watch.hpp index 4f5b6833..47571b72 100644 --- a/devel/include/detail/wtr/watcher/adapter/windows/watch.hpp +++ b/devel/include/detail/wtr/watcher/adapter/windows/watch.hpp @@ -80,7 +80,7 @@ class watch_event_proxy { inline auto is_valid(watch_event_proxy& w) noexcept -> bool { - return w.is_valid && w.event_buf != nullptr; + return w.is_valid; } inline auto has_event(watch_event_proxy& w) noexcept -> bool @@ -111,7 +111,7 @@ inline auto do_event_recv( &w.event_overlap, nullptr); - if (w.event_buf && read_ok) { + if (read_ok) { w.event_buf_len_ready = bytes_returned > 0 ? bytes_returned : 0; return true; } diff --git a/include/wtr/watcher.hpp b/include/wtr/watcher.hpp index 8edbbdaa..a5f91c75 100644 --- a/include/wtr/watcher.hpp +++ b/include/wtr/watcher.hpp @@ -1726,7 +1726,7 @@ class watch_event_proxy { inline auto is_valid(watch_event_proxy& w) noexcept -> bool { - return w.is_valid && w.event_buf != nullptr; + return w.is_valid; } inline auto has_event(watch_event_proxy& w) noexcept -> bool @@ -1757,7 +1757,7 @@ inline auto do_event_recv( &w.event_overlap, nullptr); - if (w.event_buf && read_ok) { + if (read_ok) { w.event_buf_len_ready = bytes_returned > 0 ? bytes_returned : 0; return true; }