lib/upnp/ContentDirectoryService: getFriendlyName() returns std::string reference
This can avoid the overhead of casting a C string back to std::string_view.
This commit is contained in:
@@ -98,7 +98,7 @@ public:
|
||||
}
|
||||
|
||||
/** Retrieve the "friendly name" for this server, useful for display. */
|
||||
const char *getFriendlyName() const noexcept {
|
||||
return m_friendlyName.c_str();
|
||||
const std::string &GetFriendlyName() const noexcept {
|
||||
return m_friendlyName;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user