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
1881b0e9
Commit
1881b0e9
authored
Mar 15, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
song/TagSongFilter: rename MatchNN() to Match()
The "NN" suffix used to mean "no negation", but that's not how it's implemented today.
parent
98b29f6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
TagSongFilter.cxx
src/song/TagSongFilter.cxx
+4
-4
TagSongFilter.hxx
src/song/TagSongFilter.hxx
+2
-2
No files found.
src/song/TagSongFilter.cxx
View file @
1881b0e9
...
...
@@ -35,14 +35,14 @@ TagSongFilter::ToExpression() const noexcept
}
bool
TagSongFilter
::
Match
NN
(
const
TagItem
&
item
)
const
noexcept
TagSongFilter
::
Match
(
const
TagItem
&
item
)
const
noexcept
{
return
(
type
==
TAG_NUM_OF_ITEM_TYPES
||
item
.
type
==
type
)
&&
filter
.
Match
(
item
.
value
);
}
bool
TagSongFilter
::
Match
NN
(
const
Tag
&
tag
)
const
noexcept
TagSongFilter
::
Match
(
const
Tag
&
tag
)
const
noexcept
{
bool
visited_types
[
TAG_NUM_OF_ITEM_TYPES
];
std
::
fill_n
(
visited_types
,
size_t
(
TAG_NUM_OF_ITEM_TYPES
),
false
);
...
...
@@ -50,7 +50,7 @@ TagSongFilter::MatchNN(const Tag &tag) const noexcept
for
(
const
auto
&
i
:
tag
)
{
visited_types
[
i
.
type
]
=
true
;
if
(
Match
NN
(
i
))
if
(
Match
(
i
))
return
true
;
}
...
...
@@ -89,5 +89,5 @@ TagSongFilter::MatchNN(const Tag &tag) const noexcept
bool
TagSongFilter
::
Match
(
const
LightSong
&
song
)
const
noexcept
{
return
Match
NN
(
song
.
tag
);
return
Match
(
song
.
tag
);
}
src/song/TagSongFilter.hxx
View file @
1881b0e9
...
...
@@ -68,8 +68,8 @@ public:
bool
Match
(
const
LightSong
&
song
)
const
noexcept
override
;
private
:
bool
Match
NN
(
const
Tag
&
tag
)
const
noexcept
;
bool
Match
NN
(
const
TagItem
&
tag
)
const
noexcept
;
bool
Match
(
const
Tag
&
tag
)
const
noexcept
;
bool
Match
(
const
TagItem
&
tag
)
const
noexcept
;
};
#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