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

@@ -467,7 +467,7 @@ void CGameHandler::handleReceivedPack(CPackForServer * pack)
applied.result = successfullyApplied;
applied.packType = CTypeList::getInstance().getTypeID(pack);
applied.requestID = pack->requestID;
pack->c->sendPack(&applied);
pack->c->sendPack(applied);
};
if(isBlockedByQueries(pack, pack->player))
@@ -1438,7 +1438,7 @@ void CGameHandler::sendToAllClients(CPackForClient * pack)
{
logNetwork->trace("\tSending to all clients: %s", typeid(*pack).name());
for (auto c : lobby->activeConnections)
c->sendPack(pack);
c->sendPack(*pack);
}
void CGameHandler::sendAndApply(CPackForClient * pack)