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
3ac15ca8
Commit
3ac15ca8
authored
Jan 23, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/upnp: pass char* to visitSong()
Don't use std::string, reduce bloat.
parent
f703d4fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
UpnpDatabasePlugin.cxx
src/db/UpnpDatabasePlugin.cxx
+6
-6
No files found.
src/db/UpnpDatabasePlugin.cxx
View file @
3ac15ca8
...
...
@@ -350,7 +350,7 @@ UpnpDatabase::SearchSongs(const ContentDirectoryService &server,
}
static
bool
visitSong
(
const
UPnPDirObject
&
meta
,
std
::
string
&&
path
,
visitSong
(
const
UPnPDirObject
&
meta
,
const
char
*
path
,
const
DatabaseSelection
&
selection
,
VisitSong
visit_song
,
Error
&
error
)
{
...
...
@@ -359,7 +359,7 @@ visitSong(const UPnPDirObject &meta, std::string &&path,
LightSong
song
;
song
.
directory
=
nullptr
;
song
.
uri
=
path
.
c_str
()
;
song
.
uri
=
path
;
song
.
real_uri
=
meta
.
url
.
c_str
();
song
.
tag
=
&
meta
.
tag
;
song
.
mtime
=
0
;
...
...
@@ -414,9 +414,9 @@ UpnpDatabase::SearchSongs(const ContentDirectoryService &server,
// course, 'All Music' is very big.
// So we return synthetic and ugly paths based on the object id,
// which we later have to detect.
if
(
!
visitSong
(
std
::
move
(
dirent
),
songPath
(
server
.
getFriendlyName
(),
dirent
.
m_id
),
const
std
::
string
path
=
songPath
(
server
.
getFriendlyName
(
),
dirent
.
m_id
);
if
(
!
visitSong
(
std
::
move
(
dirent
),
path
.
c_str
(
),
selection
,
visit_song
,
error
))
return
false
;
...
...
@@ -574,7 +574,7 @@ UpnpDatabase::VisitServer(const ContentDirectoryService &server,
case
UPnPDirObject
:
:
ItemClass
::
MUSIC
:
if
(
visit_song
)
return
visitSong
(
std
::
move
(
tdirent
),
s
td
::
string
(
selection
.
uri
),
s
election
.
uri
.
c_str
(
),
selection
,
visit_song
,
error
);
break
;
...
...
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