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
0defd927
Commit
0defd927
authored
Jan 22, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/upnp: use std::list instead of std::set for SearchCapabilities
Reduce bloat. We never used the set lookup.
parent
6c41e8f6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
UpnpDatabasePlugin.cxx
src/db/UpnpDatabasePlugin.cxx
+1
-1
ContentDirectoryService.cxx
src/db/upnp/ContentDirectoryService.cxx
+1
-1
ContentDirectoryService.hxx
src/db/upnp/ContentDirectoryService.hxx
+2
-2
Util.cxx
src/db/upnp/Util.cxx
+3
-5
No files found.
src/db/UpnpDatabasePlugin.cxx
View file @
0defd927
...
...
@@ -281,7 +281,7 @@ UpnpDatabase::SearchSongs(ContentDirectoryService &server,
if
(
selection
.
filter
==
nullptr
)
return
true
;
std
::
se
t
<
std
::
string
>
searchcaps
;
std
::
lis
t
<
std
::
string
>
searchcaps
;
if
(
!
server
.
getSearchCapabilities
(
m_lib
->
getclh
(),
searchcaps
,
error
))
return
false
;
...
...
src/db/upnp/ContentDirectoryService.cxx
View file @
0defd927
...
...
@@ -188,7 +188,7 @@ ContentDirectoryService::search(UpnpClient_Handle hdl,
bool
ContentDirectoryService
::
getSearchCapabilities
(
UpnpClient_Handle
hdl
,
std
::
se
t
<
std
::
string
>
&
result
,
std
::
lis
t
<
std
::
string
>
&
result
,
Error
&
error
)
{
assert
(
result
.
empty
());
...
...
src/db/upnp/ContentDirectoryService.hxx
View file @
0defd927
...
...
@@ -23,7 +23,7 @@
#include <upnp/upnp.h>
#include <string>
#include <
se
t>
#include <
lis
t>
class
Error
;
class
UPnPDevice
;
...
...
@@ -114,7 +114,7 @@ public:
* any tag can be used in a search, or a list of usable tag names.
*/
bool
getSearchCapabilities
(
UpnpClient_Handle
handle
,
std
::
se
t
<
std
::
string
>
&
result
,
std
::
lis
t
<
std
::
string
>
&
result
,
Error
&
error
);
/** Retrieve the "friendly name" for this server, useful for display. */
...
...
src/db/upnp/Util.cxx
View file @
0defd927
...
...
@@ -153,7 +153,7 @@ csvToStrings(const char *s, T &tokens)
case
','
:
switch
(
state
)
{
case
TOKEN
:
tokens
.
insert
(
tokens
.
end
(),
current
);
tokens
.
push_back
(
current
);
current
.
clear
();
continue
;
case
ESCAPE
:
...
...
@@ -187,7 +187,7 @@ csvToStrings(const char *s, T &tokens)
}
switch
(
state
)
{
case
TOKEN
:
tokens
.
insert
(
tokens
.
end
(),
current
);
tokens
.
push_back
(
current
);
break
;
case
ESCAPE
:
return
false
;
...
...
@@ -195,6 +195,4 @@ csvToStrings(const char *s, T &tokens)
return
true
;
}
//template bool csvToStrings<list<string> >(const string &, list<string> &);
template
bool
csvToStrings
<
std
::
vector
<
std
::
string
>
>
(
const
char
*
,
std
::
vector
<
std
::
string
>
&
);
template
bool
csvToStrings
<
std
::
set
<
std
::
string
>
>
(
const
char
*
,
std
::
set
<
std
::
string
>
&
);
template
bool
csvToStrings
<
std
::
list
<
std
::
string
>>
(
const
char
*
,
std
::
list
<
std
::
string
>
&
);
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