From f4c234579bc24237a2c860901be958aea3debb8a Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 28 Jul 2020 13:23:08 +0100 Subject: libcamera: thread: Prevent shadowing of signal name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Thread::wait() function creates a boolean flag 'finished' which shadows the internal member signal of the same name. Rename the boolean flag to prevent confusion and shadowing of the signal. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/thread.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libcamera/thread.cpp') diff --git a/src/libcamera/thread.cpp b/src/libcamera/thread.cpp index 87006a9c..b5d7103a 100644 --- a/src/libcamera/thread.cpp +++ b/src/libcamera/thread.cpp @@ -374,7 +374,7 @@ void Thread::exit(int code) */ bool Thread::wait(utils::duration duration) { - bool finished = true; + bool hasFinished = true; { MutexLocker locker(data_->mutex_); @@ -382,14 +382,14 @@ bool Thread::wait(utils::duration duration) if (duration == utils::duration::max()) data_->cv_.wait(locker, [&]() { return !data_->running_; }); else - finished = data_->cv_.wait_for(locker, duration, - [&]() { return !data_->running_; }); + hasFinished = data_->cv_.wait_for(locker, duration, + [&]() { return !data_->running_; }); } if (thread_.joinable()) thread_.join(); - return finished; + return hasFinished; } /** -- cgit v1.2.1