MCPcopy Create free account
hub / github.com/bwapi/bwapi / LoadConfigString

Function LoadConfigString

bwapi/BWAPI/Source/Config.cpp:52–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 return std::string(buffer);
51}
52std::string LoadConfigString(const char *pszKey, const char *pszItem, const char *pszDefault)
53{
54 std::string envKey = envKeyName(pszKey, pszItem);
55 if (char* v = std::getenv(envKey.c_str()))
56 return v;
57 else
58 return LoadConfigStringFromFile(pszKey, pszItem, pszDefault);
59}
60// this version uppercase result string after loading, should be used for the most of enum-like strings
61std::string LoadConfigStringUCase (const char *pszKey, const char *pszItem, const char *pszDefault)
62{

Callers 5

initializeAIModuleMethod · 0.85
LoadConfigStringUCaseFunction · 0.85
InitPrimaryConfigFunction · 0.85
reloadConfigMethod · 0.85

Calls 3

envKeyNameFunction · 0.85
LoadConfigStringFromFileFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected