diff options
Diffstat (limited to 'src/libutil/config.hh')
-rw-r--r-- | src/libutil/config.hh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libutil/config.hh b/src/libutil/config.hh index 6c8612f67..952bf04b8 100644 --- a/src/libutil/config.hh +++ b/src/libutil/config.hh @@ -51,9 +51,11 @@ public: void warnUnknownSettings(); - StringMap getSettings(); + StringMap getSettings(bool overridenOnly = false); void applyConfigFile(const Path & path, bool fatal = false); + + void resetOverriden(); }; class AbstractSetting @@ -68,6 +70,8 @@ public: int created = 123; + bool overriden = false; + protected: AbstractSetting( @@ -78,7 +82,7 @@ protected: virtual ~AbstractSetting() { // Check against a gcc miscompilation causing our constructor - // not to run. + // not to run (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431). assert(created == 123); } @@ -88,6 +92,8 @@ protected: bool parseBool(const std::string & str); std::string printBool(bool b); + + bool isOverriden() { return overriden; } }; struct DefaultSettingTag { }; |