diff options
| author | 2015-06-28 13:21:02 -0700 | |
|---|---|---|
| committer | 2015-06-28 13:21:02 -0700 | |
| commit | 19d5fbce8e9a5419b5cbae610bbf18de82d87f2c (patch) | |
| tree | 6d118e98e847e554d80c0989ba907fba314a3ae5 /src | |
| parent | Merge pull request #886 from zawata/Warning-Fixes (diff) | |
| parent | Common: Remove unused type unions breaking aliasing rules in horrible ways. (diff) | |
| download | yuzu-19d5fbce8e9a5419b5cbae610bbf18de82d87f2c.tar.gz yuzu-19d5fbce8e9a5419b5cbae610bbf18de82d87f2c.tar.xz yuzu-19d5fbce8e9a5419b5cbae610bbf18de82d87f2c.zip | |
Merge pull request #894 from linkmauve/no-union-types
Remove unused type unions breaking aliasing rules in horrible ways
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/common_types.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h index f6de0adfc..c4f1d7ba4 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h | |||
| @@ -52,32 +52,6 @@ typedef double f64; ///< 64-bit floating point | |||
| 52 | typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space. | 52 | typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space. |
| 53 | typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space. | 53 | typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space. |
| 54 | 54 | ||
| 55 | /// Union for fast 16-bit type casting | ||
| 56 | union t16 { | ||
| 57 | u8 _u8[2]; ///< 8-bit unsigned char(s) | ||
| 58 | u16 _u16; ///< 16-bit unsigned shorts(s) | ||
| 59 | }; | ||
| 60 | |||
| 61 | /// Union for fast 32-bit type casting | ||
| 62 | union t32 { | ||
| 63 | f32 _f32; ///< 32-bit floating point(s) | ||
| 64 | u32 _u32; ///< 32-bit unsigned int(s) | ||
| 65 | s32 _s32; ///< 32-bit signed int(s) | ||
| 66 | u16 _u16[2]; ///< 16-bit unsigned shorts(s) | ||
| 67 | u8 _u8[4]; ///< 8-bit unsigned char(s) | ||
| 68 | }; | ||
| 69 | |||
| 70 | /// Union for fast 64-bit type casting | ||
| 71 | union t64 { | ||
| 72 | f64 _f64; ///< 64-bit floating point | ||
| 73 | u64 _u64; ///< 64-bit unsigned long | ||
| 74 | f32 _f32[2]; ///< 32-bit floating point(s) | ||
| 75 | u32 _u32[2]; ///< 32-bit unsigned int(s) | ||
| 76 | s32 _s32[2]; ///< 32-bit signed int(s) | ||
| 77 | u16 _u16[4]; ///< 16-bit unsigned shorts(s) | ||
| 78 | u8 _u8[8]; ///< 8-bit unsigned char(s) | ||
| 79 | }; | ||
| 80 | |||
| 81 | // An inheritable class to disallow the copy constructor and operator= functions | 55 | // An inheritable class to disallow the copy constructor and operator= functions |
| 82 | class NonCopyable { | 56 | class NonCopyable { |
| 83 | protected: | 57 | protected: |