UICommon/NetPlayIndex: Take NetPlaySession by const reference for Add()
This isn't std::moved wholesale into a member variable or further std::moved into another function, so it's better to take it by const reference here to avoid unnecessary reallocations of contained std::string instances.
This commit is contained in:
parent
0a67a40e7c
commit
2830fe820d
|
@ -159,7 +159,7 @@ void NetPlayIndex::NotificationLoop()
|
|||
}
|
||||
}
|
||||
|
||||
bool NetPlayIndex::Add(NetPlaySession session)
|
||||
bool NetPlayIndex::Add(const NetPlaySession& session)
|
||||
{
|
||||
Common::HttpRequest request;
|
||||
auto response = request.Get(
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
static std::vector<std::pair<std::string, std::string>> GetRegions();
|
||||
|
||||
bool Add(NetPlaySession session);
|
||||
bool Add(const NetPlaySession& session);
|
||||
void Remove();
|
||||
|
||||
bool HasActiveSession() const;
|
||||
|
|
Loading…
Reference in New Issue