mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-29 07:12:16 +00:00
config: one less branching in load_default_profile(), some whitespace.
This commit is contained in:
parent
ef722e697d
commit
76dd32a2c8
@ -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…
x
Reference in New Issue
Block a user