From f388aa7041d90cbc957e33ff90a5122a3c5237e6 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 15 Jan 2019 16:58:55 +0200 Subject: libcamera: device_enumerator: Don't mark the search() function as const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While the DeviceEnumerator::search() function doesn't modify the instance directly, it returns a non-const pointer to a MediaEntity that is owned by the DeviceEnumerator instance. This breaks the const semantics. Don't mark the function as const. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/device_enumerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcamera/device_enumerator.cpp') diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp index 1653e4f4..18d7e868 100644 --- a/src/libcamera/device_enumerator.cpp +++ b/src/libcamera/device_enumerator.cpp @@ -245,7 +245,7 @@ int DeviceEnumerator::addDevice(const std::string &devnode) * * \return pointer to the matching MediaDevice, or nullptr if no match is found */ -MediaDevice *DeviceEnumerator::search(const DeviceMatch &dm) const +MediaDevice *DeviceEnumerator::search(const DeviceMatch &dm) { for (MediaDevice *dev : devices_) { if (dev->busy()) -- cgit v1.2.1