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-861f7616d084master
parent
b48b8058e8
commit
0d670c0409
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue