libcamera: Use const reference for range loops
Use a const reference in range-based for loops to avoid copies of the loop elements. While at it, change looping over controls in PipelineHandlerUVC::processControls to use structured bindings. Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
committed by
Jacopo Mondi
parent
868ab2287d
commit
45c198da63
@@ -378,7 +378,7 @@ int PipelineHandlerVimc::processControls(VimcCameraData *data, Request *request)
|
||||
{
|
||||
ControlList controls(data->sensor_->controls());
|
||||
|
||||
for (auto it : request->controls()) {
|
||||
for (const auto &it : request->controls()) {
|
||||
unsigned int id = it.first;
|
||||
unsigned int offset;
|
||||
uint32_t cid;
|
||||
|
||||
Reference in New Issue
Block a user