aboutsummaryrefslogtreecommitdiffstats
path: root/src/filter/RouteFilterPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-04 13:38:13 +0200
committerMax Kellermann <max@duempel.org>2013-08-04 14:07:50 +0200
commitf54bcc1f16f815fb507ac8a8ffd7913f686969d2 (patch)
tree94bfc2ab6640e54fd28e2518c7820ccb89933d7a /src/filter/RouteFilterPlugin.cxx
parentca0d09c50fc4246fdae67b8a33799ea580b68593 (diff)
downloadmpd-f54bcc1f16f815fb507ac8a8ffd7913f686969d2.tar.gz
mpd-f54bcc1f16f815fb507ac8a8ffd7913f686969d2.tar.xz
mpd-f54bcc1f16f815fb507ac8a8ffd7913f686969d2.zip
FilterPlugin: pass config_param reference
Diffstat (limited to 'src/filter/RouteFilterPlugin.cxx')
-rw-r--r--src/filter/RouteFilterPlugin.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/filter/RouteFilterPlugin.cxx b/src/filter/RouteFilterPlugin.cxx
index 4f4ceacde..ceb944822 100644
--- a/src/filter/RouteFilterPlugin.cxx
+++ b/src/filter/RouteFilterPlugin.cxx
@@ -118,7 +118,7 @@ public:
* @param filter a route_filter whose min_channels and sources[] to set
* @return true on success, false on error
*/
- bool Configure(const config_param *param, GError **error_r);
+ bool Configure(const config_param &param, GError **error_r);
virtual AudioFormat Open(AudioFormat &af, GError **error_r) override;
virtual void Close();
@@ -127,7 +127,7 @@ public:
};
bool
-RouteFilter::Configure(const config_param *param, GError **error_r) {
+RouteFilter::Configure(const config_param &param, GError **error_r) {
/* TODO:
* With a more clever way of marking "don't copy to output N",
@@ -139,8 +139,7 @@ RouteFilter::Configure(const config_param *param, GError **error_r) {
int number_of_copies;
// A cowardly default, just passthrough stereo
- const char *routes =
- config_get_block_string(param, "routes", "0>0, 1>1");
+ const char *const routes = param.GetBlockValue("routes", "0>0, 1>1");
min_input_channels = 0;
min_output_channels = 0;
@@ -163,7 +162,7 @@ RouteFilter::Configure(const config_param *param, GError **error_r) {
if (g_strv_length(sd) != 2) {
g_set_error(error_r, config_quark(), 1,
"Invalid copy around %d in routes spec: %s",
- param->line, tokens[c]);
+ param.line, tokens[c]);
g_strfreev(sd);
g_strfreev(tokens);
return false;
@@ -210,7 +209,7 @@ RouteFilter::Configure(const config_param *param, GError **error_r) {
if (g_strv_length(sd) != 2) {
g_set_error(error_r, config_quark(), 1,
"Invalid copy around %d in routes spec: %s",
- param->line, tokens[c]);
+ param.line, tokens[c]);
g_strfreev(sd);
g_strfreev(tokens);
return false;
@@ -230,7 +229,7 @@ RouteFilter::Configure(const config_param *param, GError **error_r) {
}
static Filter *
-route_filter_init(const config_param *param, GError **error_r)
+route_filter_init(const config_param &param, GError **error_r)
{
RouteFilter *filter = new RouteFilter();
if (!filter->Configure(param, error_r)) {