From 29647880551c7b15944d6299a2cd5d502a4efb88 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 20 Dec 2017 05:50:42 +0100 Subject: options: deprecate --ff- options and properties Some old crap which nobody needs and which probably nobody uses. This relies on a GCC extension: using "## __VA_ARGS__" to remove the comma from the argument list if the va args are empty. It's supported by clang, and there's some chance newer standards will introduce a proper way to do this. (Even if it breaks somewhere, it will be a problem only for 1 release, since I want to drop the deprecated properties immediately.) --- options/m_option.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'options/m_option.h') diff --git a/options/m_option.h b/options/m_option.h index 104fd9519c..d61fde963d 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -670,8 +670,9 @@ extern const char m_option_path_separator; #define OPT_SIZE_BOX(...) \ OPT_GENERAL(struct m_geometry, __VA_ARGS__, .type = &m_option_type_size_box) -#define OPT_TRACKCHOICE(name, var) \ - OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1})) +#define OPT_TRACKCHOICE(name, var, ...) \ + OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1}), \ + ## __VA_ARGS__) #define OPT_ASPECT(...) \ OPT_GENERAL(float, __VA_ARGS__, .type = &m_option_type_aspect) -- cgit v1.2.3