libcamera: raspberrypi: Drop std::move() where misleading

Usage of std::move() on a const lvalue will produce a const rvalue,
which the compiler will bind to the const lvalue reference of the
constructor or assignement operator. This results in the object being
copied, not moved. Drop std::move() in that case as it's misleading.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
Laurent Pinchart
2021-02-22 12:21:26 +02:00
parent 13a7ed7b1f
commit 1612841ff1

View File

@@ -1289,7 +1289,7 @@ void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList &
/* Fill the Request metadata buffer with what the IPA has provided */
Request *request = requestQueue_.front();
request->metadata() = std::move(controls);
request->metadata() = controls;
/*
* Also update the ScalerCrop in the metadata with what we actually
@@ -1338,7 +1338,7 @@ void RPiCameraData::embeddedComplete(uint32_t bufferId)
void RPiCameraData::setIspControls(const ControlList &controls)
{
ControlList ctrls = std::move(controls);
ControlList ctrls = controls;
if (ctrls.contains(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING)) {
ControlValue &value =