From da1c5bfcf6d9b5ee6880d89114ca01baca4b44a9 Mon Sep 17 00:00:00 2001 From: Edo Date: Fri, 5 May 2023 19:42:34 +0100 Subject: [PATCH] [Network]: Use push_back (#1012) --- src/Components/Modules/Network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Network.cpp b/src/Components/Modules/Network.cpp index 38ccc6ef..76746907 100644 --- a/src/Components/Modules/Network.cpp +++ b/src/Components/Modules/Network.cpp @@ -193,7 +193,7 @@ namespace Components // EDIT: Most 3rd party tools expect a line break, so let's use that instead! std::string packet; packet.append(command); - packet.append("\n", 1); + packet.push_back('\n'); packet.append(data); Send(type, target, packet); @@ -303,7 +303,7 @@ namespace Components return false; } - const std::string data(reinterpret_cast(message->data) + offset, message->cursize - offset); + const std::string data{ reinterpret_cast(message->data) + offset, message->cursize - offset }; auto target = Address{ address }; handler->second(target, data);