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
747436b1
Commit
747436b1
authored
Apr 03, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db,storage: pass std::string_view to PathTraits::Build()
parent
7a58b8c3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
10 deletions
+9
-10
Song.cxx
src/db/plugins/simple/Song.cxx
+1
-1
UpnpDatabasePlugin.cxx
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+1
-2
Walk.cxx
src/db/update/Walk.cxx
+1
-1
CurlStorage.cxx
src/storage/plugins/CurlStorage.cxx
+1
-1
LocalStorage.cxx
src/storage/plugins/LocalStorage.cxx
+1
-1
NfsStorage.cxx
src/storage/plugins/NfsStorage.cxx
+1
-1
SmbclientStorage.cxx
src/storage/plugins/SmbclientStorage.cxx
+2
-2
UdisksStorage.cxx
src/storage/plugins/UdisksStorage.cxx
+1
-1
No files found.
src/db/plugins/simple/Song.cxx
View file @
747436b1
...
...
@@ -41,7 +41,7 @@ Song::GetURI() const noexcept
return
filename
;
else
{
const
char
*
path
=
parent
.
GetPath
();
return
PathTraitsUTF8
::
Build
(
path
,
filename
.
c_str
()
);
return
PathTraitsUTF8
::
Build
(
path
,
filename
);
}
}
...
...
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
View file @
747436b1
...
...
@@ -397,8 +397,7 @@ UpnpDatabase::BuildPath(const ContentDirectoryService &server,
if
(
path
.
empty
())
path
=
dirent
.
name
;
else
path
=
PathTraitsUTF8
::
Build
(
dirent
.
name
.
c_str
(),
path
.
c_str
());
path
=
PathTraitsUTF8
::
Build
(
dirent
.
name
,
path
);
}
return
PathTraitsUTF8
::
Build
(
server
.
getFriendlyName
(),
...
...
src/db/update/Walk.cxx
View file @
747436b1
...
...
@@ -322,7 +322,7 @@ UpdateWalk::UpdateDirectory(Directory &directory,
try
{
Mutex
mutex
;
auto
is
=
InputStream
::
OpenReady
(
PathTraitsUTF8
::
Build
(
storage
.
MapUTF8
(
directory
.
GetPath
())
.
c_str
()
,
auto
is
=
InputStream
::
OpenReady
(
PathTraitsUTF8
::
Build
(
storage
.
MapUTF8
(
directory
.
GetPath
()),
".mpdignore"
).
c_str
(),
mutex
);
child_exclude_list
.
Load
(
std
::
move
(
is
));
...
...
src/storage/plugins/CurlStorage.cxx
View file @
747436b1
...
...
@@ -75,7 +75,7 @@ CurlStorage::MapUTF8(const char *uri_utf8) const noexcept
return
base
;
std
::
string
path_esc
=
CurlEscapeUriPath
(
uri_utf8
);
return
PathTraitsUTF8
::
Build
(
base
.
c_str
(),
path_esc
.
c_str
()
);
return
PathTraitsUTF8
::
Build
(
base
,
path_esc
);
}
const
char
*
...
...
src/storage/plugins/LocalStorage.cxx
View file @
747436b1
...
...
@@ -102,7 +102,7 @@ LocalStorage::MapUTF8(const char *uri_utf8) const noexcept
if
(
StringIsEmpty
(
uri_utf8
))
return
base_utf8
;
return
PathTraitsUTF8
::
Build
(
base_utf8
.
c_str
()
,
uri_utf8
);
return
PathTraitsUTF8
::
Build
(
base_utf8
,
uri_utf8
);
}
AllocatedPath
...
...
src/storage/plugins/NfsStorage.cxx
View file @
747436b1
...
...
@@ -240,7 +240,7 @@ NfsStorage::MapUTF8(const char *uri_utf8) const noexcept
if
(
StringIsEmpty
(
uri_utf8
))
return
base
;
return
PathTraitsUTF8
::
Build
(
base
.
c_str
()
,
uri_utf8
);
return
PathTraitsUTF8
::
Build
(
base
,
uri_utf8
);
}
const
char
*
...
...
src/storage/plugins/SmbclientStorage.cxx
View file @
747436b1
...
...
@@ -81,7 +81,7 @@ SmbclientStorage::MapUTF8(const char *uri_utf8) const noexcept
if
(
StringIsEmpty
(
uri_utf8
))
return
base
;
return
PathTraitsUTF8
::
Build
(
base
.
c_str
()
,
uri_utf8
);
return
PathTraitsUTF8
::
Build
(
base
,
uri_utf8
);
}
const
char
*
...
...
@@ -174,7 +174,7 @@ SmbclientDirectoryReader::Read() noexcept
StorageFileInfo
SmbclientDirectoryReader
::
GetInfo
([[
maybe_unused
]]
bool
follow
)
{
const
std
::
string
path
=
PathTraitsUTF8
::
Build
(
base
.
c_str
()
,
name
);
const
std
::
string
path
=
PathTraitsUTF8
::
Build
(
base
,
name
);
return
::
GetInfo
(
path
.
c_str
());
}
...
...
src/storage/plugins/UdisksStorage.cxx
View file @
747436b1
...
...
@@ -340,7 +340,7 @@ UdisksStorage::MapUTF8(const char *uri_utf8) const noexcept
return
mounted_storage
->
MapUTF8
(
uri_utf8
);
}
catch
(...)
{
/* fallback - not usable but the best we can do */
return
PathTraitsUTF8
::
Build
(
base_uri
.
c_str
()
,
uri_utf8
);
return
PathTraitsUTF8
::
Build
(
base_uri
,
uri_utf8
);
}
}
...
...
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