Fix -Wconversion-null warnings

converting to non-pointer type ‘int’ from NULL
This commit is contained in:
dhewg 2011-11-30 22:57:48 +01:00 committed by Daniel Gibson
parent 64df913412
commit c155107ba9
9 changed files with 12 additions and 12 deletions

View file

@ -458,7 +458,7 @@ idActor::idActor( void ) {
waitState = "";
blink_anim = NULL;
blink_anim = 0;
blink_time = 0;
blink_min = 0;
blink_max = 0;

View file

@ -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

View file

@ -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

View file

@ -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;
}

View file

@ -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 );
}
}

View file

@ -442,7 +442,7 @@ idActor::idActor( void ) {
waitState = "";
blink_anim = NULL;
blink_anim = 0;
blink_time = 0;
blink_min = 0;
blink_max = 0;

View file

@ -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 ) {

View file

@ -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 );
}
}

View file

@ -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 );