MCPcopy Create free account
hub / github.com/defold/defold / AddEntry

Function AddEntry

engine/dlib/src/dlib/configfile.cpp:371–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369 }
370
371 static void AddEntry(Context* context, const char* key, const char* value)
372 {
373 uint64_t key_hash = dmHashString64(key);
374 if (ContainsKey(context->m_Entries, key_hash))
375 {
376 dmLogWarning("Config value '%s' specified twice. First value will be used.", key);
377 return;
378 }
379
380 uint32_t i = AddString(context, value);
381 if (context->m_Entries.Remaining() == 0)
382 {
383 context->m_Entries.OffsetCapacity(32);
384 }
385 context->m_Entries.Push(ConfigFileEntry(key_hash, i));
386 }
387
388 static void AddEntryWithHashedKey(Context* context, uint64_t key_hash, const char* value)
389 {

Callers 1

ParseEntryFunction · 0.70

Calls 6

ContainsKeyFunction · 0.85
AddStringFunction · 0.85
ConfigFileEntryClass · 0.85
RemainingMethod · 0.45
OffsetCapacityMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected