Codechange: use std::vector for the outgoing command "queues"
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user