From ee0d603a819db0cd49a89d78dd301b2363f63808 Mon Sep 17 00:00:00 2001 From: EinMByte Date: Sun, 30 Aug 2015 12:10:33 +0200 Subject: [PATCH] Fix remaining warnings (fixes #260). --- core/transport/Transports.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/transport/Transports.cpp b/core/transport/Transports.cpp index faa1f5a6..a3923a51 100644 --- a/core/transport/Transports.cpp +++ b/core/transport/Transports.cpp @@ -239,8 +239,9 @@ namespace transport try { auto r = netdb.FindRouter (ident); - it = m_Peers.insert (std::pair(ident, { 0, r, {}, - i2p::util::GetSecondsSinceEpoch () })).first; + it = m_Peers.insert(std::make_pair( + ident, Peer{ 0, r, {}, i2p::util::GetSecondsSinceEpoch (), {} } + )).first; connected = ConnectToPeer (ident, it->second); } catch (std::exception& ex) @@ -436,7 +437,9 @@ namespace transport it->second.delayedMessages.clear (); } else // incoming connection - m_Peers.insert (std::make_pair (ident, Peer{ 0, nullptr, { session }, i2p::util::GetSecondsSinceEpoch () })); + m_Peers.insert(std::make_pair( + ident, Peer{ 0, nullptr, { session }, i2p::util::GetSecondsSinceEpoch (), {} } + )); }); }