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

Function GetBaseString

engine/dlib/src/dlib/configfile.cpp:91–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91static const char* GetBaseString(HConfigFile config, const char* key, const char* default_value)
92{
93 uint64_t key_hash = dmHashString64(key);
94 for (uint32_t i = 0; i < config->m_Entries.Size(); ++i)
95 {
96 const ConfigFileEntry*e = &config->m_Entries[i];
97 if (e->m_Key == key_hash)
98 {
99 return &config->m_StringBuffer[e->m_ValueIndex];
100 }
101 }
102
103 return default_value;
104}
105
106static bool GetStringOverride(HConfigFile config, const char* key, const char* default_value, const char** out_value)
107{

Callers 3

GetBaseIntFunction · 0.85
GetBaseFloatFunction · 0.85
ConfigFileGetStringFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected