[PATCH v1] apps: cam: Fix C++20 deprecation warning

Barnabás Pőcze pobrn at protonmail.com
Tue Apr 30 21:26:21 CEST 2024


C++20 deprecated implicit capture of `this` via `[=]`.
Fix that by explicitly capturing the necessary variables.

Signed-off-by: Barnabás Pőcze <pobrn at protonmail.com>
---
 src/apps/cam/camera_session.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp
index 334d2ed8..d1f65a99 100644
--- a/src/apps/cam/camera_session.cpp
+++ b/src/apps/cam/camera_session.cpp
@@ -382,7 +382,7 @@ void CameraSession::requestComplete(Request *request)
 	 * Defer processing of the completed request to the event loop, to avoid
 	 * blocking the camera manager thread.
 	 */
-	EventLoop::instance()->callLater([=]() { processRequest(request); });
+	EventLoop::instance()->callLater([this, request]() { processRequest(request); });
 }
 
 void CameraSession::processRequest(Request *request)

-- 
2.45.0




More information about the libcamera-devel mailing list