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

Class KeyOffsetCompare

native/thirdpart/flatbuffers/flexbuffers.h:1597–1607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1595 BitWidth force_min_bit_width_;
1596
1597 struct KeyOffsetCompare {
1598 explicit KeyOffsetCompare(const std::vector<uint8_t> &buf) : buf_(&buf) {}
1599 bool operator()(size_t a, size_t b) const {
1600 auto stra =
1601 reinterpret_cast<const char *>(flatbuffers::vector_data(*buf_) + a);
1602 auto strb =
1603 reinterpret_cast<const char *>(flatbuffers::vector_data(*buf_) + b);
1604 return strcmp(stra, strb) < 0;
1605 }
1606 const std::vector<uint8_t> *buf_;
1607 };
1608
1609 typedef std::pair<size_t, size_t> StringOffset;
1610 struct StringOffsetCompare {

Callers 1

flexbuffers.hFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected