forked from external/yambar
config: simplify assignment of default particle when instantiating a map
This commit is contained in:
parent
e92e99c5d3
commit
f91d091386
1 changed files with 3 additions and 3 deletions
6
config.c
6
config.c
|
@ -197,9 +197,9 @@ particle_map_from_config(const struct yml_node *node, const struct font *parent_
|
||||||
assert(particle_map[idx].particle != NULL);
|
assert(particle_map[idx].particle != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct particle *default_particle = NULL;
|
struct particle *default_particle = def != NULL
|
||||||
if (def != NULL)
|
? particle_from_config(def, parent_font)
|
||||||
default_particle = particle_from_config(def, parent_font);
|
: NULL;
|
||||||
|
|
||||||
return particle_map_new(
|
return particle_map_new(
|
||||||
yml_value_as_string(tag), particle_map, yml_dict_length(values),
|
yml_value_as_string(tag), particle_map, yml_dict_length(values),
|
||||||
|
|
Loading…
Add table
Reference in a new issue