libcamera: media_device: Make getEntityByName() const
The function does not modify the instance state. Mark it as const. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -297,7 +297,7 @@ int MediaDevice::populate()
|
||||
* \return The entity with \a name
|
||||
* \return nullptr if no entity with \a name is found
|
||||
*/
|
||||
MediaEntity *MediaDevice::getEntityByName(const std::string &name)
|
||||
MediaEntity *MediaDevice::getEntityByName(const std::string &name) const
|
||||
{
|
||||
for (MediaEntity *e : entities_)
|
||||
if (e->name() == name)
|
||||
|
||||
Reference in New Issue
Block a user