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.
|
||||
// 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 );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1815,7 +1815,7 @@ idItem::SetOwner
|
|||
================
|
||||
*/
|
||||
void idItem::SetOwner( idPlayer *_owner ) {
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( !owner );
|
||||
#endif
|
||||
owner = _owner;
|
||||
|
@ -1836,7 +1836,7 @@ idItem::CallFunc
|
|||
bool idItem::CallFunc( char *funcName ) {
|
||||
const function_t *func = GetScriptFunction( (const char*) funcName );
|
||||
if ( !func ) {
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( 0 );
|
||||
#endif
|
||||
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);
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( 0 );
|
||||
#endif
|
||||
return true;
|
||||
|
@ -1206,7 +1206,7 @@ bool idClip::Motion( trace_t &results, const idVec3 &start, const idVec3 &end, c
|
|||
trace_t translationalTrace, rotationalTrace, trace;
|
||||
idRotation endRotation;
|
||||
const idTraceModel *trm;
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( rotation.GetOrigin() == start );
|
||||
#endif
|
||||
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>
|
||||
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
|
||||
assert( data );
|
||||
#endif
|
||||
|
|
|
@ -817,7 +817,7 @@ idDynamicBlock<type> *idDynamicBlockAlloc<type, baseBlockSize, minBlockSize>::Re
|
|||
|
||||
template<class type, int baseBlockSize, int minBlockSize>
|
||||
void idDynamicBlockAlloc<type, baseBlockSize, minBlockSize>::FreeInternal( idDynamicBlock<type> *block ) {
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( block->node == NULL );
|
||||
#endif
|
||||
#ifdef DYNAMIC_BLOCK_ALLOC_CHECK
|
||||
|
|
|
@ -370,7 +370,7 @@ idHashIndex::SetGranularity
|
|||
================
|
||||
*/
|
||||
ID_INLINE void idHashIndex::SetGranularity( const int newGranularity ) {
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( newGranularity > 0 );
|
||||
#endif
|
||||
granularity = newGranularity;
|
||||
|
|
|
@ -151,7 +151,7 @@ idList<type>::idList( int )
|
|||
*/
|
||||
template< class type >
|
||||
ID_INLINE idList<type>::idList( int newgranularity ) {
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( newgranularity > 0 );
|
||||
#endif
|
||||
list = NULL;
|
||||
|
@ -312,7 +312,7 @@ template< class type >
|
|||
ID_INLINE void idList<type>::SetGranularity( int newgranularity ) {
|
||||
int newsize;
|
||||
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( newgranularity > 0 );
|
||||
#endif
|
||||
granularity = newgranularity;
|
||||
|
@ -420,7 +420,7 @@ ID_INLINE void idList<type>::Resize( int newsize, int newgranularity ) {
|
|||
type *temp;
|
||||
int i;
|
||||
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( newsize >= 0 );
|
||||
|
||||
assert( newgranularity > 0 );
|
||||
|
@ -596,7 +596,7 @@ Release builds do no range checking.
|
|||
*/
|
||||
template< class type >
|
||||
ID_INLINE type &idList<type>::operator[]( int index ) {
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( index >= 0 );
|
||||
assert( index < num );
|
||||
#endif
|
||||
|
|
|
@ -154,7 +154,7 @@ ID_INLINE void idStrPool::FreeString( const idPoolStr *poolStr ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG && 0
|
||||
#if defined(_DEBUG) && 0
|
||||
assert( i != -1 );
|
||||
assert( pool[i] == poolStr );
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue