From 7a5577498bd003f0e39ee6f95cc4f54884047da3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 20 Aug 2017 19:06:10 -0400 Subject: [PATCH] CommonTypes: Qualify standard integral types in typedefs with std:: Given a relatively recent proposal (P0657R0), which calls for deprecation of putting stuff into the global namespace when using C++ headers, this just futureproofs our code a little more. Technically this is what we should have been doing initially, since an implementation is allowed to not provide these types in the global namespace and still be compliant. --- Source/Core/Common/CommonTypes.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Core/Common/CommonTypes.h b/Source/Core/Common/CommonTypes.h index c87ebf1719..ca9350e6fd 100644 --- a/Source/Core/Common/CommonTypes.h +++ b/Source/Core/Common/CommonTypes.h @@ -18,12 +18,12 @@ #define LONG int #endif -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; +using u8 = std::uint8_t; +using u16 = std::uint16_t; +using u32 = std::uint32_t; +using u64 = std::uint64_t; -typedef int8_t s8; -typedef int16_t s16; -typedef int32_t s32; -typedef int64_t s64; +using s8 = std::int8_t; +using s16 = std::int16_t; +using s32 = std::int32_t; +using s64 = std::int64_t;