From 028a35ef0d4719e56a5bcc1a3f2a780128498f5d Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Mon, 4 Sep 2017 10:58:38 -0500 Subject: Added assert to cProtocolRecognizer::GetPacketId. (#4001) --- src/Protocol/Protocol_1_8.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Protocol/Protocol_1_8.h') diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h index 472538d60..108cc9798 100644 --- a/src/Protocol/Protocol_1_8.h +++ b/src/Protocol/Protocol_1_8.h @@ -45,9 +45,6 @@ public: cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State); - /** Nobody inherits 1.8, so it doesn't use this method */ - virtual UInt32 GetPacketId(eOutgoingPackets a_Packet) override { return 0; } - /** Called when client sends some data: */ virtual void DataReceived(const char * a_Data, size_t a_Size) override; @@ -176,6 +173,13 @@ protected: /** Adds the received (unencrypted) data to m_ReceivedData, parses complete packets */ void AddReceivedData(const char * a_Data, size_t a_Size); + /** Nobody inherits 1.8, so it doesn't use this method */ + virtual UInt32 GetPacketId(eOutgoingPackets a_Packet) override + { + ASSERT(!"GetPacketId for cProtocol_1_8_0 is not implemented."); + return 0; + } + /** Reads and handles the packet. The packet length and type have already been read. Returns true if the packet was understood, false if it was an unknown packet */ -- cgit v1.2.3