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

Replaced some of pointers to CPack's with references

This commit is contained in:
Ivan Savenko
2024-10-04 13:35:31 +00:00
parent cc6d6b0d63
commit c1c552d394
5 changed files with 13 additions and 15 deletions

View File

@@ -853,7 +853,7 @@ void CServerHandler::onPacketReceived(const std::shared_ptr<INetworkConnection>
if(getState() == EClientState::DISCONNECTING)
return;
CPack * pack = logicConnection->retrievePack(message);
auto pack = logicConnection->retrievePack(message);
ServerHandlerCPackVisitor visitor(*this);
pack->visit(visitor);
}
@@ -945,7 +945,7 @@ void CServerHandler::visitForClient(CPackForClient & clientPack)
void CServerHandler::sendLobbyPack(const CPackForLobby & pack) const
{
if(getState() != EClientState::STARTING)
logicConnection->sendPack(&pack);
logicConnection->sendPack(pack);
}
bool CServerHandler::inLobbyRoom() const