m_config: remove unused fields

This commit is contained in:
wm4 2018-05-21 00:11:48 +02:00
parent 5ae271e4f4
commit 3f061dd629
2 changed files with 2 additions and 8 deletions

View File

@ -304,8 +304,7 @@ struct m_config *m_config_new(void *talloc_ctx, struct mp_log *log,
{ {
struct m_config *config = talloc(talloc_ctx, struct m_config); struct m_config *config = talloc(talloc_ctx, struct m_config);
talloc_set_destructor(config, config_destroy); talloc_set_destructor(config, config_destroy);
*config = (struct m_config) *config = (struct m_config){.log = log,};
{.log = log, .size = size, .defaults = defaults, .options = options};
struct m_sub_options *subopts = talloc_ptrtype(config, subopts); struct m_sub_options *subopts = talloc_ptrtype(config, subopts);
*subopts = (struct m_sub_options){ *subopts = (struct m_sub_options){
@ -1233,7 +1232,7 @@ struct mpv_node m_config_get_profiles(struct m_config *config)
void m_config_create_shadow(struct m_config *config) void m_config_create_shadow(struct m_config *config)
{ {
assert(config->global && config->options && config->size); assert(config->global);
assert(!config->shadow && !config->global->config); assert(!config->shadow && !config->global->config);
config->shadow = talloc_zero(NULL, struct m_config_shadow); config->shadow = talloc_zero(NULL, struct m_config_shadow);

View File

@ -60,11 +60,6 @@ typedef struct m_config {
struct m_config_option *opts; // all options, even suboptions struct m_config_option *opts; // all options, even suboptions
int num_opts; int num_opts;
// Creation parameters
size_t size;
const void *defaults;
const struct m_option *options;
// List of defined profiles. // List of defined profiles.
struct m_profile *profiles; struct m_profile *profiles;
// Depth when recursively including profiles. // Depth when recursively including profiles.