MCPcopy Create free account
hub / github.com/comaps/comaps / ForEachCountryInRect

Method ForEachCountryInRect

generator/borders.hpp:114–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113 template <typename ToDo>
114 void ForEachCountryInRect(m2::RectD const & rect, ToDo && toDo) const
115 {
116 ankerl::unordered_dense::set<CountryPolygons const *> uniq;
117 m_regionsTree.ForEachInRect(rect, [&](CountryPolygons const & cp)
118 {
119 if (uniq.insert(&cp).second)
120 toDo(cp);
121 });
122 }
123
124 bool HasRegionByName(std::string const & name) const { return m_countryPolygonsMap.count(name) != 0; }
125

Callers 2

GetAffiliationsFunction · 0.80
BuildIndexMethod · 0.80

Calls 2

ForEachInRectMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected