fixed #700, a stupid typo in CC_SWAP32 marco

This commit is contained in:
Walzer 2011-08-30 15:20:41 +08:00
parent c050670e0c
commit 9f1e26f8a0
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ It should work same as apples CFSwapInt32LittleToHost(..)
/// when define returns true it means that our architecture uses big endian
#define CC_HOST_IS_BIG_ENDIAN (bool)(*(unsigned short *)"\0\xff" < 0x100)
#define CC_SWAP32(i) ((i & 0x000000ff) << 24 | (i & 0x0000ff00 << 8) | (i & 0x00ff0000) >> 8 | (i & 0xff000000) >> 24)
#define CC_SWAP32(i) ((i & 0x000000ff) << 24 | (i & 0x0000ff00) << 8 | (i & 0x00ff0000) >> 8 | (i & 0xff000000) >> 24)
#define CC_SWAP16(i) ((i & 0x00ff) << 8 | (i &0xff00) >> 8)
#define CC_SWAP_INT32_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP32(i) : (i) )
#define CC_SWAP_INT16_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP16(i) : (i) )