mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
* fix compilation warnings
This commit is contained in:
parent
f62d25fa5f
commit
1b2ac38a50
12 changed files with 13 additions and 15 deletions
|
@ -606,7 +606,7 @@ namespace transport
|
|||
|
||||
std::shared_ptr<const i2p::data::RouterInfo> Transports::GetRandomPeer () const
|
||||
{
|
||||
if (!m_Peers.size ()) return nullptr;
|
||||
if (m_Peers.empty ()) return nullptr;
|
||||
std::unique_lock<std::mutex> l(m_PeersMutex);
|
||||
auto it = m_Peers.begin ();
|
||||
std::advance (it, rand () % m_Peers.size ());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue