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
d5c132fc
Commit
d5c132fc
authored
Jul 06, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/ExcludeList: move code to ParseLine()
parent
5f082a27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
ExcludeList.cxx
src/db/update/ExcludeList.cxx
+14
-9
ExcludeList.hxx
src/db/update/ExcludeList.hxx
+3
-0
No files found.
src/db/update/ExcludeList.cxx
View file @
d5c132fc
...
...
@@ -35,6 +35,18 @@
#include <assert.h>
#include <string.h>
inline
void
ExcludeList
::
ParseLine
(
char
*
line
)
noexcept
{
char
*
p
=
strchr
(
line
,
'#'
);
if
(
p
!=
nullptr
)
*
p
=
0
;
p
=
Strip
(
line
);
if
(
*
p
!=
0
)
patterns
.
emplace_front
(
p
);
}
bool
ExcludeList
::
LoadFile
(
Path
path_fs
)
noexcept
try
{
...
...
@@ -42,15 +54,8 @@ try {
TextFile
file
(
path_fs
);
char
*
line
;
while
((
line
=
file
.
ReadLine
())
!=
nullptr
)
{
char
*
p
=
strchr
(
line
,
'#'
);
if
(
p
!=
nullptr
)
*
p
=
0
;
p
=
Strip
(
line
);
if
(
*
p
!=
0
)
patterns
.
emplace_front
(
p
);
}
while
((
line
=
file
.
ReadLine
())
!=
nullptr
)
ParseLine
(
line
);
#else
/* not implemented */
(
void
)
path_fs
;
...
...
src/db/update/ExcludeList.hxx
View file @
d5c132fc
...
...
@@ -69,6 +69,9 @@ public:
* the specified file name.
*/
bool
Check
(
Path
name_fs
)
const
noexcept
;
private
:
void
ParseLine
(
char
*
line
)
noexcept
;
};
...
...
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