10.06.2017, 15:19
Another interesting way to do a comparison to multiple values is this:
PHP код:
static const valid_vehid = (1<<596) | (1<<597) | (1<<598) | (1<<599) | (1<<523);//makes bit mask of valid ids
//and do
if((1<<vehicleID)&valid_vehid )
{
//true
}
else
{
//not
}