Skip to content

Commit

Permalink
config/Templates: add attribute "deprecated"
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jun 25, 2015
1 parent 9477db2 commit f415167
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/config/ConfigTemplates.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
9 changes: 7 additions & 2 deletions src/config/ConfigTemplates.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down

0 comments on commit f415167

Please sign in to comment.