summaryrefslogtreecommitdiff
path: root/src/config.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-07-26 21:42:26 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-07-26 21:42:26 +0200
commit35ead0aaa5c7a7d9a17ab3dad65cfb9f0252889b (patch)
tree887b53e67080383626fd2d21b8e2a122f1f50272 /src/config.hh
parent9ae48fac3ba4592a2257618f0ff5b1ce528499d8 (diff)
Add Config::remove
Removes any config value set by Config::set()
Diffstat (limited to 'src/config.hh')
-rw-r--r--src/config.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.hh b/src/config.hh
index 5262e91..011e890 100644
--- a/src/config.hh
+++ b/src/config.hh
@@ -24,6 +24,10 @@ public:
virtual bool is_set(std::string const& key) = 0;
virtual void set(std::string const& key, std::string const& value) = 0;
+ virtual void set(std::string const& key, bool value) {
+ set(key, std::string(value ? "true" : "false"));
+ }
+ virtual void remove(std::string const& key) = 0;
protected:
Config() { }