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

Method LookupByKey

native/thirdpart/flatbuffers/flatbuffers.h:360–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358 T *data() { return reinterpret_cast<T *>(Data()); }
359
360 template<typename K> return_type LookupByKey(K key) const {
361 void *search_result = std::bsearch(
362 &key, Data(), size(), IndirectHelper<T>::element_stride, KeyCompare<K>);
363
364 if (!search_result) {
365 return nullptr; // Key not found.
366 }
367
368 const uint8_t *element = reinterpret_cast<const uint8_t *>(search_result);
369
370 return IndirectHelper<T>::Read(element, 0);
371 }
372
373 protected:
374 // This class is only used to access pre-existing data. Don't ever

Callers 1

reflection.hFile · 0.80

Calls 1

sizeFunction · 0.85

Tested by

no test coverage detected