1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

Modified SDK for GCC 4.1

This commit is contained in:
Scott Ehlert
2008-09-15 01:33:59 -05:00
parent 325306db96
commit 4c2b8fd6c4
543 changed files with 100067 additions and 91817 deletions

View File

@ -330,7 +330,7 @@ void bf_write::WriteBitCoord (const float f)
VPROF( "bf_write::WriteBitCoord" );
#endif
int signbit = (f <= -COORD_RESOLUTION);
int intval = (int)abs(f);
int intval = abs(static_cast<int>(f));
int fractval = abs((int)(f*COORD_DENOMINATOR)) & (COORD_DENOMINATOR-1);
@ -366,7 +366,8 @@ void bf_write::WriteBitFloat(float val)
Assert(sizeof(long) == sizeof(float));
Assert(sizeof(float) == 4);
intVal = *((long*)&val);
void *v = &val;
intVal = *reinterpret_cast<long *>(v);
WriteUBitLong( intVal, 32 );
}