Fix clang8.0 build (#4399)

The protocol 13.0 PR broke clang 8.0 builds.
This commit is contained in:
Bond-009
2019-09-24 20:38:54 +01:00
committed by peterbell10
parent 66e73a2d68
commit eda2fc42d9
+13 -9
View File
@@ -32,10 +32,12 @@ Implements the 1.13 protocol classes:
#define HANDLE_READ(ByteBuf, Proc, Type, Var) \
Type Var; \
if (!ByteBuf.Proc(Var))\
{\
return;\
}
do { \
if (!ByteBuf.Proc(Var))\
{\
return;\
} \
} while (false)
@@ -43,14 +45,16 @@ Implements the 1.13 protocol classes:
#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)