diff options
author | Arthur Gautier <arthur.gautier@arista.com> | 2021-12-01 16:08:23 +0100 |
---|---|---|
committer | Arthur Gautier <arthur.gautier@arista.com> | 2021-12-01 17:25:58 +0100 |
commit | 21520297dad8a198004e4551808a4818a8de7ddd (patch) | |
tree | a69a5c19b1528a88414401c3066e266c0983ebb5 /src/libutil/config.hh | |
parent | 1a9bfdc4ca0c2786b02801540432badbafa3a811 (diff) |
reproducibility: hide non-reproducible settings from manual
Because the manual is generated from default values which are themselves
generated from various sources (cpuid, bios settings (kvm), number of
cores). This commit hides non-reproducible settings from the manual
output.
Diffstat (limited to 'src/libutil/config.hh')
-rw-r--r-- | src/libutil/config.hh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libutil/config.hh b/src/libutil/config.hh index 736810bf3..79ec0f9cf 100644 --- a/src/libutil/config.hh +++ b/src/libutil/config.hh @@ -232,16 +232,19 @@ protected: T value; const T defaultValue; + const bool documentDefault; public: BaseSetting(const T & def, + const bool documentDefault, const std::string & name, const std::string & description, const std::set<std::string> & aliases = {}) : AbstractSetting(name, description, aliases) , value(def) , defaultValue(def) + , documentDefault(documentDefault) { } operator const T &() const { return value; } @@ -288,8 +291,9 @@ public: const T & def, const std::string & name, const std::string & description, - const std::set<std::string> & aliases = {}) - : BaseSetting<T>(def, name, description, aliases) + const std::set<std::string> & aliases = {}, + const bool documentDefault = true) + : BaseSetting<T>(def, documentDefault, name, description, aliases) { options->addSetting(this); } @@ -311,7 +315,7 @@ public: const std::string & name, const std::string & description, const std::set<std::string> & aliases = {}) - : BaseSetting<Path>(def, name, description, aliases) + : BaseSetting<Path>(def, true, name, description, aliases) , allowEmpty(allowEmpty) { options->addSetting(this); |