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
@@ -161,7 +161,7 @@ std::unique_ptr<DeviceEnumerator> DeviceEnumerator::create()
|
||||
|
||||
DeviceEnumerator::~DeviceEnumerator()
|
||||
{
|
||||
for (std::shared_ptr<MediaDevice> media : devices_) {
|
||||
for (const std::shared_ptr<MediaDevice> &media : devices_) {
|
||||
if (media->busy())
|
||||
LOG(DeviceEnumerator, Error)
|
||||
<< "Removing media device " << media->deviceNode()
|
||||
|
||||
Reference in New Issue
Block a user