From 25104ca2a80852c32ba213b23ecf0442af682ced Mon Sep 17 00:00:00 2001 From: Gianluca Martino Date: Tue, 25 Feb 2025 12:54:59 +0100 Subject: [PATCH] work_queue_fill is an unsigned so we can simplify the condition variable predicate. Co-authored-by: Lars-Peter Clausen --- vpi/vcd_priv2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpi/vcd_priv2.cc b/vpi/vcd_priv2.cc index f812cec78..80e122b0d 100644 --- a/vpi/vcd_priv2.cc +++ b/vpi/vcd_priv2.cc @@ -224,7 +224,7 @@ extern "C" void vcd_work_sync(void) if (work_queue_fill > 0) { std::unique_lock lock(work_queue_mutex); - work_queue_is_empty_sig.wait(lock, []{ return !(work_queue_fill > 0); }); + work_queue_is_empty_sig.wait(lock, []{ return work_queue_fill == 0; }); } }