From fe0b896665a8eb85a447dd62cf6a00bbd7398347 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 6 Sep 2019 07:58:43 -0700 Subject: [PATCH] map fix --- root/root.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/root.cpp b/root/root.cpp index 51a1d120f..d0e0ca88e 100644 --- a/root/root.cpp +++ b/root/root.cpp @@ -1021,7 +1021,7 @@ int main(int argc,char **argv) if (!p->second.empty()) { if (p->first.isV4()) { k4.first = ip4ToH32(p->first); - auto geo = std::make_reverse_iterator(s_geoIp4.upper_bound(k4)); + auto geo = std::map< std::pair< uint32_t,uint32_t >,std::pair< float,float > >::reverse_iterator(s_geoIp4.upper_bound(k4)); while (geo != s_geoIp4.rend()) { if ((geo->first.first <= k4.first)&&(geo->first.second >= k4.first)) { if (!firstCoord) @@ -1044,7 +1044,7 @@ int main(int argc,char **argv) } } else if (p->first.isV6()) { k6.first = ip6ToH128(p->first); - auto geo = std::make_reverse_iterator(s_geoIp6.upper_bound(k6)); + auto geo = std::map< std::pair< std::array< uint64_t,2 >,std::array< uint64_t,2 > >,std::pair< float,float > >::reverse_iterator(s_geoIp6.upper_bound(k6)); while (geo != s_geoIp6.rend()) { if ((geo->first.first <= k6.first)&&(geo->first.second >= k6.first)) { if (!firstCoord)