aboutsummaryrefslogtreecommitdiff
path: root/test/run_filter.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-30 17:52:51 +0100
committerMax Kellermann <max@duempel.org>2013-01-30 21:36:04 +0100
commit595b6a4f6c2a6f12fb2b3c83f4053942844ffa84 (patch)
treebdfaf87414fac0359a8fd2e15911098fbe9d6348 /test/run_filter.cxx
parentdaa46477125145dd943122c8064c7271a1a9429f (diff)
ConfigFile: add enum ConfigOption
Look up top-level config options by enum (= integer), not by name string.
Diffstat (limited to 'test/run_filter.cxx')
-rw-r--r--test/run_filter.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/run_filter.cxx b/test/run_filter.cxx
index b05e458a..dbf6caa9 100644
--- a/test/run_filter.cxx
+++ b/test/run_filter.cxx
@@ -56,11 +56,11 @@ my_log_func(const gchar *log_domain, G_GNUC_UNUSED GLogLevelFlags log_level,
}
static const struct config_param *
-find_named_config_block(const char *block, const char *name)
+find_named_config_block(ConfigOption option, const char *name)
{
const struct config_param *param = NULL;
- while ((param = config_get_next_param(block, param)) != NULL) {
+ while ((param = config_get_next_param(option, param)) != NULL) {
const char *current_name =
config_get_block_string(param, "name", NULL);
if (current_name != NULL && strcmp(current_name, name) == 0)
@@ -77,7 +77,7 @@ load_filter(const char *name)
struct filter *filter;
GError *error = NULL;
- param = find_named_config_block("filter", name);
+ param = find_named_config_block(CONF_AUDIO_FILTER, name);
if (param == NULL) {
g_printerr("No such configured filter: %s\n", name);
return nullptr;