1
0
Fork 0

Remove unused ServerPort argument

This commit is contained in:
Tiger Wang 2020-09-18 13:17:09 +01:00
parent 7f372b12cb
commit 608e7a9950
5 changed files with 20 additions and 21 deletions

View File

@ -287,21 +287,21 @@ std::unique_ptr<cProtocol> cMultiVersionProtocol::TryRecognizeLengthedProtocol(c
switch (static_cast<cProtocol::Version>(ProtocolVersion))
{
case cProtocol::Version::v1_8_0: return std::make_unique<cProtocol_1_8_0> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_9_0: return std::make_unique<cProtocol_1_9_0> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_9_1: return std::make_unique<cProtocol_1_9_1> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_9_2: return std::make_unique<cProtocol_1_9_2> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_9_4: return std::make_unique<cProtocol_1_9_4> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_10_0: return std::make_unique<cProtocol_1_10_0>(&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_11_0: return std::make_unique<cProtocol_1_11_0>(&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_11_1: return std::make_unique<cProtocol_1_11_1>(&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_12: return std::make_unique<cProtocol_1_12> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_12_1: return std::make_unique<cProtocol_1_12_1>(&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_12_2: return std::make_unique<cProtocol_1_12_2>(&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_13: return std::make_unique<cProtocol_1_13> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_13_1: return std::make_unique<cProtocol_1_13_1>(&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_13_2: return std::make_unique<cProtocol_1_13_2>(&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_14: return std::make_unique<cProtocol_1_14> (&a_Client, ServerAddress, ServerPort, NextState);
case cProtocol::Version::v1_8_0: return std::make_unique<cProtocol_1_8_0> (&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_9_0: return std::make_unique<cProtocol_1_9_0> (&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_9_1: return std::make_unique<cProtocol_1_9_1> (&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_9_2: return std::make_unique<cProtocol_1_9_2> (&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_9_4: return std::make_unique<cProtocol_1_9_4> (&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_10_0: return std::make_unique<cProtocol_1_10_0>(&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_11_0: return std::make_unique<cProtocol_1_11_0>(&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_11_1: return std::make_unique<cProtocol_1_11_1>(&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_12: return std::make_unique<cProtocol_1_12> (&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_12_1: return std::make_unique<cProtocol_1_12_1>(&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_12_2: return std::make_unique<cProtocol_1_12_2>(&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_13: return std::make_unique<cProtocol_1_13> (&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_13_1: return std::make_unique<cProtocol_1_13_1>(&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_13_2: return std::make_unique<cProtocol_1_13_2>(&a_Client, ServerAddress, NextState);
case cProtocol::Version::v1_14: return std::make_unique<cProtocol_1_14> (&a_Client, ServerAddress, NextState);
default:
{
LOGD("Client \"%s\" uses an unsupported protocol (lengthed, version %u (0x%x))",

View File

@ -100,10 +100,9 @@ extern bool g_ShouldLogCommIn, g_ShouldLogCommOut;
////////////////////////////////////////////////////////////////////////////////
// cProtocol_1_8_0:
cProtocol_1_8_0::cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, State a_State) :
cProtocol_1_8_0::cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, State a_State) :
Super(a_Client),
m_ServerAddress(a_ServerAddress),
// Note: a_ServerPort is unused
m_State(a_State),
m_IsEncrypted(false)
{

View File

@ -31,7 +31,7 @@ class cProtocol_1_8_0:
public:
cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, State a_State);
cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, State a_State);
/** Called when client sends some data: */
virtual void DataReceived(cByteBuffer & a_Buffer, const char * a_Data, size_t a_Size) override;

View File

@ -79,8 +79,8 @@ static const UInt32 OFF_HAND = 1;
////////////////////////////////////////////////////////////////////////////////
// cProtocol_1_9_0:
cProtocol_1_9_0::cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, State a_State) :
Super(a_Client, a_ServerAddress, a_ServerPort, a_State),
cProtocol_1_9_0::cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_ServerAddress, State a_State) :
Super(a_Client, a_ServerAddress, a_State),
m_IsTeleportIdConfirmed(true),
m_OutstandingTeleportId(0)
{

View File

@ -37,7 +37,7 @@ class cProtocol_1_9_0:
public:
cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, State a_State);
cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_ServerAddress, State a_State);
/** Sending stuff to clients (alphabetically sorted): */
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity & a_Vehicle) override;