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

Class ElementComparator

generator/intermediate_data.hpp:92–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 using Element = std::pair<Key, Value>;
91
92 struct ElementComparator
93 {
94 bool operator()(Element const & r1, Element const & r2) const
95 {
96 return ((r1.first == r2.first) ? r1.second < r2.second : r1.first < r2.first);
97 }
98 bool operator()(Element const & r1, Key r2) const { return (r1.first < r2); }
99 bool operator()(Key r1, Element const & r2) const { return (r1 < r2.first); }
100 };
101
102 std::vector<Element> m_elements;
103};

Callers 3

IndexFileReaderMethod · 0.85
GetValueByKeyMethod · 0.85
ForEachByKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected