diff --git a/Client.cpp b/Client.cpp index c48d904..93ccbd4 100644 --- a/Client.cpp +++ b/Client.cpp @@ -120,9 +120,8 @@ void Client::processCustomPacket(MsgType type, sf::Packet& packet) { if(_removeBonusCallBack != nullptr) _removeBonusCallBack(ObjectNameTag(tmp)); break; - default: - throw std::logic_error{"Client::processCustomPacket: unknown MsgType"}; + return; } } diff --git a/Server.cpp b/Server.cpp index 4dc6af1..292ff5b 100644 --- a/Server.cpp +++ b/Server.cpp @@ -116,12 +116,9 @@ void Server::processCustomPacket(MsgType type, sf::Packet& packet, sf::Uint16 se if(player.first != senderId) _socket.send(sendPacket, player.first); } - break; - case MsgType::Error: - break; default: - throw std::logic_error{"Server::processCustomPacket: unknown MsgType"}; + return; } } diff --git a/engine/network/ClientUDP.cpp b/engine/network/ClientUDP.cpp index 404a0fb..b00ba65 100644 --- a/engine/network/ClientUDP.cpp +++ b/engine/network/ClientUDP.cpp @@ -120,10 +120,6 @@ bool ClientUDP::process() processDisconnect(targetId); break; - - case MsgType::Confirm: - - break; default: processCustomPacket(type, packet); } diff --git a/engine/network/ServerUDP.cpp b/engine/network/ServerUDP.cpp index caf8266..c3abfdf 100644 --- a/engine/network/ServerUDP.cpp +++ b/engine/network/ServerUDP.cpp @@ -117,9 +117,6 @@ bool ServerUDP::process() _socket.sendRely(sendPacket, client); processDisconnect(senderId); - break; - case MsgType::Confirm: - break; default: processCustomPacket(type, packet, senderId);