1
0

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 21:38:54 +02:00 committed by peterbell10
parent 66e73a2d68
commit eda2fc42d9

View File

@ -32,10 +32,12 @@ Implements the 1.13 protocol classes:
#define HANDLE_READ(ByteBuf, Proc, Type, Var) \ #define HANDLE_READ(ByteBuf, Proc, Type, Var) \
Type Var; \ Type Var; \
if (!ByteBuf.Proc(Var))\ do { \
{\ if (!ByteBuf.Proc(Var))\
return;\ {\
} return;\
} \
} while (false)
@ -43,14 +45,16 @@ Implements the 1.13 protocol classes:
#define HANDLE_PACKET_READ(ByteBuf, Proc, Type, Var) \ #define HANDLE_PACKET_READ(ByteBuf, Proc, Type, Var) \
Type Var; \ Type Var; \
{ \ do { \
if (!ByteBuf.Proc(Var)) \
{ \ { \
if (!ByteBuf.Proc(Var)) \
{ \
ByteBuf.CheckValid(); \
return false; \
} \
ByteBuf.CheckValid(); \ ByteBuf.CheckValid(); \
return false; \
} \ } \
ByteBuf.CheckValid(); \ } while (false)
}