Use int instead of long in idCompressor_Arithmetic methods

They return int anyway, so using long doesn't make sense (and originally on
win32 it didn't make a difference anyway)
This commit is contained in:
Daniel Gibson 2012-06-23 01:53:45 +02:00 committed by dhewg
parent 600531ec98
commit e8f047bcb6

View file

@ -1484,7 +1484,7 @@ idCompressor_Arithmetic::GetCurrentCount
================
*/
int idCompressor_Arithmetic::GetCurrentCount( void ) {
return (unsigned int) ( ( ( ( (long) code - low ) + 1 ) * scale - 1 ) / ( ( (long) high - low ) + 1 ) );
return (unsigned int) ( ( ( ( (int) code - low ) + 1 ) * scale - 1 ) / ( ( (int) high - low ) + 1 ) );
}
/*
@ -1553,9 +1553,9 @@ idCompressor_Arithmetic::RemoveSymbolFromStream
================
*/
void idCompressor_Arithmetic::RemoveSymbolFromStream( acSymbol_t* symbol ) {
long range;
int range;
range = ( long )( high - low ) + 1;
range = ( int )( high - low ) + 1;
high = low + ( unsigned short )( ( range * symbol->high ) / scale - 1 );
low = low + ( unsigned short )( ( range * symbol->low ) / scale );