diff options
author | Max Kellermann <max@duempel.org> | 2015-06-26 00:10:18 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-06-26 00:11:33 +0200 |
commit | f415167e5980908f8719cf5778ca2758ba46e53b (patch) | |
tree | d4faba6b26f3bd5e8c4444ddca8255706b15d5b8 /src/config | |
parent | 9477db236329a17891105c68bda99073196a3f69 (diff) |
config/Templates: add attribute "deprecated"
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/ConfigTemplates.cxx | 6 | ||||
-rw-r--r-- | src/config/ConfigTemplates.hxx | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/config/ConfigTemplates.cxx b/src/config/ConfigTemplates.cxx index 7d28d9ffc..44eb6c252 100644 --- a/src/config/ConfigTemplates.cxx +++ b/src/config/ConfigTemplates.cxx @@ -70,9 +70,9 @@ const ConfigTemplate config_param_templates[] = { { "gapless_mp3_playback" }, { "auto_update" }, { "auto_update_depth" }, - { "despotify_user" }, - { "despotify_password" }, - { "despotify_high_bitrate" }, + { "despotify_user", false, true }, + { "despotify_password", false, true }, + { "despotify_high_bitrate", false, true }, }; static constexpr unsigned n_config_param_templates = diff --git a/src/config/ConfigTemplates.hxx b/src/config/ConfigTemplates.hxx index 7b01ad40f..3a18ebdc8 100644 --- a/src/config/ConfigTemplates.hxx +++ b/src/config/ConfigTemplates.hxx @@ -24,9 +24,14 @@ struct ConfigTemplate { const char *const name; const bool repeatable; + // TODO: print warning when a deprecated option is used + const bool deprecated; + constexpr ConfigTemplate(const char *_name, - bool _repeatable=false) - :name(_name), repeatable(_repeatable) {} + bool _repeatable=false, + bool _deprecated=false) + :name(_name), repeatable(_repeatable), + deprecated(_deprecated) {} }; extern const ConfigTemplate config_param_templates[]; |