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

Method InsertToHashMap

CoreLib/Base/BaseMap.h:290–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288
289private:
290 void InsertToHashMap(T const& key, int keyIdx)
291 {
292 auto bucket = (uint32_t)(HashMapHash(key) % HashKeys.size());
293 auto prevKeyIdx = HashKeys[bucket];
294 if (prevKeyIdx < 0) {
295 prevKeyIdx = -2 - (int)bucket;
296 }
297
298 NextIds[keyIdx] = prevKeyIdx;
299 HashKeys[bucket] = keyIdx;
300 }
301
302 void ResizeHashMap(unsigned int newSize)
303 {

Callers

nothing calls this directly

Calls 2

HashMapHashFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected