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:
@@ -91,21 +91,21 @@ UpnpNeighborExplorer::GetList() const noexcept
|
||||
|
||||
List result;
|
||||
for (const auto &i : tmp)
|
||||
result.emplace_front(i.GetURI(), i.getFriendlyName());
|
||||
result.emplace_front(i.GetURI(), i.GetFriendlyName());
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
UpnpNeighborExplorer::FoundUPnP(const ContentDirectoryService &service)
|
||||
{
|
||||
const NeighborInfo n(service.GetURI(), service.getFriendlyName());
|
||||
const NeighborInfo n(service.GetURI(), service.GetFriendlyName());
|
||||
listener.FoundNeighbor(n);
|
||||
}
|
||||
|
||||
void
|
||||
UpnpNeighborExplorer::LostUPnP(const ContentDirectoryService &service)
|
||||
{
|
||||
const NeighborInfo n(service.GetURI(), service.getFriendlyName());
|
||||
const NeighborInfo n(service.GetURI(), service.GetFriendlyName());
|
||||
listener.LostNeighbor(n);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user