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
An error occurred while fetching merge requests data.
Commit
d5c132fc
authored
7 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/ExcludeList: move code to ParseLine()
parent
5f082a27
Show 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,14 +35,9 @@
#include <assert.h>
#include <string.h>
bool
ExcludeList
::
LoadFile
(
Path
path_fs
)
noexcept
try
{
#ifdef HAVE_CLASS_GLOB
TextFile
file
(
path_fs
);
char
*
line
;
while
((
line
=
file
.
ReadLine
())
!=
nullptr
)
{
inline
void
ExcludeList
::
ParseLine
(
char
*
line
)
noexcept
{
char
*
p
=
strchr
(
line
,
'#'
);
if
(
p
!=
nullptr
)
*
p
=
0
;
...
...
@@ -50,7 +45,17 @@ try {
p
=
Strip
(
line
);
if
(
*
p
!=
0
)
patterns
.
emplace_front
(
p
);
}
}
bool
ExcludeList
::
LoadFile
(
Path
path_fs
)
noexcept
try
{
#ifdef HAVE_CLASS_GLOB
TextFile
file
(
path_fs
);
char
*
line
;
while
((
line
=
file
.
ReadLine
())
!=
nullptr
)
ParseLine
(
line
);
#else
/* not implemented */
(
void
)
path_fs
;
...
...
This diff is collapsed.
Click to expand it.
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
;
};
...
...
This diff is collapsed.
Click to expand it.
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