| 63 | return Util::to_upper_copy(LoadConfigString(pszKey, pszItem, pszDefault)); |
| 64 | } |
| 65 | int 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 | } |
| 73 | void WriteConfig(const char *pszKey, const char *pszItem, const std::string& value) |
| 74 | { |
| 75 | // avoid writing unless the value is actually different, because writing causes |
no test coverage detected