mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-23 04:51:56 +00:00
Fix -Wconversion-null warnings
converting to non-pointer type ‘int’ from NULL
This commit is contained in:
parent
9d97eefb1a
commit
120d560722
14 changed files with 21 additions and 21 deletions
|
@ -458,7 +458,7 @@ idActor::idActor( void ) {
|
|||
|
||||
waitState = "";
|
||||
|
||||
blink_anim = NULL;
|
||||
blink_anim = 0;
|
||||
blink_time = 0;
|
||||
blink_min = 0;
|
||||
blink_max = 0;
|
||||
|
|
|
@ -276,7 +276,7 @@ void idGrabber::StartDrag( idEntity *grabEnt, int id ) {
|
|||
aiEnt->StartRagdoll();
|
||||
}
|
||||
} else if ( grabEnt->IsType( idMoveableItem::Type ) ) {
|
||||
grabEnt->PostEventMS( &EV_Touch, 250, thePlayer, NULL );
|
||||
grabEnt->PostEventMS( &EV_Touch, 250, thePlayer, 0 );
|
||||
}
|
||||
|
||||
// Get the current physics object to manipulate
|
||||
|
|
|
@ -294,7 +294,7 @@ void idItem::Spawn( void ) {
|
|||
if ( !ent ) {
|
||||
gameLocal.Error( "Item couldn't find owner '%s'", giveTo.c_str() );
|
||||
}
|
||||
PostEventMS( &EV_Touch, 0, ent, NULL );
|
||||
PostEventMS( &EV_Touch, 0, ent, 0 );
|
||||
}
|
||||
|
||||
#ifdef CTF
|
||||
|
|
|
@ -1303,10 +1303,10 @@ void idTrigger_Flag::Event_Touch( idEntity *other, trace_t *trace ) {
|
|||
flag->PostEventMS( eventFlag, 0 );
|
||||
break;
|
||||
case 1 :
|
||||
flag->PostEventMS( eventFlag, 0, NULL );
|
||||
flag->PostEventMS( eventFlag, 0, 0 );
|
||||
break;
|
||||
case 2 :
|
||||
flag->PostEventMS( eventFlag, 0, NULL, NULL );
|
||||
flag->PostEventMS( eventFlag, 0, 0, 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -2489,7 +2489,7 @@ void idAI::Event_ThrowMoveable( void ) {
|
|||
}
|
||||
if ( moveable ) {
|
||||
moveable->Unbind();
|
||||
moveable->PostEventMS( &EV_SetOwner, 200, NULL );
|
||||
moveable->PostEventMS( &EV_SetOwner, 200, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2510,7 +2510,7 @@ void idAI::Event_ThrowAF( void ) {
|
|||
}
|
||||
if ( af ) {
|
||||
af->Unbind();
|
||||
af->PostEventMS( &EV_SetOwner, 200, NULL );
|
||||
af->PostEventMS( &EV_SetOwner, 200, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2650,7 +2650,7 @@ void idCommonLocal::LoadGameDLL( void ) {
|
|||
GetGameAPI = (GetGameAPI_t) Sys_DLL_GetProcAddress( gameDLL, "GetGameAPI" );
|
||||
if ( !GetGameAPI ) {
|
||||
Sys_DLL_Unload( gameDLL );
|
||||
gameDLL = NULL;
|
||||
gameDLL = 0;
|
||||
common->FatalError( "couldn't find game DLL API" );
|
||||
return;
|
||||
}
|
||||
|
@ -2674,7 +2674,7 @@ void idCommonLocal::LoadGameDLL( void ) {
|
|||
|
||||
if ( gameExport.version != GAME_API_VERSION ) {
|
||||
Sys_DLL_Unload( gameDLL );
|
||||
gameDLL = NULL;
|
||||
gameDLL = 0;
|
||||
common->FatalError( "wrong game DLL API version" );
|
||||
return;
|
||||
}
|
||||
|
@ -2706,7 +2706,7 @@ void idCommonLocal::UnloadGameDLL( void ) {
|
|||
|
||||
if ( gameDLL ) {
|
||||
Sys_DLL_Unload( gameDLL );
|
||||
gameDLL = NULL;
|
||||
gameDLL = 0;
|
||||
}
|
||||
game = NULL;
|
||||
gameEdit = NULL;
|
||||
|
|
|
@ -442,7 +442,7 @@ idActor::idActor( void ) {
|
|||
|
||||
waitState = "";
|
||||
|
||||
blink_anim = NULL;
|
||||
blink_anim = 0;
|
||||
blink_time = 0;
|
||||
blink_min = 0;
|
||||
blink_max = 0;
|
||||
|
|
|
@ -294,7 +294,7 @@ void idItem::Spawn( void ) {
|
|||
if ( !ent ) {
|
||||
gameLocal.Error( "Item couldn't find owner '%s'", giveTo.c_str() );
|
||||
}
|
||||
PostEventMS( &EV_Touch, 0, ent, NULL );
|
||||
PostEventMS( &EV_Touch, 0, ent, 0 );
|
||||
}
|
||||
|
||||
if ( spawnArgs.GetBool( "spin" ) || gameLocal.isMultiplayer ) {
|
||||
|
|
|
@ -2335,7 +2335,7 @@ void idAI::Event_ThrowMoveable( void ) {
|
|||
}
|
||||
if ( moveable ) {
|
||||
moveable->Unbind();
|
||||
moveable->PostEventMS( &EV_SetOwner, 200, NULL );
|
||||
moveable->PostEventMS( &EV_SetOwner, 200, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2356,7 +2356,7 @@ void idAI::Event_ThrowAF( void ) {
|
|||
}
|
||||
if ( af ) {
|
||||
af->Unbind();
|
||||
af->PostEventMS( &EV_SetOwner, 200, NULL );
|
||||
af->PostEventMS( &EV_SetOwner, 200, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ int idDict::FindKeyIndex( const char *key ) const {
|
|||
|
||||
if ( key == NULL || key[0] == '\0' ) {
|
||||
idLib::common->DWarning( "idDict::FindKeyIndex: empty key" );
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hash = argHash.GenerateKey( key, false );
|
||||
|
|
|
@ -292,7 +292,7 @@ idSoundSample::idSoundSample() {
|
|||
objectMemSize = 0;
|
||||
nonCacheData = NULL;
|
||||
amplitudeData = NULL;
|
||||
openalBuffer = NULL;
|
||||
openalBuffer = 0;
|
||||
hardwareBuffer = false;
|
||||
defaultSound = false;
|
||||
onDemand = false;
|
||||
|
|
|
@ -185,7 +185,7 @@ void idSoundChannel::Clear( void ) {
|
|||
memset( &parms, 0, sizeof(parms) );
|
||||
|
||||
triggered = false;
|
||||
openalSource = NULL;
|
||||
openalSource = 0;
|
||||
openalStreamingOffset = 0;
|
||||
openalStreamingBuffer[0] = openalStreamingBuffer[1] = openalStreamingBuffer[2] = 0;
|
||||
lastopenalStreamingBuffer[0] = lastopenalStreamingBuffer[1] = lastopenalStreamingBuffer[2] = 0;
|
||||
|
|
|
@ -456,7 +456,7 @@ void idSoundSystemLocal::Shutdown() {
|
|||
alDeleteSources( 1, &openalSources[i].handle );
|
||||
|
||||
// clear entry in source array
|
||||
openalSources[i].handle = NULL;
|
||||
openalSources[i].handle = 0;
|
||||
openalSources[i].startTime = 0;
|
||||
openalSources[i].chan = NULL;
|
||||
openalSources[i].inUse = false;
|
||||
|
@ -1228,7 +1228,7 @@ ALuint idSoundSystemLocal::AllocOpenALSource( idSoundChannel *chan, bool looping
|
|||
|
||||
return openalSources[index].handle;
|
||||
} else {
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1242,7 +1242,7 @@ void idSoundSystemLocal::FreeOpenALSource( ALuint handle ) {
|
|||
for ( i = 0; i < openalSourceCount; i++ ) {
|
||||
if ( openalSources[i].handle == handle ) {
|
||||
if ( openalSources[i].chan ) {
|
||||
openalSources[i].chan->openalSource = NULL;
|
||||
openalSources[i].chan->openalSource = 0;
|
||||
}
|
||||
#if ID_OPENAL
|
||||
// Reset source EAX ROOM level when freeing stereo source
|
||||
|
|
|
@ -1763,7 +1763,7 @@ void idSoundWorldLocal::AddChannelContribution( idSoundEmitterLocal *sound, idSo
|
|||
|
||||
// handle streaming sounds (decode on the fly) both single shot AND looping
|
||||
if ( chan->triggered ) {
|
||||
alSourcei( chan->openalSource, AL_BUFFER, NULL );
|
||||
alSourcei( chan->openalSource, AL_BUFFER, 0 );
|
||||
alDeleteBuffers( 3, &chan->lastopenalStreamingBuffer[0] );
|
||||
chan->lastopenalStreamingBuffer[0] = chan->openalStreamingBuffer[0];
|
||||
chan->lastopenalStreamingBuffer[1] = chan->openalStreamingBuffer[1];
|
||||
|
|
Loading…
Reference in a new issue