mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 15:48:51 +00:00
TraversalClient: Convert state enum into an enum class
Prevents implicit conversions and prevents identifiers from polluting the class scope.
This commit is contained in:
parent
ebf3b5faf4
commit
2021175809
5 changed files with 22 additions and 16 deletions
|
@ -126,7 +126,7 @@ NetPlayServer::NetPlayServer(const u16 port, const bool forward_port, NetPlayUI*
|
|||
|
||||
m_server = g_MainNetHost.get();
|
||||
|
||||
if (g_TraversalClient->GetState() == TraversalClient::Failure)
|
||||
if (g_TraversalClient->HasFailed())
|
||||
g_TraversalClient->ReconnectToServer();
|
||||
}
|
||||
else
|
||||
|
@ -190,7 +190,7 @@ void NetPlayServer::SetupIndex()
|
|||
|
||||
if (m_traversal_client)
|
||||
{
|
||||
if (m_traversal_client->GetState() != TraversalClient::Connected)
|
||||
if (!m_traversal_client->IsConnected())
|
||||
return;
|
||||
|
||||
session.server_id = std::string(g_TraversalClient->GetHostID().data(), 8);
|
||||
|
@ -1149,7 +1149,7 @@ void NetPlayServer::OnTraversalStateChanged()
|
|||
if (!m_dialog)
|
||||
return;
|
||||
|
||||
if (state == TraversalClient::Failure)
|
||||
if (state == TraversalClient::State::Failure)
|
||||
m_dialog->OnTraversalError(m_traversal_client->GetFailureReason());
|
||||
|
||||
m_dialog->OnTraversalStateChanged(state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue