MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / ReverseLookup

Method ReverseLookup

native/thirdpart/flatbuffers/idl_parser.cpp:2123–2130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2121}
2122
2123EnumVal *EnumDef::ReverseLookup(int64_t enum_idx,
2124 bool skip_union_default) const {
2125 auto skip_first = static_cast<int>(is_union && skip_union_default);
2126 for (auto it = Vals().begin() + skip_first; it != Vals().end(); ++it) {
2127 if ((*it)->GetAsInt64() == enum_idx) { return *it; }
2128 }
2129 return nullptr;
2130}
2131
2132EnumVal *EnumDef::FindByValue(const std::string &constant) const {
2133 int64_t i64;

Callers 1

ParseAnyValueMethod · 0.80

Calls 3

GetAsInt64Method · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected