diff options
author | Max Kellermann <max@musicpd.org> | 2018-07-17 22:51:18 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-07-17 22:53:17 +0200 |
commit | 86c531b37d9984c50f34e9f326f25339b76b0eec (patch) | |
tree | a68caea47a50504fad614998e79c73ae92c96130 /src/Main.cxx | |
parent | a5b14a2ea76981fe4164e2be23a092835ff721c1 (diff) |
config/Data: move std::chrono parsers from Global.hxx
Diffstat (limited to 'src/Main.cxx')
-rw-r--r-- | src/Main.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index 205143f97..53e81ac98 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -53,6 +53,7 @@ #include "net/Init.hxx" #include "lib/icu/Init.hxx" #include "config/Global.hxx" +#include "config/Data.hxx" #include "config/Param.hxx" #include "config/Defaults.hxx" #include "config/Option.hxx" @@ -252,7 +253,7 @@ glue_sticker_init() } static void -glue_state_file_init() +glue_state_file_init(const ConfigData &config) { auto path_fs = config_get_path(ConfigOption::STATE_FILE); if (path_fs.IsNull()) { @@ -268,8 +269,8 @@ glue_state_file_init() } const auto interval = - config_get_unsigned(ConfigOption::STATE_FILE_INTERVAL, - StateFile::DEFAULT_INTERVAL); + config.GetUnsigned(ConfigOption::STATE_FILE_INTERVAL, + StateFile::DEFAULT_INTERVAL); instance->state_file = new StateFile(std::move(path_fs), interval, instance->partitions.front(), @@ -609,7 +610,7 @@ try { } #endif - glue_state_file_init(); + glue_state_file_init(raw_config); #ifdef ENABLE_DATABASE if (config_get_bool(ConfigOption::AUTO_UPDATE, false)) { |