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

Method SortByValue

native/thirdpart/flatbuffers/idl_parser.cpp:2147–2157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2145}
2146
2147void EnumDef::SortByValue() {
2148 auto &v = vals.vec;
2149 if (IsUInt64())
2150 std::sort(v.begin(), v.end(), [](const EnumVal *e1, const EnumVal *e2) {
2151 return e1->GetAsUInt64() < e2->GetAsUInt64();
2152 });
2153 else
2154 std::sort(v.begin(), v.end(), [](const EnumVal *e1, const EnumVal *e2) {
2155 return e1->GetAsInt64() < e2->GetAsInt64();
2156 });
2157}
2158
2159void EnumDef::RemoveDuplicates() {
2160 // This method depends form SymbolTable implementation!

Callers 1

ParseEnumMethod · 0.80

Calls 4

GetAsUInt64Method · 0.80
GetAsInt64Method · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected