Codechange: use std::vector for the outgoing command "queues"

This commit is contained in:
Rubidium
2024-02-04 16:23:44 +01:00
committed by rubidium42
parent 09a12f230f
commit b3aa8a9c35
3 changed files with 5 additions and 9 deletions

View File

@@ -1701,11 +1701,8 @@ void NetworkServerSetCompanyPassword(CompanyID company_id, const std::string &pa
*/
static void NetworkHandleCommandQueue(NetworkClientSocket *cs)
{
CommandPacket *cp;
while ((cp = cs->outgoing_queue.Pop()) != nullptr) {
cs->SendCommand(cp);
delete cp;
}
for (auto &cp : cs->outgoing_queue) cs->SendCommand(&cp);
cs->outgoing_queue.clear();
}
/**