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

Function WriteConfig

bwapi/BWAPI/Source/Config.cpp:73–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
76 // an annoying popup when having the file open in e.g. notepad++
77 if (LoadConfigStringFromFile(pszKey, pszItem, "_NULL") != value)
78 WritePrivateProfileStringA(pszKey, pszItem, value.c_str(), configPath().c_str());
79}
80void WriteConfig(const char *pszKey, const char *pszItem, int value)
81{
82 WriteConfig(pszKey, pszItem, std::to_string(value));

Callers 2

WindowProcFunction · 0.85
SetWModeFunction · 0.85

Calls 2

LoadConfigStringFromFileFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected