MCPcopy Create free account
hub / github.com/apache/brpc / SmallMapIsSubset

Function SmallMapIsSubset

test/small_map_unittest.cc:141–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139
140template<class inner>
141static bool SmallMapIsSubset(SmallMap<inner> const& a,
142 SmallMap<inner> const& b) {
143 typename SmallMap<inner>::const_iterator it;
144 for (it = a.begin(); it != a.end(); ++it) {
145 typename SmallMap<inner>::const_iterator it_in_b = b.find(it->first);
146 if (it_in_b == b.end() || it_in_b->second != it->second)
147 return false;
148 }
149 return true;
150}
151
152template<class inner>
153static bool SmallMapEqual(SmallMap<inner> const& a,

Callers 1

SmallMapEqualFunction · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected