mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 05:29:51 +01:00
engine: try to avoid broken -Werror=duplicated-branches for old GCCs
This commit is contained in:
parent
cb942d7e81
commit
868947cbb4
@ -989,7 +989,6 @@ qboolean Delta_CompareField( delta_t *pField, void *from, void *to, float timeba
|
||||
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
fromF = Delta_ClampIntegerField( pField, fromF, bSigned, pField->bits );
|
||||
toF = Delta_ClampIntegerField( pField, toF, bSigned, pField->bits );
|
||||
if( pField->multiplier != 1.0f ) fromF *= pField->multiplier;
|
||||
@ -1254,6 +1253,10 @@ qboolean Delta_ReadField( sizebuf_t *msg, delta_t *pField, void *from, void *to,
|
||||
}
|
||||
else if( pField->flags & DT_INTEGER )
|
||||
{
|
||||
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#endif
|
||||
if( bChanged )
|
||||
{
|
||||
iValue = MSG_ReadBitLong( msg, pField->bits, bSigned );
|
||||
@ -1270,6 +1273,9 @@ qboolean Delta_ReadField( sizebuf_t *msg, delta_t *pField, void *from, void *to,
|
||||
*(int32_t *)((uint8_t *)to + pField->offset ) = iValue;
|
||||
else
|
||||
*(uint32_t *)((uint8_t *)to + pField->offset ) = iValue;
|
||||
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
else if( pField->flags & DT_FLOAT )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user