mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Replace std::list<session_t> in networking code (#10215)
This commit is contained in:
parent
76afde861d
commit
8ca602150d
3 changed files with 17 additions and 18 deletions
|
@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "networkprotocol.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
class NetworkPacket;
|
||||
|
@ -795,7 +795,7 @@ protected:
|
|||
|
||||
void PrintInfo(std::ostream &out);
|
||||
|
||||
std::list<session_t> getPeerIDs()
|
||||
std::vector<session_t> getPeerIDs()
|
||||
{
|
||||
MutexAutoLock peerlock(m_peers_mutex);
|
||||
return m_peer_ids;
|
||||
|
@ -816,7 +816,7 @@ private:
|
|||
u32 m_protocol_id;
|
||||
|
||||
std::map<session_t, Peer *> m_peers;
|
||||
std::list<session_t> m_peer_ids;
|
||||
std::vector<session_t> m_peer_ids;
|
||||
std::mutex m_peers_mutex;
|
||||
|
||||
std::unique_ptr<ConnectionSendThread> m_sendThread;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue