diff options
author | madmaxoft <github@xoft.cz> | 2014-09-04 14:02:18 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-04 14:02:18 +0200 |
commit | 3297a39c2709cacfd8d66dab80f2935018711890 (patch) | |
tree | 861a0ea04249e8a64201dec2ce03177f5e2eed1a /lib/inifile/iniFile.cpp | |
parent | Debuggers: Reviewed and fixed the Pickups and Poof commands. (diff) | |
parent | Anvil: Cleanly refuse to store data that is too large. (diff) | |
download | cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.gz cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.bz2 cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.lz cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.xz cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.zst cuberite-3297a39c2709cacfd8d66dab80f2935018711890.zip |
Diffstat (limited to 'lib/inifile/iniFile.cpp')
-rw-r--r-- | lib/inifile/iniFile.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/inifile/iniFile.cpp b/lib/inifile/iniFile.cpp index 2bf6c91ed..7cfe7661f 100644 --- a/lib/inifile/iniFile.cpp +++ b/lib/inifile/iniFile.cpp @@ -668,6 +668,24 @@ void cIniFile::Clear(void) +bool cIniFile::HasValue(const AString & a_KeyName, const AString & a_ValueName) +{ + // Find the key: + int keyID = FindKey(a_KeyName); + if (keyID == noID) + { + return false; + } + + // Find the value: + int valueID = FindValue(keyID, a_ValueName); + return (valueID != noID); +} + + + + + void cIniFile::AddHeaderComment(const AString & comment) { comments.push_back(comment); |