mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
ConfigParser: Implement ReadBool
This may break backwards compatibility in some cases. For example, the FreeDiskSpace measure treated only `Type=1` as true and `Type={0, 2, 3, ...}` as false. Now `Type=0` is false and everything else is true like with most other boolean options.
This commit is contained in:
@ -69,6 +69,7 @@ public:
|
||||
const std::wstring& ReadString(LPCTSTR section, LPCTSTR key, LPCTSTR defValue, bool bReplaceMeasures = true);
|
||||
bool IsKeyDefined(LPCTSTR section, LPCTSTR key);
|
||||
bool IsValueDefined(LPCTSTR section, LPCTSTR key);
|
||||
bool ReadBool(LPCTSTR section, LPCTSTR key, bool defValue) { return ReadInt(section, key, (int)defValue) != 0; }
|
||||
int ReadInt(LPCTSTR section, LPCTSTR key, int defValue);
|
||||
uint32_t ReadUInt(LPCTSTR section, LPCTSTR key, uint32_t defValue);
|
||||
uint64_t ReadUInt64(LPCTSTR section, LPCTSTR key, uint64_t defValue);
|
||||
|
Reference in New Issue
Block a user