szaszm commented on a change in pull request #734: MINIFICPP-1157 Implement lightweight C2 heartbeat. URL: https://github.com/apache/nifi-minifi-cpp/pull/734#discussion_r378226346
########## File path: libminifi/include/core/state/nodes/AgentInformation.h ########## @@ -643,16 +704,7 @@ class AgentInformation : public DeviceInformation, public AgentMonitor, public A } std::vector<SerializedResponseNode> serialize() { - std::vector<SerializedResponseNode> serialized; - - SerializedResponseNode ident; - - ident.name = "identifier"; - ident.value = identifier_; - - SerializedResponseNode agentClass; - agentClass.name = "agentClass"; - agentClass.value = agent_class_; + std::vector<SerializedResponseNode> serialized(std::move(AgentInformationWithoutManifest::serialize())); Review comment: `std::move` is redundant, since the result of a function call expression is already an rvalue. It will prevent copy/move elision, thus making the end result even slower than without `std::move`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services