Created
May 26, 2022 04:16
-
-
Save gszauer/624a7ff8eb8595fa015c62bedebd4351 to your computer and use it in GitHub Desktop.
types.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
typedef unsigned char u8; | |
typedef unsigned short u16; | |
typedef unsigned int u32; | |
typedef unsigned long long u64; | |
typedef __int8 i8; | |
typedef __int16 i16; | |
typedef __int32 i32; | |
typedef __int64 i64; | |
typedef float f32; | |
typedef double f64; | |
static_assert (sizeof(u8) == 1, "Size is not correct"); | |
static_assert (sizeof(u16) == 2, "Size is not correct"); | |
static_assert (sizeof(u32) == 4, "Size is not correct"); | |
static_assert (sizeof(u64) == 8, "Size is not correct"); | |
static_assert (sizeof(i8) == 1, "Size is not correct"); | |
static_assert (sizeof(i16) == 2, "Size is not correct"); | |
static_assert (sizeof(i32) == 4, "Size is not correct"); | |
static_assert (sizeof(i64) == 8, "Size is not correct"); | |
static_assert (sizeof(f32) == 4, "Size is not correct"); | |
static_assert (sizeof(f64) == 8, "Size is not correct"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment