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:
parent
079c5fe63d
commit
a87cb586e2
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue