summaryrefslogtreecommitdiffstats
path: root/lib/inifile/iniFile.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-03 23:00:16 +0200
committermadmaxoft <github@xoft.cz>2014-09-03 23:00:16 +0200
commitfac89d0c437c822e41fe12529a875279f48fd2d0 (patch)
treed2fac801d1a38b576313c0ad7ccf69f19cbfb57f /lib/inifile/iniFile.cpp
parentUpdated SQLiteCpp. (diff)
downloadcuberite-fac89d0c437c822e41fe12529a875279f48fd2d0.tar
cuberite-fac89d0c437c822e41fe12529a875279f48fd2d0.tar.gz
cuberite-fac89d0c437c822e41fe12529a875279f48fd2d0.tar.bz2
cuberite-fac89d0c437c822e41fe12529a875279f48fd2d0.tar.lz
cuberite-fac89d0c437c822e41fe12529a875279f48fd2d0.tar.xz
cuberite-fac89d0c437c822e41fe12529a875279f48fd2d0.tar.zst
cuberite-fac89d0c437c822e41fe12529a875279f48fd2d0.zip
Diffstat (limited to '')
-rw-r--r--lib/inifile/iniFile.cpp18
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);