From 27869c5f649c4b524e142014be073b40230ecbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Tue, 11 Aug 2020 01:07:37 +0200 Subject: libcamera: request: Make Stream pointer const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Stream pointer just acts as a key in the Request object. There is no good use-case to modify a stream from a pointer retrieved from the Request, make it const. This allows pipeline handlers to better express that the Stream pointer is retrieved in a Request should just be treated as a key. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham --- src/cam/capture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cam/capture.cpp') diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp index 07203769..af9029b7 100644 --- a/src/cam/capture.cpp +++ b/src/cam/capture.cpp @@ -169,7 +169,7 @@ void Capture::requestComplete(Request *request) info << "fps: " << std::fixed << std::setprecision(2) << fps; for (auto it = buffers.begin(); it != buffers.end(); ++it) { - Stream *stream = it->first; + const Stream *stream = it->first; FrameBuffer *buffer = it->second; const std::string &name = streamName_[stream]; @@ -209,7 +209,7 @@ void Capture::requestComplete(Request *request) } for (auto it = buffers.begin(); it != buffers.end(); ++it) { - Stream *stream = it->first; + const Stream *stream = it->first; FrameBuffer *buffer = it->second; request->addBuffer(stream, buffer); -- cgit v1.2.1