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:
Laurent Pinchart
2020-01-22 17:26:17 +02:00
parent 7216c6a9bb
commit 0228e9c927
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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)