Skip to content
Browse files

UICommon/NetPlayIndex: Move NetPlaySession variable closer to its usa…

…ge point in List()

Moves it closer to where its used, narrowing its visible scope, as well
as preventing unnecessary std::string constructor executions in the
event invalid data is encountered (the continue branch).
  • Loading branch information...
lioncash committed Aug 4, 2019
1 parent 1329256 commit 0a67a40e7c8345925b6163d7c287691e7f49e387
Showing with 1 addition and 2 deletions.
  1. +1 −2 Source/Core/UICommon/NetPlayIndex.cpp
@@ -86,8 +86,6 @@ NetPlayIndex::List(const std::map<std::string, std::string>& filters)

for (const auto& entry : entries.get<picojson::array>())
NetPlaySession session;

const auto& name = entry.get("name");
const auto& region = entry.get("region");
const auto& method = entry.get("method");
@@ -107,6 +105,7 @@ NetPlayIndex::List(const std::map<std::string, std::string>& filters)

NetPlaySession session; = name.to_str();
session.region = region.to_str();
session.game_id = game_id.to_str();

0 comments on commit 0a67a40

Please sign in to comment.
You can’t perform that action at this time.