Don't bother checking whether bitflag ID_ALLOC is set before removing it, the end result is the same anyway: ID_ALLOC being absent from the bitmask/number

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5558 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-07-15 11:46:12 +00:00
parent b48b8058e8
commit 0d670c0409
1 changed files with 2 additions and 8 deletions

View File

@ -203,14 +203,8 @@ BOOL strresGetIDNum(STR_RES *psRes, const char *pIDStr, UDWORD *pIDNum)
return false;
}
if (psID->id & ID_ALLOC)
{
*pIDNum = psID->id & ~ID_ALLOC;
}
else
{
*pIDNum = psID->id;
}
*pIDNum = psID->id & ~ID_ALLOC;
return true;
}