(svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read

This commit is contained in:
tron
2005-07-20 15:29:28 +00:00
parent f432314fa9
commit ac66e3e28f
23 changed files with 130 additions and 128 deletions

View File

@@ -135,9 +135,9 @@ static inline uint32 PackOrder(const Order *order)
static inline Order UnpackOrder(uint32 packed)
{
Order order;
order.type = (packed & 0x000000FF);
order.flags = (packed & 0x0000FF00) >> 8;
order.station = (packed & 0xFFFF0000) >> 16;
order.type = GB(packed, 0, 8);
order.flags = GB(packed, 8, 8);
order.station = GB(packed, 16, 16);
order.next = NULL;
order.index = 0; // avoid compiler warning
return order;