mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
options: Remove "reset" functionality from CONF_TYPE_FUNC[_PARAM]
The "reset to default before setting to something else" functionality is not used by any current option, but prevents using the "priv" field of the option data for anything else.
This commit is contained in:
parent
2b47fd59ab
commit
98b959ae1f
@ -762,8 +762,6 @@ static void set_func_param(const m_option_t* opt, void* dst, void* src) {
|
|||||||
|
|
||||||
if(!s) return;
|
if(!s) return;
|
||||||
|
|
||||||
// Revert if needed
|
|
||||||
if(opt->priv) ((m_opt_default_func_t)opt->priv)(opt,opt->name);
|
|
||||||
for( ; s != NULL ; s = s->next)
|
for( ; s != NULL ; s = s->next)
|
||||||
((m_opt_func_param_t) opt->p)(opt,s->param);
|
((m_opt_func_param_t) opt->p)(opt,s->param);
|
||||||
}
|
}
|
||||||
@ -821,7 +819,6 @@ static int parse_func(const m_option_t* opt,const char *name, char *param, void*
|
|||||||
|
|
||||||
static void set_func(const m_option_t* opt,void* dst, void* src) {
|
static void set_func(const m_option_t* opt,void* dst, void* src) {
|
||||||
int i;
|
int i;
|
||||||
if(opt->priv) ((m_opt_default_func_t)opt->priv)(opt,opt->name);
|
|
||||||
for(i = 0 ; i < VAL(src) ; i++)
|
for(i = 0 ; i < VAL(src) ; i++)
|
||||||
((m_opt_func_t) opt->p)(opt);
|
((m_opt_func_t) opt->p)(opt);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user