test/DumpDatabase: use struct ConfigData

This commit is contained in:
Max Kellermann 2018-07-17 23:41:37 +02:00
parent 113141bf2a
commit 1b4181d983

View File

@ -27,6 +27,7 @@
#include "db/LightSong.hxx" #include "db/LightSong.hxx"
#include "db/PlaylistVector.hxx" #include "db/PlaylistVector.hxx"
#include "config/Global.hxx" #include "config/Global.hxx"
#include "config/Data.hxx"
#include "config/Param.hxx" #include "config/Param.hxx"
#include "config/Block.hxx" #include "config/Block.hxx"
#include "tag/Config.hxx" #include "tag/Config.hxx"
@ -126,13 +127,15 @@ try {
ReadConfigFile(config_path); ReadConfigFile(config_path);
TagLoadConfig(GetGlobalConfig()); const auto &config = GetGlobalConfig();
TagLoadConfig(config);
MyDatabaseListener database_listener; MyDatabaseListener database_listener;
/* do it */ /* do it */
const auto *path = config_get_param(ConfigOption::DB_FILE); const auto *path = config.GetParam(ConfigOption::DB_FILE);
ConfigBlock block(path != nullptr ? path->line : -1); ConfigBlock block(path != nullptr ? path->line : -1);
if (path != nullptr) if (path != nullptr)
block.AddBlockParam("path", path->value, path->line); block.AddBlockParam("path", path->value, path->line);