mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Optimize ClientIface::getPlayerNames(): return const ref instead a copy of all names
This commit is contained in:
parent
fd5a130b86
commit
edba6e50d9
3 changed files with 4 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue