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
03cddd0a
Commit
03cddd0a
authored
Oct 19, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FilterConfig: return bool
parent
04a737e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
FilterConfig.cxx
src/FilterConfig.cxx
+3
-8
FilterConfig.hxx
src/FilterConfig.hxx
+2
-2
No files found.
src/FilterConfig.cxx
View file @
03cddd0a
...
...
@@ -86,15 +86,12 @@ filter_chain_append_new(Filter &chain, const char *template_name, Error &error)
return
true
;
}
unsigned
int
bool
filter_chain_parse
(
Filter
&
chain
,
const
char
*
spec
,
Error
&
error
)
{
// Split on comma
gchar
**
tokens
=
g_strsplit_set
(
spec
,
","
,
255
);
unsigned
added_filters
=
0
;
// Add each name to the filter chain by instantiating an actual filter
char
**
template_names
=
tokens
;
while
(
*
template_names
!=
NULL
)
{
...
...
@@ -102,14 +99,12 @@ filter_chain_parse(Filter &chain, const char *spec, Error &error)
g_strstrip
(
*
template_names
);
if
(
!
filter_chain_append_new
(
chain
,
*
template_names
,
error
))
break
;
++
added_filters
;
return
false
;
++
template_names
;
}
g_strfreev
(
tokens
);
return
added_filters
;
return
true
;
}
src/FilterConfig.hxx
View file @
03cddd0a
...
...
@@ -35,9 +35,9 @@ class Error;
* @param chain the chain to append filters on
* @param spec the filter chain specification
* @param error_r space to return an error description
* @return t
he number of filters which were successfully added
* @return t
rue on success
*/
unsigned
int
bool
filter_chain_parse
(
Filter
&
chain
,
const
char
*
spec
,
Error
&
error
);
#endif
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