From ed6f31f4c9939d6cc8d4d317d561a94545750b0b Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 5 Aug 2024 12:40:04 +0200 Subject: Replace classic C boolean operators with keywords ! => not; && => and, || => or --- src/buildtool/multithreading/notification_queue.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/buildtool/multithreading/notification_queue.hpp') diff --git a/src/buildtool/multithreading/notification_queue.hpp b/src/buildtool/multithreading/notification_queue.hpp index a9f476c2..f1c803e9 100644 --- a/src/buildtool/multithreading/notification_queue.hpp +++ b/src/buildtool/multithreading/notification_queue.hpp @@ -92,7 +92,7 @@ class NotificationQueue { [[nodiscard]] auto pop() -> std::optional { std::unique_lock lock{mutex_}; auto there_is_something_to_pop_or_we_are_done = [&]() { - return !queue_.empty() || done_; + return not queue_.empty() or done_; }; if (not there_is_something_to_pop_or_we_are_done()) { total_workload_->Decrement(); @@ -113,7 +113,7 @@ class NotificationQueue { // otherwise pops the front element of the queue and returns it [[nodiscard]] auto try_pop() -> std::optional { std::unique_lock lock{mutex_, std::try_to_lock}; - if (!lock || queue_.empty()) { + if (not lock or queue_.empty()) { return std::nullopt; } auto t = std::move(queue_.front()); @@ -140,7 +140,7 @@ class NotificationQueue { [[nodiscard]] auto try_push(FunctionType&& f) -> bool { { std::unique_lock lock{mutex_, std::try_to_lock}; - if (!lock) { + if (not lock) { return false; } total_workload_->Increment(); -- cgit v1.2.3