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:
parent
7216c6a9bb
commit
0228e9c927
4 changed files with 4 additions and 4 deletions
|
@ -86,7 +86,7 @@ std::vector<unsigned int> ImageFormats::formats() const
|
|||
*/
|
||||
const std::vector<SizeRange> &ImageFormats::sizes(unsigned int format) const
|
||||
{
|
||||
static std::vector<SizeRange> empty;
|
||||
static const std::vector<SizeRange> empty;
|
||||
|
||||
auto const &it = data_.find(format);
|
||||
if (it == data_.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue