From 7791a8eeedef0439e58fa481dfb48aff11f1d07e Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:40:26 +0300 Subject: [PATCH] Use cstdint in types.h --- src/types.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/types.h b/src/types.h index ce0190c6..d74b42b5 100644 --- a/src/types.h +++ b/src/types.h @@ -1,14 +1,15 @@ #pragma once +#include -using s08 = char; -using s16 = short; -using s32 = int; -using s64 = long long; +using s08 = std::int8_t; +using s16 = std::int16_t; +using s32 = std::int32_t; +using s64 = std::int64_t; -using u08 = unsigned char; -using u16 = unsigned short; -using u32 = unsigned int; -using u64 = unsigned long long; +using u08 = std::uint8_t; +using u16 = std::uint16_t; +using u32 = std::uint32_t; +using u64 = std::uint64_t; using f32 = float; using f64 = double; @@ -19,4 +20,4 @@ using f64 = double; // UDLs for memory size values constexpr u64 operator""_KB(u64 x) { return 1024ULL * x; } constexpr u64 operator""_MB(u64 x) { return 1024_KB * x; } -constexpr u64 operator""_GB(u64 x) { return 1024_MB * x; } \ No newline at end of file +constexpr u64 operator""_GB(u64 x) { return 1024_MB * x; }