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/host-bmc/host_pdr_handler.cpp b/host-bmc/host_pdr_handler.cpp
index 3621f92..dee768e 100644
--- a/host-bmc/host_pdr_handler.cpp
+++ b/host-bmc/host_pdr_handler.cpp
@@ -194,7 +194,7 @@
rc = handler->registerRequest(
mctp_eid, instanceId, PLDM_PLATFORM, PLDM_GET_PDR,
std::move(requestMsg),
- std::move(std::bind_front(&HostPDRHandler::processHostPDRs, this)));
+ std::bind_front(&HostPDRHandler::processHostPDRs, this));
if (rc)
{
error(
@@ -679,7 +679,7 @@
{
deferredPDRRepoChgEvent.reset();
this->sendPDRRepositoryChgEvent(
- std::move(std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION)),
+ std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION),
FORMAT_IS_PDR_HANDLES);
}