pipeline: simple: Avoid overusage of auto variables
Using auto variables for simple types reduces readability. Spell out unsigned int explicitly here, and replace the <= 0 check with a zero check now that the explicit type shows the value can't be negative. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <uajain@igalia.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -1266,8 +1266,8 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
|
||||
cfg.frameSize = format.planes[0].size;
|
||||
}
|
||||
|
||||
const auto bufferCount = cfg.bufferCount;
|
||||
if (bufferCount <= 0)
|
||||
const unsigned int bufferCount = cfg.bufferCount;
|
||||
if (!bufferCount)
|
||||
cfg.bufferCount = kNumBuffersDefault;
|
||||
else if (bufferCount > kNumBuffersMax)
|
||||
cfg.bufferCount = kNumBuffersMax;
|
||||
|
||||
Reference in New Issue
Block a user