CHG: changed the return val from the tcp classes to string
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user