Fix building with clang 8.0 (#4346)
This commit is contained in:
@@ -61,10 +61,12 @@ static const Int16 SLOT_NUM_OUTSIDE = -999;
|
||||
|
||||
#define HANDLE_READ(ByteBuf, Proc, Type, Var) \
|
||||
Type Var; \
|
||||
if (!ByteBuf.Proc(Var))\
|
||||
{\
|
||||
return;\
|
||||
}
|
||||
do { \
|
||||
if (!ByteBuf.Proc(Var))\
|
||||
{\
|
||||
return;\
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
|
||||
|
||||
@@ -72,14 +74,16 @@ static const Int16 SLOT_NUM_OUTSIDE = -999;
|
||||
|
||||
#define HANDLE_PACKET_READ(ByteBuf, Proc, Type, Var) \
|
||||
Type Var; \
|
||||
{ \
|
||||
if (!ByteBuf.Proc(Var)) \
|
||||
do { \
|
||||
{ \
|
||||
if (!ByteBuf.Proc(Var)) \
|
||||
{ \
|
||||
ByteBuf.CheckValid(); \
|
||||
return false; \
|
||||
} \
|
||||
ByteBuf.CheckValid(); \
|
||||
return false; \
|
||||
} \
|
||||
ByteBuf.CheckValid(); \
|
||||
}
|
||||
} while (false)
|
||||
|
||||
|
||||
|
||||
@@ -2789,7 +2793,7 @@ void cProtocol_1_8_0::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, con
|
||||
{
|
||||
if (a_Channel == "MC|AdvCdm")
|
||||
{
|
||||
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Mode)
|
||||
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Mode);
|
||||
switch (Mode)
|
||||
{
|
||||
case 0x00:
|
||||
|
||||
Reference in New Issue
Block a user