db/upnp: use string::push_back() instead of string::append()
This commit is contained in:
parent
71928b473e
commit
87629dda81
@ -250,22 +250,22 @@ UpnpDatabase::GetSong(const char *uri, Error &error) const
|
|||||||
static void
|
static void
|
||||||
dquote(std::string &out, const char *in)
|
dquote(std::string &out, const char *in)
|
||||||
{
|
{
|
||||||
out.append(1, '"');
|
out.push_back('"');
|
||||||
|
|
||||||
for (; *in != 0; ++in) {
|
for (; *in != 0; ++in) {
|
||||||
switch(*in) {
|
switch(*in) {
|
||||||
case '\\':
|
case '\\':
|
||||||
case '"':
|
case '"':
|
||||||
out.append(1, '\\');
|
out.push_back('\\');
|
||||||
out.append(1, *in);
|
out.push_back(*in);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
out.append(1, *in);
|
out.push_back(*in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out.append(1, '"');
|
out.push_back('"');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run an UPnP search, according to MPD parameters. Return results as
|
// Run an UPnP search, according to MPD parameters. Return results as
|
||||||
|
Loading…
Reference in New Issue
Block a user