[libcamera-devel] [PATCH 02/10] qcam: main_window: Re-use existing variable
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Oct 13 17:12:33 CEST 2020
The queueRequest function creates FrameBuffer pointer which aliases the
existing and passed in buffer pointer.
When the captureRaw_ scope is executed, the original FrameBuffer *buffer
is not used any more.
Re-use it rather than creating a new variable with the same name.
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
src/qcam/main_window.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 0cbdab9a6bce..0e50768aa386 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -769,7 +769,7 @@ void MainWindow::queueRequest(FrameBuffer *buffer)
request->addBuffer(vfStream_, buffer);
if (captureRaw_) {
- FrameBuffer *buffer = nullptr;
+ buffer = nullptr;
{
QMutexLocker locker(&mutex_);
--
2.25.1
More information about the libcamera-devel
mailing list