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:
Jacopo Mondi
2019-01-02 11:55:43 +01:00
parent ea3fa2680c
commit 1b80471805
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)