summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2016-10-02 22:59:35 -0700
committerGitHub <noreply@github.com>2016-10-02 22:59:35 -0700
commit332c9b514b15330b7e797bf3f9c03ed57a2b430d (patch)
tree1be9a792ef54861280a72bc21a215813d81c07c9
parent09fd2fd8e2a931947abb870f901e65a2cd211708 (diff)
parent99afd9e9d5bd4da05ee5574783bd819ca1e121a2 (diff)
Merge pull request #4275 from lioncash/net
NetPlaySetupFrame: Use an anonymous namespace instead of static
-rw-r--r--Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp
index a2ab816964..c93515c069 100644
--- a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp
+++ b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp
@@ -23,11 +23,13 @@
#include "DolphinWX/NetPlay/NetWindow.h"
#include "DolphinWX/WxUtils.h"
-static const std::string DEFAULT_TRAVERSAL_SERVER = "stun.dolphin-emu.org";
-static const std::string DEFAULT_TRAVERSAL_PORT = "6262";
+namespace
+{
+const std::string DEFAULT_TRAVERSAL_SERVER = "stun.dolphin-emu.org";
+const std::string DEFAULT_TRAVERSAL_PORT = "6262";
-static std::string GetFromINI(IniFile::Section& section, const std::string& key,
- const std::string& default_value)
+std::string GetFromINI(IniFile::Section& section, const std::string& key,
+ const std::string& default_value)
{
std::string result;
section.Get(key, &result, default_value);
@@ -37,22 +39,23 @@ static std::string GetFromINI(IniFile::Section& section, const std::string& key,
return result;
}
-static std::string GetTraversalPort(IniFile::Section& section)
+std::string GetTraversalPort(IniFile::Section& section)
{
return GetFromINI(section, "TraversalPort", DEFAULT_TRAVERSAL_PORT);
}
-static std::string GetTraversalServer(IniFile::Section& section)
+std::string GetTraversalServer(IniFile::Section& section)
{
return GetFromINI(section, "TraversalServer", DEFAULT_TRAVERSAL_SERVER);
}
-static wxString GetTraversalLabelText(IniFile::Section& section)
+wxString GetTraversalLabelText(IniFile::Section& section)
{
std::string server = GetTraversalServer(section);
std::string port = GetTraversalPort(section);
return wxString::Format(_("Traversal Server: %s"), (server + ":" + port).c_str());
}
+} // Anonymous namespace
NetPlaySetupFrame::NetPlaySetupFrame(wxWindow* const parent, const CGameListCtrl* const game_list)
: wxFrame(parent, wxID_ANY, _("Dolphin NetPlay Setup")), m_game_list(game_list)