summaryrefslogtreecommitdiff
path: root/src/filter
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-01-02 23:00:16 +0100
committerMax Kellermann <max@musicpd.org>2018-01-02 23:00:16 +0100
commitb13ebe3ddb123136a82eefbdc6b0234af8cca337 (patch)
tree3e9f5ef3d859f08836818940469f6ead9be01ac5 /src/filter
parentb0199245d5ec1868c5d8069d825b87fb66d22cff (diff)
filter/Plugin: eliminate filter_new()
Diffstat (limited to 'src/filter')
-rw-r--r--src/filter/FilterPlugin.cxx10
-rw-r--r--src/filter/FilterPlugin.hxx12
2 files changed, 1 insertions, 21 deletions
diff --git a/src/filter/FilterPlugin.cxx b/src/filter/FilterPlugin.cxx
index ffd15cdc2..dcdf80252 100644
--- a/src/filter/FilterPlugin.cxx
+++ b/src/filter/FilterPlugin.cxx
@@ -28,14 +28,6 @@
#include <assert.h>
std::unique_ptr<PreparedFilter>
-filter_new(const FilterPlugin *plugin, const ConfigBlock &block)
-{
- assert(plugin != nullptr);
-
- return plugin->init(block);
-}
-
-std::unique_ptr<PreparedFilter>
filter_configured_new(const ConfigBlock &block)
{
const char *plugin_name = block.GetBlockValue("plugin");
@@ -47,5 +39,5 @@ filter_configured_new(const ConfigBlock &block)
throw FormatRuntimeError("No such filter plugin: %s",
plugin_name);
- return filter_new(plugin, block);
+ return plugin->init(block);
}
diff --git a/src/filter/FilterPlugin.hxx b/src/filter/FilterPlugin.hxx
index cb7f82476..5804ef0c1 100644
--- a/src/filter/FilterPlugin.hxx
+++ b/src/filter/FilterPlugin.hxx
@@ -41,18 +41,6 @@ struct FilterPlugin {
};
/**
- * Creates a new instance of the specified filter plugin.
- *
- * Throws std::runtime_error on error.
- *
- * @param plugin the filter plugin
- * @param block configuration section
- */
-std::unique_ptr<PreparedFilter>
-filter_new(const FilterPlugin *plugin,
- const ConfigBlock &block);
-
-/**
* Creates a new filter, loads configuration and the plugin name from
* the specified configuration section.
*