summaryrefslogtreecommitdiff
path: root/src/clientiface.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2016-10-08 16:42:09 +0200
committerNer'zhul <nerzhul@users.noreply.github.com>2016-10-08 22:27:44 +0200
commitedba6e50d9c9c0a7120c251bed36a87b51f4c826 (patch)
tree63073d59bccd278f8b3cbbc92b6aadb1ba2e3c14 /src/clientiface.h
parentfd5a130b86c08f0b3190c3d81affd4869c139fb7 (diff)
downloadminetest-edba6e50d9c9c0a7120c251bed36a87b51f4c826.tar.gz
minetest-edba6e50d9c9c0a7120c251bed36a87b51f4c826.tar.bz2
minetest-edba6e50d9c9c0a7120c251bed36a87b51f4c826.zip
Optimize ClientIface::getPlayerNames(): return const ref instead a copy of all names
Diffstat (limited to 'src/clientiface.h')
-rw-r--r--src/clientiface.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clientiface.h b/src/clientiface.h
index 8985ef71f..551d71bbe 100644
--- a/src/clientiface.h
+++ b/src/clientiface.h
@@ -453,7 +453,7 @@ public:
std::vector<u16> getClientIDs(ClientState min_state=CS_Active);
/* get list of client player names */
- std::vector<std::string> getPlayerNames();
+ const std::vector<std::string> &getPlayerNames() const { return m_clients_names; }
/* send message to client */
void send(u16 peer_id, u8 channelnum, NetworkPacket* pkt, bool reliable);