ConfigData: move functions into the class

This commit is contained in:
Max Kellermann
2013-01-30 22:25:17 +01:00
parent d9ea3082fb
commit 6e47e79790
7 changed files with 37 additions and 38 deletions

View File

@@ -108,8 +108,7 @@ main(int argc, char **argv)
const struct config_param *path = config_get_param(CONF_DB_FILE);
config_param param("database", path->line);
if (path != nullptr)
config_add_block_param(&param, "path", path->value,
path->line);
param.AddBlockParam("path", path->value, path->line);
Database *db = plugin->create(&param, &error);

View File

@@ -74,7 +74,7 @@ int main(int argc, char **argv)
}
config_param param;
config_add_block_param(&param, "quality", "5.0", -1);
param.AddBlockParam("quality", "5.0", -1);
encoder = encoder_init(plugin, &param, &error);
if (encoder == NULL) {

View File

@@ -54,7 +54,7 @@ main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
assert(plugin != NULL);
config_param param;
config_add_block_param(&param, "quality", "5.0", -1);
param.AddBlockParam("quality", "5.0", -1);
struct encoder *encoder = encoder_init(plugin, &param, NULL);
assert(encoder != NULL);