1
0
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:
sfan5
2020-07-23 19:47:58 +02:00
committed by GitHub
parent 76afde861d
commit 8ca602150d
3 changed files with 17 additions and 18 deletions

View File

@@ -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;