mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
ClientInterface::getClientIDs doesn't need a std::list. Use a std::vector for better perfs
This commit is contained in:
parent
7e088fdfe3
commit
2066655aae
4 changed files with 57 additions and 71 deletions
|
@ -851,10 +851,9 @@ void Server::handleCommand_ChatMessage(NetworkPacket* pkt)
|
|||
else {
|
||||
actionstream << "CHAT: " << wide_to_narrow(line)<<std::endl;
|
||||
|
||||
std::list<u16> clients = m_clients.getClientIDs();
|
||||
std::vector<u16> clients = m_clients.getClientIDs();
|
||||
|
||||
for (std::list<u16>::iterator
|
||||
i = clients.begin();
|
||||
for (std::vector<u16>::iterator i = clients.begin();
|
||||
i != clients.end(); ++i) {
|
||||
if (*i != pkt->getPeerId())
|
||||
SendChatMessage(*i, line);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue