Browse Source

config: one less branching in load_default_profile(), some whitespace.

djm34
Noel Maersk 11 years ago
parent
commit
76dd32a2c8
  1. 11
      config_parser.c

11
config_parser.c

@ -656,15 +656,15 @@ void load_default_config(void)
// assign default settings from default profile if set // assign default settings from default profile if set
void load_default_profile() void load_default_profile()
{ {
struct profile *profile; applog(LOG_DEBUG, "default_profile.name is %s", default_profile.name);
if (empty_string(default_profile.name)) if (empty_string(default_profile.name))
{ {
applog(LOG_WARNING, "Default profile name not set."); applog(LOG_WARNING, "Default profile name is not set.");
return; return;
} }
else
{ struct profile *profile;
// find profile ... // find profile ...
profile = get_profile(default_profile.name); profile = get_profile(default_profile.name);
if (!profile) { if (!profile) {
@ -692,7 +692,6 @@ void load_default_profile()
default_profile.shaders = profile->shaders; default_profile.shaders = profile->shaders;
default_profile.worksize = profile->worksize; default_profile.worksize = profile->worksize;
} }
}
//apply default settings //apply default settings
void apply_defaults() void apply_defaults()

Loading…
Cancel
Save