mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-01-31 21:10:47 +00:00
Trivial pointer cast fixes for x86_64
This commit is contained in:
parent
66c740b405
commit
ba1adc839f
7 changed files with 9 additions and 9 deletions
|
@ -167,7 +167,7 @@ void idAASLocal::CalculateAreaTravelTimes(void) {
|
|||
}
|
||||
}
|
||||
|
||||
assert( ( (unsigned int) bytePtr - (unsigned int) areaTravelTimes ) <= numAreaTravelTimes * sizeof( unsigned short ) );
|
||||
assert( ( ( ptrdiff_t ) bytePtr - ( ptrdiff_t ) areaTravelTimes ) <= numAreaTravelTimes * sizeof( unsigned short ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -167,7 +167,7 @@ void idAASLocal::CalculateAreaTravelTimes(void) {
|
|||
}
|
||||
}
|
||||
|
||||
assert( ( (unsigned int) bytePtr - (unsigned int) areaTravelTimes ) <= numAreaTravelTimes * sizeof( unsigned short ) );
|
||||
assert( ( (ptrdiff_t) bytePtr - (ptrdiff_t) areaTravelTimes ) <= numAreaTravelTimes * sizeof( unsigned short ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2936,7 +2936,7 @@ const char *idMat6::ToString( int precision ) const {
|
|||
//===============================================================
|
||||
|
||||
float idMatX::temp[MATX_MAX_TEMP+4];
|
||||
float * idMatX::tempPtr = (float *) ( ( (int) idMatX::temp + 15 ) & ~15 );
|
||||
float * idMatX::tempPtr = (float *) ( ( (intptr_t) idMatX::temp + 15 ) & ~15 );
|
||||
int idMatX::tempIndex = 0;
|
||||
|
||||
|
||||
|
|
|
@ -2280,7 +2280,7 @@ ID_INLINE void idMatX::SetData( int rows, int columns, float *data ) {
|
|||
if ( mat != NULL && alloced != -1 ) {
|
||||
Mem_Free16( mat );
|
||||
}
|
||||
assert( ( ( (int) data ) & 15 ) == 0 ); // data must be 16 byte aligned
|
||||
assert( ( ( (uintptr_t) data ) & 15 ) == 0 ); // data must be 16 byte aligned
|
||||
mat = data;
|
||||
alloced = -1;
|
||||
numRows = rows;
|
||||
|
|
|
@ -384,7 +384,7 @@ const char *idVec6::ToString( int precision ) const {
|
|||
//===============================================================
|
||||
|
||||
float idVecX::temp[VECX_MAX_TEMP+4];
|
||||
float * idVecX::tempPtr = (float *) ( ( (int) idVecX::temp + 15 ) & ~15 );
|
||||
float * idVecX::tempPtr = (float *) ( ( (intptr_t) idVecX::temp + 15 ) & ~15 );
|
||||
int idVecX::tempIndex = 0;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1757,7 +1757,7 @@ ID_INLINE void idVecX::SetData( int length, float *data ) {
|
|||
if ( p && ( p < idVecX::tempPtr || p >= idVecX::tempPtr + VECX_MAX_TEMP ) && alloced != -1 ) {
|
||||
Mem_Free16( p );
|
||||
}
|
||||
assert( ( ( (int) data ) & 15 ) == 0 ); // data must be 16 byte aligned
|
||||
assert( ( ( (uintptr_t) data ) & 15 ) == 0 ); // data must be 16 byte aligned
|
||||
p = data;
|
||||
size = length;
|
||||
alloced = -1;
|
||||
|
|
|
@ -49,7 +49,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#define ALIGN16( x ) __declspec(align(16)) x
|
||||
#define PACKED
|
||||
|
||||
#define _alloca16( x ) ((void *)((((int)_alloca( (x)+15 )) + 15) & ~15))
|
||||
#define _alloca16( x ) ((void *)((((uintptr_t)_alloca( (x)+15 )) + 15) & ~15))
|
||||
|
||||
#define PATHSEPERATOR_STR "\\"
|
||||
#define PATHSEPERATOR_CHAR '\\'
|
||||
|
@ -84,7 +84,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#endif
|
||||
|
||||
#define _alloca alloca
|
||||
#define _alloca16( x ) ((void *)((((int)alloca( (x)+15 )) + 15) & ~15))
|
||||
#define _alloca16( x ) ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15))
|
||||
|
||||
#define PATHSEPERATOR_STR "/"
|
||||
#define PATHSEPERATOR_CHAR '/'
|
||||
|
@ -120,7 +120,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#endif
|
||||
|
||||
#define _alloca alloca
|
||||
#define _alloca16( x ) ((void *)((((int)alloca( (x)+15 )) + 15) & ~15))
|
||||
#define _alloca16( x ) ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15))
|
||||
|
||||
#define ALIGN16( x ) x
|
||||
#define PACKED __attribute__((packed))
|
||||
|
|
Loading…
Reference in a new issue