From 0b9da62833e75165a60937e9335448562e0ed98f Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 21 Feb 2025 20:00:37 -0600 Subject: [PATCH] refactor --- .../librepertory/src/file_manager/ring_buffer_base.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/repertory/librepertory/src/file_manager/ring_buffer_base.cpp b/repertory/librepertory/src/file_manager/ring_buffer_base.cpp index b869cfd5..34e1daf3 100644 --- a/repertory/librepertory/src/file_manager/ring_buffer_base.cpp +++ b/repertory/librepertory/src/file_manager/ring_buffer_base.cpp @@ -290,8 +290,7 @@ void ring_buffer_base::reader_thread() { next_chunk = ring_begin_; } - const auto check_and_wait = [this, &chunk_lock, &last_pos, &next_chunk, - ¬ify_and_unlock]() { + if (read_state_[next_chunk % read_state_.size()]) { if (get_stop_requested()) { notify_and_unlock(); return; @@ -304,10 +303,6 @@ void ring_buffer_base::reader_thread() { } notify_and_unlock(); - }; - - if (read_state_[next_chunk % read_state_.size()]) { - check_and_wait(); continue; }