1
0

Merge pull request #1212 from mc-server/never-read

ProtocolRecognizer.cpp: removed unused NumBytesRead
This commit is contained in:
Mattes D 2014-07-18 08:09:32 +02:00
commit 79a5c90c02

View File

@ -953,7 +953,6 @@ bool cProtocolRecognizer::TryRecognizeLengthlessProtocol(void)
bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRemaining) bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRemaining)
{ {
UInt32 PacketType; UInt32 PacketType;
UInt32 NumBytesRead = (UInt32)m_Buffer.GetReadableSpace();
if (!m_Buffer.ReadVarInt(PacketType)) if (!m_Buffer.ReadVarInt(PacketType))
{ {
return false; return false;
@ -972,7 +971,6 @@ bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRema
{ {
return false; return false;
} }
NumBytesRead -= (UInt32)m_Buffer.GetReadableSpace();
switch (ProtocolVersion) switch (ProtocolVersion)
{ {
case PROTO_VERSION_1_7_2: case PROTO_VERSION_1_7_2: