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/requester/test/handler_test.cpp b/requester/test/handler_test.cpp
index 4ac7861..19afdd1 100644
--- a/requester/test/handler_test.cpp
+++ b/requester/test/handler_test.cpp
@@ -83,7 +83,7 @@
EXPECT_EQ(instanceId, 0);
auto rc = reqHandler.registerRequest(
eid, instanceId, 0, 0, std::move(request),
- std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+ std::bind_front(&HandlerTest::pldmResponseCallBack, this));
EXPECT_EQ(rc, PLDM_SUCCESS);
pldm::Response response(sizeof(pldm_msg_hdr) + sizeof(uint8_t));
@@ -104,7 +104,7 @@
EXPECT_EQ(instanceId, 0);
auto rc = reqHandler.registerRequest(
eid, instanceId, 0, 0, std::move(request),
- std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+ std::bind_front(&HandlerTest::pldmResponseCallBack, this));
EXPECT_EQ(rc, PLDM_SUCCESS);
// Waiting for 500ms so that the instance ID expiry callback is invoked
@@ -123,7 +123,7 @@
EXPECT_EQ(instanceId, 0);
auto rc = reqHandler.registerRequest(
eid, instanceId, 0, 0, std::move(request),
- std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+ std::bind_front(&HandlerTest::pldmResponseCallBack, this));
EXPECT_EQ(rc, PLDM_SUCCESS);
pldm::Request requestNxt{};
@@ -131,7 +131,7 @@
EXPECT_EQ(instanceIdNxt, 1);
rc = reqHandler.registerRequest(
eid, instanceIdNxt, 0, 0, std::move(requestNxt),
- std::move(std::bind_front(&HandlerTest::pldmResponseCallBack, this)));
+ std::bind_front(&HandlerTest::pldmResponseCallBack, this));
EXPECT_EQ(rc, PLDM_SUCCESS);
pldm::Response response(sizeof(pldm_msg_hdr) + sizeof(uint8_t));