1234567891011121314151617181920212223242526 |
- #ifndef TYPES_H
- #define TYPES_H
- typedef unsigned int uint;
- typedef unsigned char u8;
- typedef unsigned short u16;
- typedef unsigned int u32;
- typedef unsigned long u64;
- static_assert(sizeof(u8) == 1, "u8 is not 8 bit");
- static_assert(sizeof(u16) == 2, "u16 is not 16 bit");
- static_assert(sizeof(u32) == 4, "u32 is not 32 bit");
- static_assert(sizeof(u64) == 8, "u64 is not 64 bit");
- typedef char s8;
- typedef short s16;
- typedef int s32;
- typedef long s64;
- static_assert(sizeof(s8) == 1, "s8 is not 8 bit");
- static_assert(sizeof(s16) == 2, "s16 is not 16 bit");
- static_assert(sizeof(s32) == 4, "s32 is not 32 bit");
- static_assert(sizeof(s64) == 8, "s64 is not 64 bit");
- #endif
|