From 6bcfbd66cf046c40e476c187d2f304229b2b9385 Mon Sep 17 00:00:00 2001 From: friedkeenan Date: Mon, 10 Sep 2018 20:29:06 -0500 Subject: [PATCH] Better "default:" --- common/theme.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/theme.c b/common/theme.c index f4b01b9..1847f93 100644 --- a/common/theme.c +++ b/common/theme.c @@ -58,6 +58,7 @@ void themeStartup(ThemePreset preset) { switch (preset) { case THEME_PRESET_LIGHT: + default: themeDefault = &themeLight; if (good_cfg) theme = config_lookup(cfg, "lightTheme"); @@ -68,13 +69,9 @@ void themeStartup(ThemePreset preset) { if (good_cfg) theme = config_lookup(cfg, "darkTheme"); break; - default: - themeDefault = &themeDark; - if (good_cfg) - theme = config_lookup(cfg, "darkTheme"); } - if (good_cfg){ + if (good_cfg) { if (theme != NULL) { if (!colorFromSetting(config_setting_lookup(theme, "textColor"), &text)) text = themeDefault->textColor;