[Network]: Use push_back (#1012)

This commit is contained in:
Edo 2023-05-05 19:42:34 +01:00 committed by GitHub
parent 6001044ae6
commit da1c5bfcf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ namespace Components
// EDIT: Most 3rd party tools expect a line break, so let's use that instead! // EDIT: Most 3rd party tools expect a line break, so let's use that instead!
std::string packet; std::string packet;
packet.append(command); packet.append(command);
packet.append("\n", 1); packet.push_back('\n');
packet.append(data); packet.append(data);
Send(type, target, packet); Send(type, target, packet);
@ -303,7 +303,7 @@ namespace Components
return false; return false;
} }
const std::string data(reinterpret_cast<char*>(message->data) + offset, message->cursize - offset); const std::string data{ reinterpret_cast<char*>(message->data) + offset, message->cursize - offset };
auto target = Address{ address }; auto target = Address{ address };
handler->second(target, data); handler->second(target, data);