diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-06 04:59:27 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-06 04:59:27 +0100 |
commit | 9c8b867d86612a04bc0e563831d1d0feee9ffe89 (patch) | |
tree | 1cc2bd3c2443bdcaf606372b6c154efd8982ed4a | |
parent | Merge pull request #413 from purpasmart96/serv_clean (diff) | |
parent | Common: Use std::abs instead of abs, using abs with cmath fails on some systems. (diff) | |
download | yuzu-9c8b867d86612a04bc0e563831d1d0feee9ffe89.tar yuzu-9c8b867d86612a04bc0e563831d1d0feee9ffe89.tar.gz yuzu-9c8b867d86612a04bc0e563831d1d0feee9ffe89.tar.bz2 yuzu-9c8b867d86612a04bc0e563831d1d0feee9ffe89.tar.lz yuzu-9c8b867d86612a04bc0e563831d1d0feee9ffe89.tar.xz yuzu-9c8b867d86612a04bc0e563831d1d0feee9ffe89.tar.zst yuzu-9c8b867d86612a04bc0e563831d1d0feee9ffe89.zip |
-rw-r--r-- | src/common/common_types.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h index c74c74f0f..94e1406b1 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -26,7 +26,7 @@ #include <cmath> #include <cstdint> -#include <xmmintrin.h> // data_types__m128.cpp +#include <cstdlib> typedef std::uint8_t u8; ///< 8-bit unsigned byte typedef std::uint16_t u16; ///< 16-bit unsigned short @@ -67,16 +67,6 @@ union t64 { u8 _u8[8]; ///< 8-bit unsigned char(s) }; -/// Union for fast 128-bit type casting -union t128 { - struct - { - t64 ps0; ///< 64-bit paired single 0 - t64 ps1; ///< 64-bit paired single 1 - }; - __m128 a; ///< 128-bit floating point (__m128 maps to the XMM[0-7] registers) -}; - namespace Common { /// Rectangle data structure class Rect { @@ -94,8 +84,8 @@ public: int x1_; ///< Rect bottom left X-coordinate int y1_; ///< Rect bottom right Y-coordinate - inline u32 width() const { return abs(x1_ - x0_); } - inline u32 height() const { return abs(y1_ - y0_); } + inline u32 width() const { return std::abs(x1_ - x0_); } + inline u32 height() const { return std::abs(y1_ - y0_); } inline bool operator == (const Rect& val) const { return (x0_ == val.x0_ && y0_ == val.y0_ && x1_ == val.x1_ && y1_ == val.y1_); |