From e8f047bcb6a71673500549798339763154d31cc2 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sat, 23 Jun 2012 01:53:45 +0200 Subject: [PATCH] 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) --- neo/framework/Compressor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neo/framework/Compressor.cpp b/neo/framework/Compressor.cpp index afc9154d..e2a0f104 100644 --- a/neo/framework/Compressor.cpp +++ b/neo/framework/Compressor.cpp @@ -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 );