mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 02:15:22 +02:00
Replace std::list<session_t> in networking code (#10215)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user