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

Function AssignIndices

native/thirdpart/flatbuffers/idl_parser.cpp:3475–3480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3473}
3474
3475template<typename T> void AssignIndices(const std::vector<T *> &defvec) {
3476 // Pre-sort these vectors, such that we can set the correct indices for them.
3477 auto vec = defvec;
3478 std::sort(vec.begin(), vec.end(), compareName<T>);
3479 for (int i = 0; i < static_cast<int>(vec.size()); i++) vec[i]->index = i;
3480}
3481
3482void Parser::Serialize() {
3483 builder_.Clear();

Callers 1

SerializeMethod · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected