MCPcopy Create free account
hub / github.com/Norbyte/bg3se / FindIndex

Method FindIndex

CoreLib/Base/SparseArray.h:256–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254 PagedArray<TValue, TAllocator> Values;
255
256 uint16_t FindIndex(TKey const& key) const
257 {
258 auto hash = (uint32_t)SparseHashMapHash(key);
259 auto keyIndex = LookupTable.get(hash);
260 if (keyIndex && *keyIndex != InvalidIndex && Keys[*keyIndex] == key) {
261 return *keyIndex;
262 } else {
263 return InvalidIndex;
264 }
265 }
266
267 TValue const* Find(TKey const& key) const
268 {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected