summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 34d301446..d43cca15e 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -226,6 +226,14 @@ void Configuration::setValue(const std::string &key, const std::string &value)
}
}
+void Configuration::incValue(const std::string &key)
+{
+ GETLOG();
+ const Options::const_iterator iter = mOptions.find(key);
+ setValue(key, (iter != mOptions.end())
+ ? atoi(iter->second.c_str()) + 1 : 1);
+}
+
void Configuration::setSilent(const std::string &key, const std::string &value)
{
ConfigurationObject::setValue(key, value);