mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-24 21:41:23 +00:00
Change and fix when compiling debug builds with asserts, now disabled with '&& 0'
This commit is contained in:
parent
be7bac0455
commit
c511633116
8 changed files with 13 additions and 13 deletions
|
@ -1665,7 +1665,7 @@ bool idEntity::StartSound( const char *soundName, const s_channelType channel, i
|
||||||
|
|
||||||
// we should ALWAYS be playing sounds from the def.
|
// we should ALWAYS be playing sounds from the def.
|
||||||
// hardcoded sounds MUST be avoided at all times because they won't get precached.
|
// hardcoded sounds MUST be avoided at all times because they won't get precached.
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( idStr::Icmpn( soundName, "snd_", 4 ) == 0 );
|
assert( idStr::Icmpn( soundName, "snd_", 4 ) == 0 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1815,7 +1815,7 @@ idItem::SetOwner
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void idItem::SetOwner( idPlayer *_owner ) {
|
void idItem::SetOwner( idPlayer *_owner ) {
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( !owner );
|
assert( !owner );
|
||||||
#endif
|
#endif
|
||||||
owner = _owner;
|
owner = _owner;
|
||||||
|
@ -1836,7 +1836,7 @@ idItem::CallFunc
|
||||||
bool idItem::CallFunc( char *funcName ) {
|
bool idItem::CallFunc( char *funcName ) {
|
||||||
const function_t *func = GetScriptFunction( (const char*) funcName );
|
const function_t *func = GetScriptFunction( (const char*) funcName );
|
||||||
if ( !func ) {
|
if ( !func ) {
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( 0 );
|
assert( 0 );
|
||||||
#endif
|
#endif
|
||||||
gameLocal.Error( "Can't find function use' in object '%s'", scriptObject.GetTypeName() );
|
gameLocal.Error( "Can't find function use' in object '%s'", scriptObject.GetTypeName() );
|
||||||
|
|
|
@ -981,7 +981,7 @@ ID_INLINE bool TestHugeTranslation( trace_t &results, const idClipModel *mdl, co
|
||||||
}
|
}
|
||||||
|
|
||||||
gameLocal.Printf( " from (%.2f %.2f %.2f) to (%.2f %.2f %.2f)\n", start.x, start.y, start.z, end.x, end.y, end.z);
|
gameLocal.Printf( " from (%.2f %.2f %.2f) to (%.2f %.2f %.2f)\n", start.x, start.y, start.z, end.x, end.y, end.z);
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( 0 );
|
assert( 0 );
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
@ -1206,7 +1206,7 @@ bool idClip::Motion( trace_t &results, const idVec3 &start, const idVec3 &end, c
|
||||||
trace_t translationalTrace, rotationalTrace, trace;
|
trace_t translationalTrace, rotationalTrace, trace;
|
||||||
idRotation endRotation;
|
idRotation endRotation;
|
||||||
const idTraceModel *trm;
|
const idTraceModel *trm;
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( rotation.GetOrigin() == start );
|
assert( rotation.GetOrigin() == start );
|
||||||
#endif
|
#endif
|
||||||
if ( TestHugeTranslation( results, mdl, start, end, trmAxis ) ) {
|
if ( TestHugeTranslation( results, mdl, start, end, trmAxis ) ) {
|
||||||
|
|
|
@ -230,7 +230,7 @@ ID_INLINE void idScriptVariable<type, etype, returnType>::LinkTo( idScriptObject
|
||||||
|
|
||||||
template<class type, etype_t etype, class returnType>
|
template<class type, etype_t etype, class returnType>
|
||||||
ID_INLINE idScriptVariable<type, etype, returnType> &idScriptVariable<type, etype, returnType>::operator=( const returnType &value ) {
|
ID_INLINE idScriptVariable<type, etype, returnType> &idScriptVariable<type, etype, returnType>::operator=( const returnType &value ) {
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
// check if we attempt to access the object before it's been linked
|
// check if we attempt to access the object before it's been linked
|
||||||
assert( data );
|
assert( data );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -817,7 +817,7 @@ idDynamicBlock<type> *idDynamicBlockAlloc<type, baseBlockSize, minBlockSize>::Re
|
||||||
|
|
||||||
template<class type, int baseBlockSize, int minBlockSize>
|
template<class type, int baseBlockSize, int minBlockSize>
|
||||||
void idDynamicBlockAlloc<type, baseBlockSize, minBlockSize>::FreeInternal( idDynamicBlock<type> *block ) {
|
void idDynamicBlockAlloc<type, baseBlockSize, minBlockSize>::FreeInternal( idDynamicBlock<type> *block ) {
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( block->node == NULL );
|
assert( block->node == NULL );
|
||||||
#endif
|
#endif
|
||||||
#ifdef DYNAMIC_BLOCK_ALLOC_CHECK
|
#ifdef DYNAMIC_BLOCK_ALLOC_CHECK
|
||||||
|
|
|
@ -370,7 +370,7 @@ idHashIndex::SetGranularity
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
ID_INLINE void idHashIndex::SetGranularity( const int newGranularity ) {
|
ID_INLINE void idHashIndex::SetGranularity( const int newGranularity ) {
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( newGranularity > 0 );
|
assert( newGranularity > 0 );
|
||||||
#endif
|
#endif
|
||||||
granularity = newGranularity;
|
granularity = newGranularity;
|
||||||
|
|
|
@ -151,7 +151,7 @@ idList<type>::idList( int )
|
||||||
*/
|
*/
|
||||||
template< class type >
|
template< class type >
|
||||||
ID_INLINE idList<type>::idList( int newgranularity ) {
|
ID_INLINE idList<type>::idList( int newgranularity ) {
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( newgranularity > 0 );
|
assert( newgranularity > 0 );
|
||||||
#endif
|
#endif
|
||||||
list = NULL;
|
list = NULL;
|
||||||
|
@ -312,7 +312,7 @@ template< class type >
|
||||||
ID_INLINE void idList<type>::SetGranularity( int newgranularity ) {
|
ID_INLINE void idList<type>::SetGranularity( int newgranularity ) {
|
||||||
int newsize;
|
int newsize;
|
||||||
|
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( newgranularity > 0 );
|
assert( newgranularity > 0 );
|
||||||
#endif
|
#endif
|
||||||
granularity = newgranularity;
|
granularity = newgranularity;
|
||||||
|
@ -420,7 +420,7 @@ ID_INLINE void idList<type>::Resize( int newsize, int newgranularity ) {
|
||||||
type *temp;
|
type *temp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( newsize >= 0 );
|
assert( newsize >= 0 );
|
||||||
|
|
||||||
assert( newgranularity > 0 );
|
assert( newgranularity > 0 );
|
||||||
|
@ -596,7 +596,7 @@ Release builds do no range checking.
|
||||||
*/
|
*/
|
||||||
template< class type >
|
template< class type >
|
||||||
ID_INLINE type &idList<type>::operator[]( int index ) {
|
ID_INLINE type &idList<type>::operator[]( int index ) {
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( index >= 0 );
|
assert( index >= 0 );
|
||||||
assert( index < num );
|
assert( index < num );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -154,7 +154,7 @@ ID_INLINE void idStrPool::FreeString( const idPoolStr *poolStr ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef _DEBUG && 0
|
#if defined(_DEBUG) && 0
|
||||||
assert( i != -1 );
|
assert( i != -1 );
|
||||||
assert( pool[i] == poolStr );
|
assert( pool[i] == poolStr );
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue