From a9031b6bae742b333b1b390192fa590f2ecb07ea Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 5 Oct 2020 11:27:14 +0100 Subject: 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 --- src/Protocol/Protocol_1_14.cpp | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'src/Protocol/Protocol_1_14.cpp') diff --git a/src/Protocol/Protocol_1_14.cpp b/src/Protocol/Protocol_1_14.cpp index 335677155..a77cd2d7d 100644 --- a/src/Protocol/Protocol_1_14.cpp +++ b/src/Protocol/Protocol_1_14.cpp @@ -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(a_World.GetDimension())); Pkt.WriteBEUInt8(static_cast(Clamp(Server->GetMaxPlayers(), 0, 255))); Pkt.WriteString("default"); - Pkt.WriteVarInt32(a_World.GetMaxViewDistance()); + Pkt.WriteVarInt32(ToUnsigned(a_World.GetMaxViewDistance())); Pkt.WriteBool(false); } -- cgit v1.2.3