mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-31 09:15:13 +00:00
engine: try to avoid broken -Werror=duplicated-branches for old GCCs 2
This commit is contained in:
parent
868947cbb4
commit
23974d24c3
@ -1145,10 +1145,17 @@ qboolean Delta_WriteField( sizebuf_t *msg, delta_t *pField, void *from, void *to
|
|||||||
}
|
}
|
||||||
else if( pField->flags & DT_INTEGER )
|
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( bSigned )
|
if( bSigned )
|
||||||
iValue = *(int32_t *)((int8_t *)to + pField->offset );
|
iValue = *(int32_t *)((int8_t *)to + pField->offset );
|
||||||
else
|
else
|
||||||
iValue = *(uint32_t *)((int8_t *)to + pField->offset );
|
iValue = *(uint32_t *)((int8_t *)to + pField->offset );
|
||||||
|
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
iValue = Delta_ClampIntegerField( pField, iValue, bSigned, pField->bits );
|
iValue = Delta_ClampIntegerField( pField, iValue, bSigned, pField->bits );
|
||||||
if( pField->multiplier != 1.0f ) iValue *= pField->multiplier;
|
if( pField->multiplier != 1.0f ) iValue *= pField->multiplier;
|
||||||
MSG_WriteBitLong( msg, iValue, pField->bits, bSigned );
|
MSG_WriteBitLong( msg, iValue, pField->bits, bSigned );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user