MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getEntries

Method getEntries

valdi_protobuf/src/valdi_protobuf/FieldMap.cpp:185–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185FieldMap::EntryList FieldMap::getEntries() const {
186 FieldMap::EntryList output;
187
188 if (VALDI_UNLIKELY(_isMap)) {
189 forEachMap([&](const auto& entry) {
190 auto it = std::upper_bound(
191 output.begin(), output.end(), entry, [=](const FieldMap::Entry& a, const FieldMap::Entry& b) {
192 return a.number < b.number;
193 });
194
195 output.emplace(it, entry);
196 });
197 } else {
198 forEachVec([&](const auto& entry) { output.emplace_back(entry); });
199 }
200
201 return output;
202}
203
204bool FieldMap::isUsingMap() const {
205 return _isMap;

Callers 11

TESTFunction · 0.45
visitES6CollectionMethod · 0.45
deserializeMethod · 0.45
populateMethod · 0.45
parseMethod · 0.45
transformMethod · 0.45
deserializeMethod · 0.45
TESTFunction · 0.45
onDrawMethod · 0.45

Calls 3

endMethod · 0.65
beginMethod · 0.45
emplaceMethod · 0.45

Tested by 3

TESTFunction · 0.36
visitES6CollectionMethod · 0.36
TESTFunction · 0.36