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

Method AddDrawRule

libs/indexer/classificator.cpp:53–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void ClassifObject::AddDrawRule(drule::Key const & k)
54{
55 auto i = std::lower_bound(m_drawRules.begin(), m_drawRules.end(), k.m_scale, less_scales());
56 for (; i != m_drawRules.end() && i->m_scale == k.m_scale; ++i)
57 if (k == *i)
58 return; // already exists
59 m_drawRules.insert(i, k);
60
61 if (k.m_priority > m_maxOverlaysPriority && (k.m_type == drule::symbol || k.m_type == drule::caption ||
62 k.m_type == drule::shield || k.m_type == drule::pathtext))
63 m_maxOverlaysPriority = k.m_priority;
64}
65
66ClassifObjectPtr ClassifObject::BinaryFind(std::string_view const s) const
67{

Callers 1

AddRuleMethod · 0.80

Calls 4

less_scalesClass · 0.85
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected