summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-19 09:32:13 -0400
committerGravatar Lioncash2018-07-19 09:32:13 -0400
commit1edf4dd7ef6085e52f9be669601c88cb8f48f166 (patch)
treee92bdd4f172a4bff4038b94ddda2dd657b6da875
parentMerge pull request #700 from bunnei/update-dynarmic (diff)
downloadyuzu-1edf4dd7ef6085e52f9be669601c88cb8f48f166.tar.gz
yuzu-1edf4dd7ef6085e52f9be669601c88cb8f48f166.tar.xz
yuzu-1edf4dd7ef6085e52f9be669601c88cb8f48f166.zip
common/swap: Use using aliases where applicable
-rw-r--r--src/common/swap.h66
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
168template <typename T, typename F> 168template <typename T, typename F>
169struct swap_struct_t { 169struct swap_struct_t {
170 typedef swap_struct_t<T, F> swapped_t; 170 using swapped_t = swap_struct_t;
171 171
172protected: 172protected:
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
609typedef u32 u32_le; 609using u16_le = u16;
610typedef u16 u16_le; 610using u32_le = u32;
611typedef u64 u64_le; 611using u64_le = u64;
612 612
613typedef s32 s32_le; 613using s16_le = s16;
614typedef s16 s16_le; 614using s32_le = s32;
615typedef s64 s64_le; 615using s64_le = s64;
616 616
617typedef float float_le; 617using float_le = float;
618typedef double double_le; 618using double_le = double;
619 619
620typedef swap_struct_t<u64, swap_64_t<u64>> u64_be; 620using u64_be = swap_struct_t<u64, swap_64_t<u64>>;
621typedef swap_struct_t<s64, swap_64_t<s64>> s64_be; 621using s64_be = swap_struct_t<s64, swap_64_t<s64>>;
622 622
623typedef swap_struct_t<u32, swap_32_t<u32>> u32_be; 623using u32_be = swap_struct_t<u32, swap_32_t<u32>>;
624typedef swap_struct_t<s32, swap_32_t<s32>> s32_be; 624using s32_be = swap_struct_t<s32, swap_32_t<s32>>;
625 625
626typedef swap_struct_t<u16, swap_16_t<u16>> u16_be; 626using u16_be = swap_struct_t<u16, swap_16_t<u16>>;
627typedef swap_struct_t<s16, swap_16_t<s16>> s16_be; 627using s16_be = swap_struct_t<s16, swap_16_t<s16>>;
628 628
629typedef swap_struct_t<float, swap_float_t<float>> float_be; 629using float_be = swap_struct_t<float, swap_float_t<float>>;
630typedef swap_struct_t<double, swap_double_t<double>> double_be; 630using double_be = swap_struct_t<double, swap_double_t<double>>;
631#else 631#else
632 632
633typedef swap_struct_t<u64, swap_64_t<u64>> u64_le; 633using u64_le = swap_struct_t<u64, swap_64_t<u64>>;
634typedef swap_struct_t<s64, swap_64_t<s64>> s64_le; 634using s64_le = swap_struct_t<s64, swap_64_t<s64>>;
635 635
636typedef swap_struct_t<u32, swap_32_t<u32>> u32_le; 636using u32_le = swap_struct_t<u32, swap_32_t<u32>>;
637typedef swap_struct_t<s32, swap_32_t<s32>> s32_le; 637using s32_le = swap_struct_t<s32, swap_32_t<s32>>;
638 638
639typedef swap_struct_t<u16, swap_16_t<u16>> u16_le; 639using u16_le = swap_struct_t<u16, swap_16_t<u16>>;
640typedef swap_struct_t<s16, swap_16_t<s16>> s16_le; 640using s16_le = swap_struct_t<s16, swap_16_t<s16>>;
641 641
642typedef swap_struct_t<float, swap_float_t<float>> float_le; 642using float_le = swap_struct_t<float, swap_float_t<float>>;
643typedef swap_struct_t<double, swap_double_t<double>> double_le; 643using double_le = swap_struct_t<double, swap_double_t<double>>;
644 644
645typedef u32 u32_be; 645using u16_be = u16;
646typedef u16 u16_be; 646using u32_be = u32;
647typedef u64 u64_be; 647using u64_be = u64;
648 648
649typedef s32 s32_be; 649using s16_be = s16;
650typedef s16 s16_be; 650using s32_be = s32;
651typedef s64 s64_be; 651using s64_be = s64;
652 652
653typedef float float_be; 653using float_be = float;
654typedef double double_be; 654using double_be = double;
655 655
656#endif 656#endif