From 35ead0aaa5c7a7d9a17ab3dad65cfb9f0252889b Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 26 Jul 2017 21:42:26 +0200 Subject: Add Config::remove Removes any config value set by Config::set() --- src/config.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/config.hh') 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() { } -- cgit v1.2.3-70-g09d2