From e8e5041955554a0bc6dc12fe160468f10275c2c1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Apr 2018 22:25:16 -0400 Subject: common_types: Remove unnecessary check for whether or not__func__ is defined VS has supported this for quite a while. --- src/common/common_types.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/common') diff --git a/src/common/common_types.h b/src/common/common_types.h index 844d34965..56b2677c8 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -27,12 +27,6 @@ #include #include -#ifdef _MSC_VER -#ifndef __func__ -#define __func__ __FUNCTION__ -#endif -#endif - typedef std::uint8_t u8; ///< 8-bit unsigned byte typedef std::uint16_t u16; ///< 16-bit unsigned short typedef std::uint32_t u32; ///< 32-bit unsigned word -- cgit v1.2.3 From 16ffecd8fb613046dac1903290617404c0835ae8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Apr 2018 22:26:32 -0400 Subject: common_types: Convert typedefs to using aliases May as well while we're making changes to this file. --- src/common/common_types.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/common') diff --git a/src/common/common_types.h b/src/common/common_types.h index 56b2677c8..6b1766dca 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -27,23 +27,23 @@ #include #include -typedef std::uint8_t u8; ///< 8-bit unsigned byte -typedef std::uint16_t u16; ///< 16-bit unsigned short -typedef std::uint32_t u32; ///< 32-bit unsigned word -typedef std::uint64_t u64; ///< 64-bit unsigned int +using u8 = std::uint8_t; ///< 8-bit unsigned byte +using u16 = std::uint16_t; ///< 16-bit unsigned short +using u32 = std::uint32_t; ///< 32-bit unsigned word +using u64 = std::uint64_t; ///< 64-bit unsigned int -typedef std::int8_t s8; ///< 8-bit signed byte -typedef std::int16_t s16; ///< 16-bit signed short -typedef std::int32_t s32; ///< 32-bit signed word -typedef std::int64_t s64; ///< 64-bit signed int +using s8 = std::int8_t; ///< 8-bit signed byte +using s16 = std::int16_t; ///< 16-bit signed short +using s32 = std::int32_t; ///< 32-bit signed word +using s64 = std::int64_t; ///< 64-bit signed int -typedef float f32; ///< 32-bit floating point -typedef double f64; ///< 64-bit floating point +using f32 = float; ///< 32-bit floating point +using f64 = double; ///< 64-bit floating point // TODO: It would be nice to eventually replace these with strong types that prevent accidental // conversion between each other. -typedef u64 VAddr; ///< Represents a pointer in the userspace virtual address space. -typedef u64 PAddr; ///< Represents a pointer in the ARM11 physical address space. +using VAddr = u64; ///< Represents a pointer in the userspace virtual address space. +using PAddr = u64; ///< Represents a pointer in the ARM11 physical address space. using u128 = std::array; static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide"); -- cgit v1.2.3