1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Refactor to use push_back more efficient (#13726)

This commit is contained in:
skdltmxn
2021-01-09 05:59:55 +09:00
committed by GitHub
parent d53a94861d
commit b0a8ebc808
37 changed files with 71 additions and 88 deletions

View File

@@ -2340,7 +2340,7 @@ void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, Netw
if (object == nullptr)
{
log_verbose("Requesting object %s with checksum %x from server", objectName, checksum);
_missingObjects.push_back(objectName);
_missingObjects.emplace_back(objectName);
}
else if (object->ObjectEntry.checksum != checksum || object->ObjectEntry.flags != flags)
{
@@ -3048,7 +3048,7 @@ void NetworkBase::Client_Handle_PLAYERLIST([[maybe_unused]] NetworkConnection& c
NetworkPlayer tempplayer;
tempplayer.Read(packet);
pending.players.push_back(tempplayer);
pending.players.push_back(std::move(tempplayer));
}
}