From 3d318071982cc80867098ca5fe2641f31a289ac8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 2 Jul 2017 13:00:22 +0200 Subject: m_option: remove redundant indirections Remove the various redundant m_config_set_option* calls, rename the remaining one to m_config_set_option_cli(), and merge the m_config_parse_option() function. --- options/m_config.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'options/m_config.h') diff --git a/options/m_config.h b/options/m_config.h index ff2dcf14a6..65145c093b 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -163,27 +163,9 @@ enum { // Flags for safe option setting during runtime. #define M_SETOPT_RUNTIME M_SETOPT_NO_FIXED -// Set the named option to the given string. -// flags: combination of M_SETOPT_* flags (0 for normal operation) -// Returns >= 0 on success, otherwise see OptionParserReturn. -int m_config_set_option_ext(struct m_config *config, struct bstr name, +int m_config_set_option_cli(struct m_config *config, struct bstr name, struct bstr param, int flags); -/* Set an option. (Like: m_config_set_option_ext(config, name, param, 0)) - * \param config The config object. - * \param name The option's name. - * \param param The value of the option, can be NULL. - * \return See \ref OptionParserReturn. - */ -int m_config_set_option(struct m_config *config, struct bstr name, - struct bstr param); - -static inline int m_config_set_option0(struct m_config *config, - const char *name, const char *param) -{ - return m_config_set_option(config, bstr0(name), bstr0(param)); -} - int m_config_set_option_raw(struct m_config *config, struct m_config_option *co, void *data, int flags); @@ -193,7 +175,6 @@ int m_config_set_option_raw_direct(struct m_config *config, struct m_config_option *co, void *data, int flags); -// Similar to m_config_set_option_ext(), but set as data using mpv_node. struct mpv_node; int m_config_set_option_node(struct m_config *config, bstr name, struct mpv_node *data, int flags); -- cgit v1.2.3