mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #361 from lioncash/common
common_types: Minor changes
This commit is contained in:
commit
87f89ac82d
@ -27,29 +27,23 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
using u8 = std::uint8_t; ///< 8-bit unsigned byte
|
||||||
#ifndef __func__
|
using u16 = std::uint16_t; ///< 16-bit unsigned short
|
||||||
#define __func__ __FUNCTION__
|
using u32 = std::uint32_t; ///< 32-bit unsigned word
|
||||||
#endif
|
using u64 = std::uint64_t; ///< 64-bit unsigned int
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef std::uint8_t u8; ///< 8-bit unsigned byte
|
using s8 = std::int8_t; ///< 8-bit signed byte
|
||||||
typedef std::uint16_t u16; ///< 16-bit unsigned short
|
using s16 = std::int16_t; ///< 16-bit signed short
|
||||||
typedef std::uint32_t u32; ///< 32-bit unsigned word
|
using s32 = std::int32_t; ///< 32-bit signed word
|
||||||
typedef std::uint64_t u64; ///< 64-bit unsigned int
|
using s64 = std::int64_t; ///< 64-bit signed int
|
||||||
|
|
||||||
typedef std::int8_t s8; ///< 8-bit signed byte
|
using f32 = float; ///< 32-bit floating point
|
||||||
typedef std::int16_t s16; ///< 16-bit signed short
|
using f64 = double; ///< 64-bit floating point
|
||||||
typedef std::int32_t s32; ///< 32-bit signed word
|
|
||||||
typedef std::int64_t s64; ///< 64-bit signed int
|
|
||||||
|
|
||||||
typedef float f32; ///< 32-bit floating point
|
|
||||||
typedef double f64; ///< 64-bit floating point
|
|
||||||
|
|
||||||
// TODO: It would be nice to eventually replace these with strong types that prevent accidental
|
// TODO: It would be nice to eventually replace these with strong types that prevent accidental
|
||||||
// conversion between each other.
|
// conversion between each other.
|
||||||
typedef u64 VAddr; ///< Represents a pointer in the userspace virtual address space.
|
using VAddr = u64; ///< Represents a pointer in the userspace virtual address space.
|
||||||
typedef u64 PAddr; ///< Represents a pointer in the ARM11 physical address space.
|
using PAddr = u64; ///< Represents a pointer in the ARM11 physical address space.
|
||||||
|
|
||||||
using u128 = std::array<std::uint64_t, 2>;
|
using u128 = std::array<std::uint64_t, 2>;
|
||||||
static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide");
|
static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide");
|
||||||
|
Loading…
Reference in New Issue
Block a user