db/upnp: getprop() returns const char *

Return the return value, instead returning it in a reference
parameter.  Reduces bloat by reducing unnecessary std::string usage.
This commit is contained in:
Max Kellermann
2014-01-10 20:13:17 +01:00
parent f23b47ba17
commit 74842fd6d4
2 changed files with 19 additions and 21 deletions
+3 -5
View File
@@ -56,13 +56,11 @@ public:
* @param[out] value
* @return true if found.
*/
bool getprop(const std::string &name, std::string &value) const
{
const char *getprop(const char *name) const {
auto it = m_props.find(name);
if (it == m_props.end())
return false;
value = it->second;
return true;
return nullptr;
return it->second.c_str();
}
void clear()