From 0228e9c927351d483fe696e5ca6eea9c2b2cbc87 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 19 Jan 2020 00:38:04 +0200 Subject: libcamera: Declare static local variables as const where applicable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use static local variables to indicate errors in methods that return a const reference. The local variables can thus be const, make them so. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/framebuffer_allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcamera/framebuffer_allocator.cpp') diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp index 207a13bd..a7588c7f 100644 --- a/src/libcamera/framebuffer_allocator.cpp +++ b/src/libcamera/framebuffer_allocator.cpp @@ -203,7 +203,7 @@ int FrameBufferAllocator::free(Stream *stream) const std::vector> & FrameBufferAllocator::buffers(Stream *stream) const { - static std::vector> empty; + static const std::vector> empty; auto iter = buffers_.find(stream); if (iter == buffers_.end()) -- cgit v1.2.1