From a4312ca12b2d66078c77647ab1ea58927f13fbc0 Mon Sep 17 00:00:00 2001 From: heck Date: Tue, 10 Sep 2024 23:22:32 +0200 Subject: [PATCH] add some fixed size type definitions inspired from by the rust types. They are just handy and clean. --- src/types.hh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/types.hh diff --git a/src/types.hh b/src/types.hh new file mode 100644 index 0000000..c4669d5 --- /dev/null +++ b/src/types.hh @@ -0,0 +1,19 @@ +#ifndef HECK_DAISY_TYPES_HH +#define HECK_DAISY_TYPES_HH + +#include + +using u8 = uint8_t; +using u16 = uint16_t; +using u32 = uint32_t; +using u64 = uint64_t; + +using i8 = int8_t; +using i16 = int16_t; +using i32 = int32_t; +using i64 = int64_t; + +using f32 = float; +using f64 = double; + +#endif \ No newline at end of file