diff --git a/include/llarp/handlers/exit.hpp b/include/llarp/handlers/exit.hpp index ef779f192..aa2f40c3b 100644 --- a/include/llarp/handlers/exit.hpp +++ b/include/llarp/handlers/exit.hpp @@ -105,8 +105,10 @@ namespace llarp llarp::PubKey::Hash > m_ActiveExits; - std::unordered_map< llarp::PubKey, llarp::huint32_t, llarp::PubKey::Hash > - m_KeyToIP; + using KeyMap_t = std::unordered_map< llarp::PubKey, llarp::huint32_t, + llarp::PubKey::Hash >; + + KeyMap_t m_KeyToIP; std::unordered_map< llarp::huint32_t, llarp::PubKey, llarp::huint32_t::Hash > diff --git a/llarp/handlers/exit.cpp b/llarp/handlers/exit.cpp index 954e1c184..41408c73e 100644 --- a/llarp/handlers/exit.cpp +++ b/llarp/handlers/exit.cpp @@ -102,9 +102,9 @@ namespace llarp huint32_t ExitEndpoint::GetIPForIdent(const llarp::PubKey pk) { - huint32_t found = {0}; - const auto itr = m_KeyToIP.find(pk); - if(itr != m_KeyToIP.cend()) + huint32_t found = {0}; + KeyMap_t::iterator itr = m_KeyToIP.find(pk); + if(itr != m_KeyToIP.end()) { found.h = itr->second.h; }