diff options
| author | 2018-07-19 09:32:13 -0400 | |
|---|---|---|
| committer | 2018-07-19 09:32:13 -0400 | |
| commit | 1edf4dd7ef6085e52f9be669601c88cb8f48f166 (patch) | |
| tree | e92bdd4f172a4bff4038b94ddda2dd657b6da875 /src/common/swap.h | |
| parent | Merge pull request #700 from bunnei/update-dynarmic (diff) | |
| download | yuzu-1edf4dd7ef6085e52f9be669601c88cb8f48f166.tar.gz yuzu-1edf4dd7ef6085e52f9be669601c88cb8f48f166.tar.xz yuzu-1edf4dd7ef6085e52f9be669601c88cb8f48f166.zip | |
common/swap: Use using aliases where applicable
Diffstat (limited to 'src/common/swap.h')
| -rw-r--r-- | src/common/swap.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/common/swap.h b/src/common/swap.h index f025f7450..23f327201 100644 --- a/src/common/swap.h +++ b/src/common/swap.h | |||
| @@ -167,7 +167,7 @@ inline double swapd(double f) { | |||
| 167 | 167 | ||
| 168 | template <typename T, typename F> | 168 | template <typename T, typename F> |
| 169 | struct swap_struct_t { | 169 | struct swap_struct_t { |
| 170 | typedef swap_struct_t<T, F> swapped_t; | 170 | using swapped_t = swap_struct_t; |
| 171 | 171 | ||
| 172 | protected: | 172 | protected: |
| 173 | T value = T(); | 173 | T value = T(); |
| @@ -606,51 +606,51 @@ struct swap_double_t { | |||
| 606 | }; | 606 | }; |
| 607 | 607 | ||
| 608 | #if COMMON_LITTLE_ENDIAN | 608 | #if COMMON_LITTLE_ENDIAN |
| 609 | typedef u32 u32_le; | 609 | using u16_le = u16; |
| 610 | typedef u16 u16_le; | 610 | using u32_le = u32; |
| 611 | typedef u64 u64_le; | 611 | using u64_le = u64; |
| 612 | 612 | ||
| 613 | typedef s32 s32_le; | 613 | using s16_le = s16; |
| 614 | typedef s16 s16_le; | 614 | using s32_le = s32; |
| 615 | typedef s64 s64_le; | 615 | using s64_le = s64; |
| 616 | 616 | ||
| 617 | typedef float float_le; | 617 | using float_le = float; |
| 618 | typedef double double_le; | 618 | using double_le = double; |
| 619 | 619 | ||
| 620 | typedef swap_struct_t<u64, swap_64_t<u64>> u64_be; | 620 | using u64_be = swap_struct_t<u64, swap_64_t<u64>>; |
| 621 | typedef swap_struct_t<s64, swap_64_t<s64>> s64_be; | 621 | using s64_be = swap_struct_t<s64, swap_64_t<s64>>; |
| 622 | 622 | ||
| 623 | typedef swap_struct_t<u32, swap_32_t<u32>> u32_be; | 623 | using u32_be = swap_struct_t<u32, swap_32_t<u32>>; |
| 624 | typedef swap_struct_t<s32, swap_32_t<s32>> s32_be; | 624 | using s32_be = swap_struct_t<s32, swap_32_t<s32>>; |
| 625 | 625 | ||
| 626 | typedef swap_struct_t<u16, swap_16_t<u16>> u16_be; | 626 | using u16_be = swap_struct_t<u16, swap_16_t<u16>>; |
| 627 | typedef swap_struct_t<s16, swap_16_t<s16>> s16_be; | 627 | using s16_be = swap_struct_t<s16, swap_16_t<s16>>; |
| 628 | 628 | ||
| 629 | typedef swap_struct_t<float, swap_float_t<float>> float_be; | 629 | using float_be = swap_struct_t<float, swap_float_t<float>>; |
| 630 | typedef swap_struct_t<double, swap_double_t<double>> double_be; | 630 | using double_be = swap_struct_t<double, swap_double_t<double>>; |
| 631 | #else | 631 | #else |
| 632 | 632 | ||
| 633 | typedef swap_struct_t<u64, swap_64_t<u64>> u64_le; | 633 | using u64_le = swap_struct_t<u64, swap_64_t<u64>>; |
| 634 | typedef swap_struct_t<s64, swap_64_t<s64>> s64_le; | 634 | using s64_le = swap_struct_t<s64, swap_64_t<s64>>; |
| 635 | 635 | ||
| 636 | typedef swap_struct_t<u32, swap_32_t<u32>> u32_le; | 636 | using u32_le = swap_struct_t<u32, swap_32_t<u32>>; |
| 637 | typedef swap_struct_t<s32, swap_32_t<s32>> s32_le; | 637 | using s32_le = swap_struct_t<s32, swap_32_t<s32>>; |
| 638 | 638 | ||
| 639 | typedef swap_struct_t<u16, swap_16_t<u16>> u16_le; | 639 | using u16_le = swap_struct_t<u16, swap_16_t<u16>>; |
| 640 | typedef swap_struct_t<s16, swap_16_t<s16>> s16_le; | 640 | using s16_le = swap_struct_t<s16, swap_16_t<s16>>; |
| 641 | 641 | ||
| 642 | typedef swap_struct_t<float, swap_float_t<float>> float_le; | 642 | using float_le = swap_struct_t<float, swap_float_t<float>>; |
| 643 | typedef swap_struct_t<double, swap_double_t<double>> double_le; | 643 | using double_le = swap_struct_t<double, swap_double_t<double>>; |
| 644 | 644 | ||
| 645 | typedef u32 u32_be; | 645 | using u16_be = u16; |
| 646 | typedef u16 u16_be; | 646 | using u32_be = u32; |
| 647 | typedef u64 u64_be; | 647 | using u64_be = u64; |
| 648 | 648 | ||
| 649 | typedef s32 s32_be; | 649 | using s16_be = s16; |
| 650 | typedef s16 s16_be; | 650 | using s32_be = s32; |
| 651 | typedef s64 s64_be; | 651 | using s64_be = s64; |
| 652 | 652 | ||
| 653 | typedef float float_be; | 653 | using float_be = float; |
| 654 | typedef double double_be; | 654 | using double_be = double; |
| 655 | 655 | ||
| 656 | #endif | 656 | #endif |