mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-02 15:45:58 +00:00
NetPlayServer: Prevent unnecessary copies in GetInterfaceSet()
This was previously copying each pair out of the vector returned by GetInterfaceListInternal() when we just need to emplace the first entry of each pair.
This commit is contained in:
parent
af52b5a2d9
commit
81493ee910
1 changed files with 1 additions and 2 deletions
|
@ -2266,8 +2266,7 @@ u16 NetPlayServer::GetPort() const
|
|||
std::unordered_set<std::string> NetPlayServer::GetInterfaceSet() const
|
||||
{
|
||||
std::unordered_set<std::string> result;
|
||||
auto lst = GetInterfaceListInternal();
|
||||
for (auto list_entry : lst)
|
||||
for (const auto& list_entry : GetInterfaceListInternal())
|
||||
result.emplace(list_entry.first);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue