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>
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user