Don't use DEBUG-only member variables in an NDEBUG build
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4593 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
b7c92bd0a1
commit
da987a28dd
24
src/droid.c
24
src/droid.c
|
@ -231,8 +231,12 @@ BOOL droidCheckReferences(DROID *psVictimDroid)
|
|||
{
|
||||
if ((DROID *)psStruct->psTarget[i] == psVictimDroid)
|
||||
{
|
||||
ASSERT(!"Illegal reference to droid", "Illegal reference to droid from %s line %d",
|
||||
psStruct->targetFunc[i], psStruct->targetLine[i]);
|
||||
ASSERT(!"Illegal reference to droid", "Illegal reference to droid"
|
||||
#ifdef DEBUG
|
||||
" from %s line %d", psStruct->targetFunc[i], psStruct->targetLine[i]);
|
||||
#else
|
||||
);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -241,16 +245,24 @@ BOOL droidCheckReferences(DROID *psVictimDroid)
|
|||
{
|
||||
if ((DROID *)psDroid->psTarget == psVictimDroid && psVictimDroid != psDroid)
|
||||
{
|
||||
ASSERT(!"Illegal reference to droid", "Illegal reference to droid from %s line %d",
|
||||
psDroid->targetFunc, psDroid->targetLine);
|
||||
ASSERT(!"Illegal reference to droid", "Illegal reference to droid"
|
||||
#ifdef DEBUG
|
||||
" from %s line %d", psDroid->targetFunc, psDroid->targetLine);
|
||||
#else
|
||||
);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
for (i = 0; i < psDroid->numWeaps; i++)
|
||||
{
|
||||
if ((DROID *)psDroid->psActionTarget[i] == psVictimDroid && psVictimDroid != psDroid)
|
||||
{
|
||||
ASSERT(!"Illegal reference to droid", "Illegal action reference to droid from %s line %d",
|
||||
psDroid->actionTargetFunc[i], psDroid->actionTargetLine[i]);
|
||||
ASSERT(!"Illegal reference to droid", "Illegal action reference to droid"
|
||||
#ifdef DEBUG
|
||||
" from %s line %d", psDroid->actionTargetFunc[i], psDroid->actionTargetLine[i]);
|
||||
#else
|
||||
);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue