diff --git a/port/cpl_worker_thread_pool.cpp b/port/cpl_worker_thread_pool.cpp index c26fbd3d8030..01867f1cb25f 100644 --- a/port/cpl_worker_thread_pool.cpp +++ b/port/cpl_worker_thread_pool.cpp @@ -612,7 +612,7 @@ bool CPLJobQueue::SubmitJob(std::function task) // cppcheck-suppress knownConditionTrueFalse return m_poPool->SubmitJob( - [this, task] + [=] { task(); DeclareJobFinished();