filter/Plugin: eliminate filter_new()
This commit is contained in:
parent
b0199245d5
commit
b13ebe3ddb
@ -27,14 +27,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)
|
||||
{
|
||||
@ -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);
|
||||
}
|
||||
|
@ -40,18 +40,6 @@ struct FilterPlugin {
|
||||
std::unique_ptr<PreparedFilter> (*init)(const ConfigBlock &block);
|
||||
};
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
Loading…
Reference in New Issue
Block a user