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

Function LoadConfigInt

bwapi/BWAPI/Source/Config.cpp:65–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 return Util::to_upper_copy(LoadConfigString(pszKey, pszItem, pszDefault));
64}
65int LoadConfigInt(const char *pszKey, const char *pszItem, const int iDefault)
66{
67 std::string envKey = envKeyName(pszKey, pszItem);
68 if (char* v = std::getenv(envKey.c_str()))
69 return std::stoi(v);
70 else
71 return GetPrivateProfileIntA(pszKey, pszItem, iDefault, configPath().c_str());
72}
73void WriteConfig(const char *pszKey, const char *pszItem, const std::string& value)
74{
75 // avoid writing unless the value is actually different, because writing causes

Callers 4

InitPrimaryConfigFunction · 0.85
loadAutoMenuDataMethod · 0.85
AutoMenuManagerMethod · 0.85
reloadConfigMethod · 0.85

Calls 2

envKeyNameFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected