aboutsummaryrefslogtreecommitdiff
path: root/src/network/packethandlers
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-04 16:30:24 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-04 16:30:24 +0100
commit2066655aae2022384fc12a10c04dccfd2996f0ac (patch)
treec4ef388c3f97a6e11ede458d89e55cfbcd0310e8 /src/network/packethandlers
parent7e088fdfe3c77083606bce955624aef1da59bb32 (diff)
downloadminetest-2066655aae2022384fc12a10c04dccfd2996f0ac.tar.gz
minetest-2066655aae2022384fc12a10c04dccfd2996f0ac.tar.bz2
minetest-2066655aae2022384fc12a10c04dccfd2996f0ac.zip
ClientInterface::getClientIDs doesn't need a std::list. Use a std::vector for better perfs
Diffstat (limited to 'src/network/packethandlers')
-rw-r--r--src/network/packethandlers/server.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/packethandlers/server.cpp b/src/network/packethandlers/server.cpp
index aeaa2f3f3..62ce7eb55 100644
--- a/src/network/packethandlers/server.cpp
+++ b/src/network/packethandlers/server.cpp
@@ -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);