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
386235e2
Commit
386235e2
authored
Apr 02, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/simple/Mount: pass std::string_view to WalkMount()
parent
ddfd92e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
Mount.cxx
src/db/plugins/simple/Mount.cxx
+7
-7
Mount.hxx
src/db/plugins/simple/Mount.hxx
+4
-2
No files found.
src/db/plugins/simple/Mount.cxx
View file @
386235e2
...
...
@@ -31,7 +31,7 @@ struct PrefixedLightDirectory : LightDirectory {
std
::
string
buffer
;
PrefixedLightDirectory
(
const
LightDirectory
&
directory
,
const
char
*
base
)
std
::
string_view
base
)
:
LightDirectory
(
directory
),
buffer
(
IsRoot
()
?
std
::
string
(
base
)
...
...
@@ -41,21 +41,21 @@ struct PrefixedLightDirectory : LightDirectory {
};
static
void
PrefixVisitDirectory
(
const
char
*
base
,
const
VisitDirectory
&
visit_directory
,
PrefixVisitDirectory
(
std
::
string_view
base
,
const
VisitDirectory
&
visit_directory
,
const
LightDirectory
&
directory
)
{
visit_directory
(
PrefixedLightDirectory
(
directory
,
base
));
}
static
void
PrefixVisitSong
(
const
char
*
base
,
const
VisitSong
&
visit_song
,
PrefixVisitSong
(
std
::
string_view
base
,
const
VisitSong
&
visit_song
,
const
LightSong
&
song
)
{
visit_song
(
PrefixedLightSong
(
song
,
base
));
}
static
void
PrefixVisitPlaylist
(
const
char
*
base
,
const
VisitPlaylist
&
visit_playlist
,
PrefixVisitPlaylist
(
std
::
string_view
base
,
const
VisitPlaylist
&
visit_playlist
,
const
PlaylistInfo
&
playlist
,
const
LightDirectory
&
directory
)
{
...
...
@@ -64,8 +64,8 @@ PrefixVisitPlaylist(const char *base, const VisitPlaylist &visit_playlist,
}
void
WalkMount
(
const
char
*
base
,
const
Database
&
db
,
const
char
*
uri
,
WalkMount
(
std
::
string_view
base
,
const
Database
&
db
,
std
::
string_view
uri
,
const
DatabaseSelection
&
old_selection
,
const
VisitDirectory
&
visit_directory
,
const
VisitSong
&
visit_song
,
const
VisitPlaylist
&
visit_playlist
)
...
...
@@ -92,7 +92,7 @@ WalkMount(const char *base, const Database &db,
SongFilter
prefix_filter
;
if
(
base
!=
nullptr
&&
selection
.
filter
!=
nullptr
)
{
if
(
base
.
data
()
!=
nullptr
&&
selection
.
filter
!=
nullptr
)
{
/* if the SongFilter contains a LOCATE_TAG_BASE_TYPE
item, copy the SongFilter and drop the mount point
from the filter, because the mounted database
...
...
src/db/plugins/simple/Mount.hxx
View file @
386235e2
...
...
@@ -22,12 +22,14 @@
#include "db/Visitor.hxx"
#include <string_view>
class
Database
;
struct
DatabaseSelection
;
void
WalkMount
(
const
char
*
base
,
const
Database
&
db
,
const
char
*
uri
,
WalkMount
(
std
::
string_view
base
,
const
Database
&
db
,
std
::
string_view
uri
,
const
DatabaseSelection
&
old_selection
,
const
VisitDirectory
&
visit_directory
,
const
VisitSong
&
visit_song
,
const
VisitPlaylist
&
visit_playlist
);
...
...
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