From b3e2506153f9d204e94f94e4e590da54d17ccfdf Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Thu, 15 Aug 2024 09:39:17 -0400 Subject: [PATCH] chore: add brace to for loop --- include/thread_pool/thread_pool.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/thread_pool/thread_pool.h b/include/thread_pool/thread_pool.h index 14f841e..95485d5 100644 --- a/include/thread_pool/thread_pool.h +++ b/include/thread_pool/thread_pool.h @@ -250,7 +250,9 @@ namespace dp { */ size_t clear_tasks() { size_t removed_task_count{0}; - for (auto &task_list : tasks_) removed_task_count += task_list.tasks.clear(); + for (auto &task_list : tasks_) { + removed_task_count += task_list.tasks.clear(); + } in_flight_tasks_.fetch_sub(removed_task_count, std::memory_order_release); unassigned_tasks_.fetch_sub(removed_task_count, std::memory_order_release);