From 41da2c6dfb1d8926cc27b68f1d94e715c57856fc Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 5 Oct 2023 22:23:14 -0400 Subject: [PATCH] adapter/windows: evidently cannot be null --- devel/include/detail/wtr/watcher/adapter/windows/watch.hpp | 4 ++-- include/wtr/watcher.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }