From f415167e5980908f8719cf5778ca2758ba46e53b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 26 Jun 2015 00:10:18 +0200 Subject: config/Templates: add attribute "deprecated" --- src/config/ConfigTemplates.cxx | 6 +++--- src/config/ConfigTemplates.hxx | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src') 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[]; -- cgit v1.2.3