Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b13ebe3d
Commit
b13ebe3d
authored
Jan 02, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter/Plugin: eliminate filter_new()
parent
b0199245
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
21 deletions
+1
-21
FilterPlugin.cxx
src/filter/FilterPlugin.cxx
+1
-9
FilterPlugin.hxx
src/filter/FilterPlugin.hxx
+0
-12
No files found.
src/filter/FilterPlugin.cxx
View file @
b13ebe3d
...
...
@@ -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
);
}
src/filter/FilterPlugin.hxx
View file @
b13ebe3d
...
...
@@ -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.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment