engine: common: make MSG_WriteOneBit inlined, as it's usually called with literal argument

This commit is contained in:
Alibek Omarov
2024-08-22 12:51:30 +03:00
parent 8c885d3f37
commit cd86f80203
2 changed files with 11 additions and 12 deletions

View File

@@ -160,17 +160,6 @@ void MSG_InitMasks( void )
ExtraMasks[maskBit] = (uint)BIT( maskBit ) - 1;
}
void MSG_WriteOneBit( sizebuf_t *sb, int nValue )
{
if( !MSG_Overflow( sb, 1 ))
{
if( nValue ) sb->pData[sb->iCurBit>>3] |= BIT( sb->iCurBit & 7 );
else sb->pData[sb->iCurBit>>3] &= ~BIT( sb->iCurBit & 7 );
sb->iCurBit++;
}
}
void MSG_WriteUBitLong( sizebuf_t *sb, uint curData, int numbits )
{
Assert( numbits >= 0 && numbits <= 32 );