m_config: remove m_config_create_shadow

A previous commit changed m_config so that it always creates the shadow
thing, and the function's only remaining purpose was to initialize
mpv_global. It makes much more sense to do that at the caller, and it's
only 1 line of code too.
This commit is contained in:
wm4
2019-07-13 01:22:37 +02:00
parent cd3394f039
commit 8ffd1073a2
3 changed files with 1 additions and 13 deletions

View File

@@ -1234,14 +1234,6 @@ struct mpv_node m_config_get_profiles(struct m_config *config)
return root;
}
void m_config_create_shadow(struct m_config *config)
{
assert(config->global);
assert(!config->global->config);
config->global->config = config->shadow;
}
static void cache_destroy(void *p)
{
struct m_config_cache *cache = p;

View File

@@ -107,10 +107,6 @@ struct m_config *m_config_new(void *talloc_ctx, struct mp_log *log,
size_t size, const void *defaults,
const struct m_option *options);
// Creates "backup" shadow memory for use with m_config_cache. Sets it on
// mpv_global. Expected to be called at early init on the main m_config.
void m_config_create_shadow(struct m_config *config);
// Create a m_config for the given desc. This is for --af/--vf, which have
// different sub-options for every filter (represented by separate desc
// structs).