CHG: changed the return val from the tcp classes to string

This commit is contained in:
Henry Winkel
2023-07-05 18:02:23 +02:00
parent 1d154f71d4
commit 8bc80f9885
5 changed files with 10 additions and 10 deletions

View File

@@ -46,13 +46,13 @@ namespace DirectCommunication
}
std::unique_ptr<std::string> DirectCommunicationClient::getLatestMessage()
std::string DirectCommunicationClient::getLatestMessage()
{
if (receivedMessages_.size() > 0)
{
std::string msg;
receivedMessages_.get(msg);
return std::make_unique<std::string>(std::move(msg));
return msg;
}
return nullptr;
}

View File

@@ -47,13 +47,13 @@ namespace DirectCommunication
}
}
std::unique_ptr<std::string> DirectCommunicationServer::getLatestMessage()
std::string DirectCommunicationServer::getLatestMessage()
{
if (receivedMessages_.size() > 0)
{
std::string msg;
receivedMessages_.get(msg);
return std::make_unique<std::string>(std::move(msg));
return msg;
}
return nullptr;
}