summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar Lioncash2018-04-19 22:26:32 -0400
committerGravatar Lioncash2018-04-19 22:26:35 -0400
commit16ffecd8fb613046dac1903290617404c0835ae8 (patch)
treec1e176d672e8795bd27eb8d9ebe26bf7145f56d6 /src/common
parentcommon_types: Remove unnecessary check for whether or not__func__ is defined (diff)
downloadyuzu-16ffecd8fb613046dac1903290617404c0835ae8.tar.gz
yuzu-16ffecd8fb613046dac1903290617404c0835ae8.tar.xz
yuzu-16ffecd8fb613046dac1903290617404c0835ae8.zip
common_types: Convert typedefs to using aliases
May as well while we're making changes to this file.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/common_types.h24
1 files changed, 12 insertions, 12 deletions
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 @@
27#include <array> 27#include <array>
28#include <cstdint> 28#include <cstdint>
29 29
30typedef std::uint8_t u8; ///< 8-bit unsigned byte 30using u8 = std::uint8_t; ///< 8-bit unsigned byte
31typedef std::uint16_t u16; ///< 16-bit unsigned short 31using u16 = std::uint16_t; ///< 16-bit unsigned short
32typedef std::uint32_t u32; ///< 32-bit unsigned word 32using u32 = std::uint32_t; ///< 32-bit unsigned word
33typedef std::uint64_t u64; ///< 64-bit unsigned int 33using u64 = std::uint64_t; ///< 64-bit unsigned int
34 34
35typedef std::int8_t s8; ///< 8-bit signed byte 35using s8 = std::int8_t; ///< 8-bit signed byte
36typedef std::int16_t s16; ///< 16-bit signed short 36using s16 = std::int16_t; ///< 16-bit signed short
37typedef std::int32_t s32; ///< 32-bit signed word 37using s32 = std::int32_t; ///< 32-bit signed word
38typedef std::int64_t s64; ///< 64-bit signed int 38using s64 = std::int64_t; ///< 64-bit signed int
39 39
40typedef float f32; ///< 32-bit floating point 40using f32 = float; ///< 32-bit floating point
41typedef double f64; ///< 64-bit floating point 41using f64 = double; ///< 64-bit floating point
42 42
43// TODO: It would be nice to eventually replace these with strong types that prevent accidental 43// TODO: It would be nice to eventually replace these with strong types that prevent accidental
44// conversion between each other. 44// conversion between each other.
45typedef u64 VAddr; ///< Represents a pointer in the userspace virtual address space. 45using VAddr = u64; ///< Represents a pointer in the userspace virtual address space.
46typedef u64 PAddr; ///< Represents a pointer in the ARM11 physical address space. 46using PAddr = u64; ///< Represents a pointer in the ARM11 physical address space.
47 47
48using u128 = std::array<std::uint64_t, 2>; 48using u128 = std::array<std::uint64_t, 2>;
49static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide"); 49static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide");