stdafx.h
changeset 536 03d80fecb999
parent 500 8e52f7797b48
child 543 946badd71033
equal deleted inserted replaced
535:0ddbb93125d1 536:03d80fecb999
   125 #define FROM_BE16(x) x
   125 #define FROM_BE16(x) x
   126 #define TO_BE32X(x) x
   126 #define TO_BE32X(x) x
   127 
   127 
   128 #else
   128 #else
   129 
   129 
   130 static uint32 FORCEINLINE TO_BE32(uint32 x) { return BSWAP32(x); }
   130 static inline uint32 TO_BE32(uint32 x) { return BSWAP32(x); }
   131 static uint16 FORCEINLINE TO_BE16(uint16 x) { return BSWAP16(x); }
   131 static inline uint16 TO_BE16(uint16 x) { return BSWAP16(x); }
   132 static uint32 FORCEINLINE FROM_BE32(uint32 x) { return BSWAP32(x); }
   132 static inline uint32 FROM_BE32(uint32 x) { return BSWAP32(x); }
   133 static uint16 FORCEINLINE FROM_BE16(uint16 x) { return BSWAP16(x); }
   133 static inline uint16 FROM_BE16(uint16 x) { return BSWAP16(x); }
   134 #define TO_LE32(x) x
   134 #define TO_LE32(x) x
   135 #define TO_LE16(x) x
   135 #define TO_LE16(x) x
   136 #define TO_BE32X(x) BSWAP32(x)
   136 #define TO_BE32X(x) BSWAP32(x)
   137 #define FROM_LE32(x) x
   137 #define FROM_LE32(x) x
   138 #define FROM_LE16(x) x
   138 #define FROM_LE16(x) x
   155 };
   155 };
   156 #endif
   156 #endif
   157 #endif
   157 #endif
   158 
   158 
   159 // Compile time assertions
   159 // Compile time assertions
   160 #define assert_compile(expr) void __ct_assert__(int a[1 - 2 * !(expr)]);
   160 #define assert_compile(expr) void __ct_assert__(int a[1 - 2 * !(expr)])
   161 
   161 
   162 assert_compile(sizeof(uint32) == 4);
   162 assert_compile(sizeof(uint32) == 4);
   163 assert_compile(sizeof(uint16) == 2);
   163 assert_compile(sizeof(uint16) == 2);
   164 assert_compile(sizeof(uint8)	== 1);
   164 assert_compile(sizeof(uint8)	== 1);
   165 
   165