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

Method Add

CoreLib/Base/SparseArray.h:284–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282
283 template <class... Args>
284 TValue* Add(TKey const& key, Args... args)
285 {
286 auto hash = (uint32_t)SparseHashMapHash(key);
287 auto nextIndex = (uint16_t)Keys.size();
288 LookupTable.set(hash, nextIndex);
289 new (Keys.add_uninitialized()) TKey(key);
290 return new (Values.add_uninitialized()) TValue(std::forward<Args>(args)...);
291 }
292};
293
294END_SE()

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
setMethod · 0.45
add_uninitializedMethod · 0.45

Tested by

no test coverage detected