Fix -Wswitch warning
This commit is contained in:
parent
b0bde31ac0
commit
88264f5712
|
@ -215,10 +215,8 @@ void TraversalClient::OnFailure(FailureReason reason)
|
|||
switch (reason)
|
||||
{
|
||||
case TraversalClient::BadHost:
|
||||
{
|
||||
PanicAlertT("Couldn't look up central server %s", m_Server.c_str());
|
||||
break;
|
||||
}
|
||||
case TraversalClient::VersionTooOld:
|
||||
PanicAlertT("Dolphin too old for traversal server");
|
||||
break;
|
||||
|
@ -353,4 +351,4 @@ void ReleaseTraversalClient()
|
|||
|
||||
g_TraversalClient.release();
|
||||
g_MainNetHost.release();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ public:
|
|||
ServerForgotAboutUs,
|
||||
SocketSendError,
|
||||
ResendTimeout,
|
||||
ConnectFailedError = 0x400,
|
||||
};
|
||||
TraversalClient(ENetHost* netHost, const std::string& server, const u16 port);
|
||||
~TraversalClient();
|
||||
|
|
|
@ -744,20 +744,19 @@ void NetPlayClient::OnConnectFailed(u8 reason)
|
|||
{
|
||||
m_connecting = false;
|
||||
m_state = Failure;
|
||||
int swtch = TraversalClient::ConnectFailedError + reason;
|
||||
switch (swtch)
|
||||
switch (reason)
|
||||
{
|
||||
case TraversalClient::ConnectFailedError + TraversalConnectFailedClientDidntRespond:
|
||||
case TraversalConnectFailedClientDidntRespond:
|
||||
PanicAlertT("Traversal server timed out connecting to the host");
|
||||
break;
|
||||
case TraversalClient::ConnectFailedError + TraversalConnectFailedClientFailure:
|
||||
case TraversalConnectFailedClientFailure:
|
||||
PanicAlertT("Server rejected traversal attempt");
|
||||
break;
|
||||
case TraversalClient::ConnectFailedError + TraversalConnectFailedNoSuchClient:
|
||||
case TraversalConnectFailedNoSuchClient:
|
||||
PanicAlertT("Invalid host");
|
||||
break;
|
||||
default:
|
||||
PanicAlertT("Unknown error %x", swtch);
|
||||
PanicAlertT("Unknown error %x", reason);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue