From 3c2dc07c8267715637f0bc871a87a293b54c764d Mon Sep 17 00:00:00 2001 From: Jordan Cristiano Date: Fri, 15 May 2015 17:43:20 -0400 Subject: [PATCH] Fixed conversion warnings in bitbuf --- external/sourcesdk/bitbuf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/external/sourcesdk/bitbuf.cpp b/external/sourcesdk/bitbuf.cpp index 3597775..bd328ea 100644 --- a/external/sourcesdk/bitbuf.cpp +++ b/external/sourcesdk/bitbuf.cpp @@ -951,7 +951,7 @@ float bf_read::ReadBitAngle( int numbits ) shift = (float)( BitForBitnum(numbits) ); i = ReadUBitLong( numbits ); - fReturn = (float)i * (360.0 / shift); + fReturn = static_cast(i * (360.0 / shift)); return fReturn; } @@ -1110,7 +1110,7 @@ float bf_read::ReadBitCoord (void) } // Calculate the correct floating point value - value = intval + ((float)fractval * COORD_RESOLUTION); + value = intval + static_cast((float)fractval * COORD_RESOLUTION); // Fixup the sign if negative. if ( signbit ) @@ -1141,7 +1141,7 @@ float bf_read::ReadBitCoordMP( bool bIntegral, bool bLowPrecision ) unsigned int bits = ReadUBitLong( (flags & INBOUNDS) ? COORD_INTEGER_BITS_MP+1 : COORD_INTEGER_BITS+1 ); // Remap from [0,N] to [1,N+1] int intval = (bits >> 1) + 1; - return (bits & 1) ? -intval : intval; + return static_cast((bits & 1) ? -intval : intval); } return 0.f; } @@ -1294,7 +1294,7 @@ float bf_read::ReadBitNormal (void) unsigned int fractval = ReadUBitLong( NORMAL_FRACTIONAL_BITS ); // Calculate the correct floating point value - float value = (float)fractval * NORMAL_RESOLUTION; + float value = static_cast((float)fractval * NORMAL_RESOLUTION); // Fixup the sign if negative. if ( signbit )