diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-01-19 00:38:04 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-01-22 17:26:17 +0200 |
commit | 0228e9c927351d483fe696e5ca6eea9c2b2cbc87 (patch) | |
tree | 2113010903387bd38c015130074858c8a1891b12 /src/libcamera/framebuffer_allocator.cpp | |
parent | 7216c6a9bb815ca9d0b4247f8e04d87e4ac85fa2 (diff) |
libcamera: Declare static local variables as const where applicable
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/framebuffer_allocator.cpp')
-rw-r--r-- | src/libcamera/framebuffer_allocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<std::unique_ptr<FrameBuffer>> & FrameBufferAllocator::buffers(Stream *stream) const { - static std::vector<std::unique_ptr<FrameBuffer>> empty; + static const std::vector<std::unique_ptr<FrameBuffer>> empty; auto iter = buffers_.find(stream); if (iter == buffers_.end()) |