Core: Namespace NetPlay utilities under the NetPlay namespace

Previously there was only one function under the NetPlay namespace,
which is kind of silly considering we have all of these other types
and functions existing outside of the namespace.

This moves the rest of them into the namespace.

This gets some general names, like Player, for example, out of the global namespace.
This commit is contained in:
Lioncash
2018-07-06 19:39:42 -04:00
parent 3d1a7737d8
commit 675260b0f7
17 changed files with 119 additions and 97 deletions

View File

@ -285,7 +285,7 @@ void NetPlayDialog::OnStart()
return;
}
NetSettings settings;
NetPlay::NetSettings settings;
// Copy all relevant settings
SConfig& instance = SConfig::GetInstance();
@ -379,7 +379,8 @@ void NetPlayDialog::UpdateGUI()
{tr("Player"), tr("Game Status"), tr("Ping"), tr("Mapping"), tr("Revision")});
m_players_list->setRowCount(player_count);
const auto get_mapping_string = [](const Player* player, const PadMappingArray& array) {
const auto get_mapping_string = [](const NetPlay::Player* player,
const NetPlay::PadMappingArray& array) {
std::string str;
for (size_t i = 0; i < array.size(); i++)
{
@ -392,8 +393,10 @@ void NetPlayDialog::UpdateGUI()
return '|' + str + '|';
};
static const std::map<PlayerGameStatus, QString> player_status{
{PlayerGameStatus::Ok, tr("OK")}, {PlayerGameStatus::NotFound, tr("Not Found")}};
static const std::map<NetPlay::PlayerGameStatus, QString> player_status{
{NetPlay::PlayerGameStatus::Ok, tr("OK")},
{NetPlay::PlayerGameStatus::NotFound, tr("Not Found")},
};
for (int i = 0; i < player_count; i++)
{