pldm: Drop pessimizing moves
Fixes issues such as:
```
../host-bmc/host_pdr_handler.cpp:684:9: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
684 | std::move(std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION)),
| ^
../host-bmc/host_pdr_handler.cpp:684:9: note: remove std::move call here
684 | std::move(std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION)),
| ^~~~~~~~~~ ~
```
Change-Id: Id26f0d6fc21837e1eb76ae3c294c222782a4e69f
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/fw-update/device_updater.cpp b/fw-update/device_updater.cpp
index 49b6326..50456eb 100644
--- a/fw-update/device_updater.cpp
+++ b/fw-update/device_updater.cpp
@@ -57,7 +57,7 @@
rc = updateManager->handler.registerRequest(
eid, instanceId, PLDM_FWUP, PLDM_REQUEST_UPDATE, std::move(request),
- std::move(std::bind_front(&DeviceUpdater::requestUpdate, this)));
+ std::bind_front(&DeviceUpdater::requestUpdate, this));
if (rc)
{
// Handle error scenario
@@ -186,7 +186,7 @@
rc = updateManager->handler.registerRequest(
eid, instanceId, PLDM_FWUP, PLDM_PASS_COMPONENT_TABLE,
std::move(request),
- std::move(std::bind_front(&DeviceUpdater::passCompTable, this)));
+ std::bind_front(&DeviceUpdater::passCompTable, this));
if (rc)
{
// Handle error scenario
@@ -317,7 +317,7 @@
rc = updateManager->handler.registerRequest(
eid, instanceId, PLDM_FWUP, PLDM_UPDATE_COMPONENT, std::move(request),
- std::move(std::bind_front(&DeviceUpdater::updateComponent, this)));
+ std::bind_front(&DeviceUpdater::updateComponent, this));
if (rc)
{
// Handle error scenario
@@ -669,7 +669,7 @@
rc = updateManager->handler.registerRequest(
eid, instanceId, PLDM_FWUP, PLDM_ACTIVATE_FIRMWARE, std::move(request),
- std::move(std::bind_front(&DeviceUpdater::activateFirmware, this)));
+ std::bind_front(&DeviceUpdater::activateFirmware, this));
if (rc)
{
error(
diff --git a/fw-update/inventory_manager.cpp b/fw-update/inventory_manager.cpp
index f341f28..b466984 100644
--- a/fw-update/inventory_manager.cpp
+++ b/fw-update/inventory_manager.cpp
@@ -37,8 +37,7 @@
rc = handler.registerRequest(
eid, instanceId, PLDM_FWUP, PLDM_QUERY_DEVICE_IDENTIFIERS,
std::move(requestMsg),
- std::move(std::bind_front(&InventoryManager::queryDeviceIdentifiers,
- this)));
+ std::bind_front(&InventoryManager::queryDeviceIdentifiers, this));
if (rc)
{
error(
@@ -170,8 +169,7 @@
rc = handler.registerRequest(
eid, instanceId, PLDM_FWUP, PLDM_GET_FIRMWARE_PARAMETERS,
std::move(requestMsg),
- std::move(
- std::bind_front(&InventoryManager::getFirmwareParameters, this)));
+ std::bind_front(&InventoryManager::getFirmwareParameters, this));
if (rc)
{
error(