summaryrefslogtreecommitdiffstats
path: root/lib/inifile/iniFile.cpp
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-09-05 11:27:21 +0200
committerMasy98 <masy@antheruscraft.de>2014-09-05 11:27:21 +0200
commit15bee41a3657498e0072007e24abec50aac2c8df (patch)
tree863ae0ba1fef38d5da79aeb357e955c52d838caa /lib/inifile/iniFile.cpp
parentAdded new recipes! (diff)
parentMerge pull request #1375 from mc-server/EntitiesInBox (diff)
downloadcuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar
cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.gz
cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.bz2
cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.lz
cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.xz
cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.zst
cuberite-15bee41a3657498e0072007e24abec50aac2c8df.zip
Diffstat (limited to 'lib/inifile/iniFile.cpp')
-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);