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>
This commit is contained in:
committed by
Laurent Pinchart
parent
5154e14b3e
commit
67e791373d
@@ -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:
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ std::unique_ptr<MediaDevice> DeviceEnumerator::createDevice(const std::string &d
|
||||
* This method shall be called after all members of the entities of the
|
||||
* media graph have been confirmed to be initialized.
|
||||
*/
|
||||
void DeviceEnumerator::addDevice(std::unique_ptr<MediaDevice> &&media)
|
||||
void DeviceEnumerator::addDevice(std::unique_ptr<MediaDevice> media)
|
||||
{
|
||||
LOG(DeviceEnumerator, Debug)
|
||||
<< "Added device " << media->deviceNode() << ": " << media->driver();
|
||||
|
||||
Reference in New Issue
Block a user