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
02294a82
Commit
02294a82
authored
Apr 02, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
song/Filter: pass std::string_view to WithoutBasePrefix()
parent
66bcf04c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Filter.cxx
src/song/Filter.cxx
+1
-2
Filter.hxx
src/song/Filter.hxx
+2
-1
No files found.
src/song/Filter.cxx
View file @
02294a82
...
@@ -467,9 +467,8 @@ SongFilter::GetBase() const noexcept
...
@@ -467,9 +467,8 @@ SongFilter::GetBase() const noexcept
}
}
SongFilter
SongFilter
SongFilter
::
WithoutBasePrefix
(
const
char
*
_
prefix
)
const
noexcept
SongFilter
::
WithoutBasePrefix
(
const
std
::
string_view
prefix
)
const
noexcept
{
{
const
StringView
prefix
(
_prefix
);
SongFilter
result
;
SongFilter
result
;
for
(
const
auto
&
i
:
and_filter
.
GetItems
())
{
for
(
const
auto
&
i
:
and_filter
.
GetItems
())
{
...
...
src/song/Filter.hxx
View file @
02294a82
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <cstdint>
#include <cstdint>
#include <string>
#include <string>
#include <string_view>
/**
/**
* Special value for the db_selection_print() sort parameter.
* Special value for the db_selection_print() sort parameter.
...
@@ -105,7 +106,7 @@ public:
...
@@ -105,7 +106,7 @@ public:
* from all #LOCATE_TAG_BASE_TYPE items. This is used to
* from all #LOCATE_TAG_BASE_TYPE items. This is used to
* filter songs in mounted databases.
* filter songs in mounted databases.
*/
*/
SongFilter
WithoutBasePrefix
(
const
char
*
prefix
)
const
noexcept
;
SongFilter
WithoutBasePrefix
(
std
::
string_view
prefix
)
const
noexcept
;
};
};
#endif
#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