Main: add Config constructor
This commit is contained in:
parent
7c565bce1d
commit
7d599c1afc
11
src/Main.cxx
11
src/Main.cxx
@ -133,13 +133,10 @@ Instance *global_instance;
|
|||||||
|
|
||||||
struct Config {
|
struct Config {
|
||||||
ReplayGainConfig replay_gain;
|
ReplayGainConfig replay_gain;
|
||||||
};
|
|
||||||
|
|
||||||
static Config
|
explicit Config(const ConfigData &raw)
|
||||||
LoadConfig(const ConfigData &config)
|
:replay_gain(LoadReplayGainConfig(raw)) {}
|
||||||
{
|
};
|
||||||
return {LoadReplayGainConfig(config)};
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENABLE_DAEMON
|
#ifdef ENABLE_DAEMON
|
||||||
|
|
||||||
@ -391,7 +388,7 @@ MainConfigured(const struct options &options, const ConfigData &raw_config)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
InitPathParser(raw_config);
|
InitPathParser(raw_config);
|
||||||
const auto config = LoadConfig(raw_config);
|
const Config config(raw_config);
|
||||||
|
|
||||||
#ifdef ENABLE_DAEMON
|
#ifdef ENABLE_DAEMON
|
||||||
glue_daemonize_init(&options, raw_config);
|
glue_daemonize_init(&options, raw_config);
|
||||||
|
Loading…
Reference in New Issue
Block a user