Commit b13ebe3d authored by Max Kellermann's avatar Max Kellermann

filter/Plugin: eliminate filter_new()

parent b0199245
......@@ -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);
}
......@@ -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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment