1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fixed some newly reported issues from SonarCloud

This commit is contained in:
Ivan Savenko
2024-05-10 13:10:33 +00:00
parent 2ddb41e654
commit 2521557f68
11 changed files with 45 additions and 46 deletions

View File

@@ -379,7 +379,7 @@ void CVCMIServer::announcePack(std::unique_ptr<CPackForLobby> pack)
applier->getApplier(CTypeList::getInstance().getTypeID(pack.get()))->applyOnServerAfter(this, pack.get());
}
void CVCMIServer::announceMessage(MetaString txt)
void CVCMIServer::announceMessage(const MetaString & txt)
{
logNetwork->info("Show message: %s", txt.toString());
auto cm = std::make_unique<LobbyShowMessage>();
@@ -394,7 +394,7 @@ void CVCMIServer::announceMessage(const std::string & txt)
announceMessage(str);
}
void CVCMIServer::announceTxt(MetaString txt, const std::string & playerName)
void CVCMIServer::announceTxt(const MetaString & txt, const std::string & playerName)
{
logNetwork->info("%s says: %s", playerName, txt.toString());
auto cm = std::make_unique<LobbyChatMessage>();