diff --git a/src/Helpers/EpollInstance.cpp b/src/Helpers/EpollInstance.cpp index d2adea14..6da8962b 100644 --- a/src/Helpers/EpollInstance.cpp +++ b/src/Helpers/EpollInstance.cpp @@ -46,7 +46,7 @@ namespace Bloom } } - std::optional EpollInstance::waitForEvent(std::optional timeout) { + std::optional EpollInstance::waitForEvent(std::optional timeout) const { std::array events = {}; const auto eventCount = ::epoll_wait( diff --git a/src/Helpers/EpollInstance.hpp b/src/Helpers/EpollInstance.hpp index 278a1678..1712ae93 100644 --- a/src/Helpers/EpollInstance.hpp +++ b/src/Helpers/EpollInstance.hpp @@ -48,7 +48,9 @@ namespace Bloom * @return * The file descriptor of the file for which the event occurred, or std::nullopt if a timeout was reached. */ - std::optional waitForEvent(std::optional timeout = std::nullopt); + [[nodiscard]] std::optional waitForEvent( + std::optional timeout = std::nullopt + ) const; /* * EpollInstance objects should not be copied.