一段优化过的宏

#define CLASS_ID_OFFSET 0 #define CROSS_CNT_OFFSET 4 #define NAME_FLAG_OFFSET 7 #define CLASS_ID_MASK (0x0000000F << CLASS_ID_OFFSET) #define CROSS_CNT_MASK (0x00000007 << CROSS_CNT_OFFSET) #define NAME_FLAG_MASK (0x00000001 << NAME_FLAG_OFFSET) q[i].dispclass= (nod & CLASS_ID_MASK) >> CLASS_ID_OFFSET;//番号 q[i].bruch=(nod & CROSS_CNT_MASK) >> CROSS_CNT_OFFSET;//岔路数 q[i].RNFlag=(nod & NAME_FLAG_MASK) >> NAME_FLAG_OFFSET;//是否有道路名称的标记

 

 

你可能感兴趣的:(优化,Class)