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

Method BinaryFind

libs/indexer/classificator.cpp:66–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66ClassifObjectPtr ClassifObject::BinaryFind(std::string_view const s) const
67{
68 auto const i = std::lower_bound(m_objs.begin(), m_objs.end(), s, LessName());
69 if ((i == m_objs.end()) || ((*i).m_name != s))
70 return {nullptr, 0};
71 else
72 return {&(*i), static_cast<size_t>(std::distance(m_objs.begin(), i))};
73}
74
75void ClassifObject::LoadPolicy::Start(size_t i)
76{

Callers 1

GetTypeByPathImplMethod · 0.80

Calls 4

LessNameClass · 0.85
distanceFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected