1
0

Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)

* Fix cmake not adding Werror on clang, and _lots_ of warnings

* WIP: Build fixes

* Cannot make intermediate blockhandler instance

* Tiger's changes

* Fix BitIndex check

* Handle invalid NextState values in cMultiVersionProtocol

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
This commit is contained in:
peterbell10
2020-10-05 11:27:14 +01:00
committed by GitHub
parent 23021dd828
commit a9031b6bae
144 changed files with 886 additions and 862 deletions

View File

@@ -21,36 +21,6 @@ Implements the 1.14 protocol classes:
#define HANDLE_READ(ByteBuf, Proc, Type, Var) \
Type Var; \
do { \
if (!ByteBuf.Proc(Var))\
{\
return;\
} \
} while (false)
#define HANDLE_PACKET_READ(ByteBuf, Proc, Type, Var) \
Type Var; \
do { \
{ \
if (!ByteBuf.Proc(Var)) \
{ \
ByteBuf.CheckValid(); \
return false; \
} \
ByteBuf.CheckValid(); \
} \
} while (false)
////////////////////////////////////////////////////////////////////////////////
// cProtocol_1_14:
@@ -89,7 +59,7 @@ void cProtocol_1_14::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
Pkt.WriteBEInt32(static_cast<Int32>(a_World.GetDimension()));
Pkt.WriteBEUInt8(static_cast<UInt8>(Clamp<size_t>(Server->GetMaxPlayers(), 0, 255)));
Pkt.WriteString("default");
Pkt.WriteVarInt32(a_World.GetMaxViewDistance());
Pkt.WriteVarInt32(ToUnsigned(a_World.GetMaxViewDistance()));
Pkt.WriteBool(false);
}