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:
@@ -752,7 +752,7 @@ bool ControlList::contains(unsigned int id) const
|
||||
*/
|
||||
const ControlValue &ControlList::get(unsigned int id) const
|
||||
{
|
||||
static ControlValue zero;
|
||||
static const ControlValue zero;
|
||||
|
||||
const ControlValue *val = find(id);
|
||||
if (!val)
|
||||
|
||||
Reference in New Issue
Block a user