libcamera: device_enumerator: Constify argument to search function
The DeviceEnumerator::search() function doesn't need to modify its DeviceMatch argument, make it const. 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:
@@ -215,7 +215,7 @@ int DeviceEnumerator::addDevice(const std::string &devnode)
|
||||
*
|
||||
* \return pointer to the matching MediaDevice, nullptr if no match is found
|
||||
*/
|
||||
MediaDevice *DeviceEnumerator::search(DeviceMatch &dm) const
|
||||
MediaDevice *DeviceEnumerator::search(const DeviceMatch &dm) const
|
||||
{
|
||||
for (MediaDevice *dev : devices_) {
|
||||
if (dev->busy())
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
virtual int init() = 0;
|
||||
virtual int enumerate() = 0;
|
||||
|
||||
MediaDevice *search(DeviceMatch &dm) const;
|
||||
MediaDevice *search(const DeviceMatch &dm) const;
|
||||
|
||||
protected:
|
||||
int addDevice(const std::string &devnode);
|
||||
|
||||
Reference in New Issue
Block a user