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

Method forEachVec

valdi_protobuf/src/valdi_protobuf/FieldMap.hpp:111–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110 template<typename F>
111 void forEachVec(F&& handler) const {
112 FieldNumber index = 0;
113 for (const auto& item : getVec()) {
114 if (!item.isUnset()) {
115 handler(Entry(index, &item));
116 }
117 index++;
118 }
119 }
120
121 inline FieldMap::Vector& getVec() {
122 return *reinterpret_cast<FieldMap::Vector*>(&_storage);

Callers

nothing calls this directly

Calls 3

isUnsetMethod · 0.80
EntryClass · 0.70
handlerFunction · 0.50

Tested by

no test coverage detected