summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-03-23 07:09:10 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-23 03:47:01 +0200
commit67e791373de781a68889c8b56c7e18f3f27bd52e (patch)
treeaeff6553cdad82a31c6f057754ba4b5229568114 /include
parent5154e14b3e682eb0ad313d060ae12f95357f3a07 (diff)
libcamera: device_enumerator: Remove unnecessary rvalue references
There are std::unique_ptr rvalue reference arguments. They are intended to pass the ownership to the functions. In the case, it is right to let the argument be std::unique_ptr value and pass by std::move(). Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/device_enumerator.h2
-rw-r--r--include/libcamera/internal/device_enumerator_udev.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
index a9850400..707cfe8f 100644
--- a/include/libcamera/internal/device_enumerator.h
+++ b/include/libcamera/internal/device_enumerator.h
@@ -49,7 +49,7 @@ public:
protected:
std::unique_ptr<MediaDevice> createDevice(const std::string &deviceNode);
- void addDevice(std::unique_ptr<MediaDevice> &&media);
+ void addDevice(std::unique_ptr<MediaDevice> media);
void removeDevice(const std::string &deviceNode);
private:
diff --git a/include/libcamera/internal/device_enumerator_udev.h b/include/libcamera/internal/device_enumerator_udev.h
index 6f45be0c..58e64a29 100644
--- a/include/libcamera/internal/device_enumerator_udev.h
+++ b/include/libcamera/internal/device_enumerator_udev.h
@@ -39,8 +39,8 @@ private:
using DependencyMap = std::map<dev_t, std::list<MediaEntity *>>;
struct MediaDeviceDeps {
- MediaDeviceDeps(std::unique_ptr<MediaDevice> &&media,
- DependencyMap &&deps)
+ MediaDeviceDeps(std::unique_ptr<MediaDevice> media,
+ DependencyMap deps)
: media_(std::move(media)), deps_(std::move(deps))
{
}