summaryrefslogtreecommitdiffstats
path: root/core/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-08 21:09:18 +0100
committerwm4 <wm4@nowhere>2013-02-09 00:21:17 +0100
commit88d843f909f00ffd9c25016a9af58546fabbfd2c (patch)
tree835450867fbd262fac8af7831df1c7732b86ffe2 /core/m_option.h
parent267a889cc2c5ca688a2b8fc93cf8e5349a3c8a44 (diff)
downloadmpv-88d843f909f00ffd9c25016a9af58546fabbfd2c.tar.bz2
mpv-88d843f909f00ffd9c25016a9af58546fabbfd2c.tar.xz
cleanup: replace OPT_FLAG_ON and OPT_MAKE_FLAGS with OPT_FLAG
OPT_MAKE_FLAGS() used to emit two options (one with "no" prefixed), but that has been long removed by special casing flag options in the option parser. OPT_FLAG_ON() used to imply that there's no "no-" prefixed option, but this hasn't been the case for a while either. (Conceptually, it has been replaced by OPT_FLAG_STORE().) Remove OPT_FLAG_OFF, which was unused.
Diffstat (limited to 'core/m_option.h')
-rw-r--r--core/m_option.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/m_option.h b/core/m_option.h
index e63bf3610f..9ae8797a44 100644
--- a/core/m_option.h
+++ b/core/m_option.h
@@ -520,9 +520,7 @@ static inline void m_option_free(const m_option_t *opt, void *dst)
* 0). Thus the first OPT_FLAG_CONSTANTS is a wrapper which just adds one
* argument to ensure __VA_ARGS__ is not empty when calling the next macro.
*/
-#define OPT_FLAG_ON(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_flag, .max = 1)
-#define OPT_FLAG_OFF(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_flag, .min = 1)
-#define OPT_MAKE_FLAGS OPT_FLAG_ON
+#define OPT_FLAG(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_flag, .max = 1)
#define OPT_FLAG_CONSTANTS(...) OPT_FLAG_CONSTANTS_(__VA_ARGS__, .type = &m_option_type_flag)
#define OPT_FLAG_CONSTANTS_(optname, varname, flags, offvalue, value, ...) OPT_GENERAL(optname, varname, flags, .min = offvalue, .max = value, __VA_ARGS__)
#define OPT_FLAG_STORE(optname, varname, flags, value) OPT_GENERAL(optname, varname, flags, .max = value, .type = &m_option_type_store)