From ad7daf7b52348e1b71aa803be10de5b2134cba11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 27 Sep 2017 19:47:36 +0200 Subject: Add session_t typedef + remove unused functions (#6470) * Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id --- src/client.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 4e6dc102c..13ee8bb76 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1218,11 +1218,7 @@ void Client::sendPlayerPos() //infostream << "Sending Player Position information" << std::endl; - u16 our_peer_id; - { - //MutexAutoLock lock(m_con_mutex); //bulk comment-out - our_peer_id = m_con->GetPeerID(); - } + session_t our_peer_id = m_con->GetPeerID(); // Set peer id if not set already if(myplayer->peer_id == PEER_ID_INEXISTENT) @@ -1243,7 +1239,7 @@ void Client::sendPlayerItem(u16 item) if(myplayer == NULL) return; - u16 our_peer_id = m_con->GetPeerID(); + session_t our_peer_id = m_con->GetPeerID(); // Set peer id if not set already if(myplayer->peer_id == PEER_ID_INEXISTENT) -- cgit v1.2.3