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
c455d2c1
Commit
c455d2c1
authored
Jan 23, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/upnp: merge two PathTraitsUTF8::Build() calls
parent
77070f5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
UpnpDatabasePlugin.cxx
src/db/UpnpDatabasePlugin.cxx
+4
-16
No files found.
src/db/UpnpDatabasePlugin.cxx
View file @
c455d2c1
...
...
@@ -552,17 +552,6 @@ VisitItem(const UPnPDirObject &object, const char *uri,
gcc_unreachable
();
}
static
bool
VisitItem
(
const
UPnPDirObject
&
object
,
const
std
::
string
&
uri
,
const
DatabaseSelection
&
selection
,
VisitSong
visit_song
,
VisitPlaylist
visit_playlist
,
Error
&
error
)
{
return
VisitItem
(
object
,
uri
.
c_str
(),
selection
,
visit_song
,
visit_playlist
,
error
);
}
// vpath is a parsed and writeable version of selection.uri. There is
// really just one path parameter.
bool
...
...
@@ -632,6 +621,9 @@ UpnpDatabase::VisitServer(const ContentDirectoryService &server,
return
false
;
for
(
auto
&
dirent
:
dirbuf
.
objects
)
{
const
std
::
string
uri
=
PathTraitsUTF8
::
Build
(
base_uri
,
dirent
.
name
.
c_str
());
switch
(
dirent
.
type
)
{
case
UPnPDirObject
:
:
Type
::
UNKNOWN
:
assert
(
false
);
...
...
@@ -639,8 +631,6 @@ UpnpDatabase::VisitServer(const ContentDirectoryService &server,
case
UPnPDirObject
:
:
Type
::
CONTAINER
:
if
(
visit_directory
)
{
const
std
::
string
uri
=
PathTraitsUTF8
::
Build
(
base_uri
,
dirent
.
name
.
c_str
());
const
LightDirectory
d
(
uri
.
c_str
(),
0
);
if
(
!
visit_directory
(
d
,
error
))
return
false
;
...
...
@@ -649,9 +639,7 @@ UpnpDatabase::VisitServer(const ContentDirectoryService &server,
break
;
case
UPnPDirObject
:
:
Type
::
ITEM
:
if
(
!
VisitItem
(
dirent
,
PathTraitsUTF8
::
Build
(
base_uri
,
dirent
.
name
.
c_str
()),
if
(
!
VisitItem
(
dirent
,
uri
.
c_str
(),
selection
,
visit_song
,
visit_playlist
,
error
))
...
...
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