db/upnp: use move operator to assign XML CDATA

Reduce runtime bloat.
This commit is contained in:
Max Kellermann 2014-01-18 13:39:31 +01:00
parent 55737e4ff6
commit ad76bad8fd
2 changed files with 12 additions and 12 deletions

View File

@ -60,40 +60,40 @@ protected:
switch (m_path.back()[0]) { switch (m_path.back()[0]) {
case 'c': case 'c':
if (!m_path.back().compare("controlURL")) if (!m_path.back().compare("controlURL"))
m_tservice.controlURL += str; m_tservice.controlURL = std::move(str);
break; break;
case 'd': case 'd':
if (!m_path.back().compare("deviceType")) if (!m_path.back().compare("deviceType"))
m_device.deviceType += str; m_device.deviceType = std::move(str);
break; break;
case 'e': case 'e':
if (!m_path.back().compare("eventSubURL")) if (!m_path.back().compare("eventSubURL"))
m_tservice.eventSubURL += str; m_tservice.eventSubURL = std::move(str);
break; break;
case 'f': case 'f':
if (!m_path.back().compare("friendlyName")) if (!m_path.back().compare("friendlyName"))
m_device.friendlyName += str; m_device.friendlyName = std::move(str);
break; break;
case 'm': case 'm':
if (!m_path.back().compare("manufacturer")) if (!m_path.back().compare("manufacturer"))
m_device.manufacturer += str; m_device.manufacturer = std::move(str);
else if (!m_path.back().compare("modelName")) else if (!m_path.back().compare("modelName"))
m_device.modelName += str; m_device.modelName = std::move(str);
break; break;
case 's': case 's':
if (!m_path.back().compare("serviceType")) if (!m_path.back().compare("serviceType"))
m_tservice.serviceType = str; m_tservice.serviceType = std::move(str);
else if (!m_path.back().compare("serviceId")) else if (!m_path.back().compare("serviceId"))
m_tservice.serviceId += str; m_tservice.serviceId = std::move(str);
case 'S': case 'S':
if (!m_path.back().compare("SCPDURL")) if (!m_path.back().compare("SCPDURL"))
m_tservice.SCPDURL = str; m_tservice.SCPDURL = std::move(str);
break; break;
case 'U': case 'U':
if (!m_path.back().compare("UDN")) if (!m_path.back().compare("UDN"))
m_device.UDN = str; m_device.UDN = std::move(str);
else if (!m_path.back().compare("URLBase")) else if (!m_path.back().compare("URLBase"))
m_device.URLBase += str; m_device.URLBase = std::move(str);
break; break;
} }
} }

View File

@ -172,7 +172,7 @@ protected:
switch (m_path.back()[0]) { switch (m_path.back()[0]) {
case 'r': case 'r':
if (!m_path.back().compare("res")) { if (!m_path.back().compare("res")) {
m_tobj.url = str; m_tobj.url = std::move(str);
} }
break; break;
case 'u': case 'u':