summaryrefslogtreecommitdiff
path: root/src/common/swap.h
diff options
context:
space:
mode:
authorGravatar Lioncash2020-10-15 14:49:45 -0400
committerGravatar Lioncash2020-10-17 19:50:39 -0400
commitbe1954e04cb5a0c3a526f78ed5490a5e65310280 (patch)
tree267db7ae4be88dbbc288fa605e35d4a2a13839f6 /src/common/swap.h
parentMerge pull request #4787 from lioncash/conversion (diff)
downloadyuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.gz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.xz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.zip
core: Fix clang build
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
Diffstat (limited to 'src/common/swap.h')
-rw-r--r--src/common/swap.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/swap.h b/src/common/swap.h
index 7665942a2..8c68c1f26 100644
--- a/src/common/swap.h
+++ b/src/common/swap.h
@@ -504,35 +504,35 @@ bool operator==(const S& p, const swap_struct_t<T, F> v) {
504template <typename T> 504template <typename T>
505struct swap_64_t { 505struct swap_64_t {
506 static T swap(T x) { 506 static T swap(T x) {
507 return static_cast<T>(Common::swap64(x)); 507 return static_cast<T>(Common::swap64(static_cast<u64>(x)));
508 } 508 }
509}; 509};
510 510
511template <typename T> 511template <typename T>
512struct swap_32_t { 512struct swap_32_t {
513 static T swap(T x) { 513 static T swap(T x) {
514 return static_cast<T>(Common::swap32(x)); 514 return static_cast<T>(Common::swap32(static_cast<u32>(x)));
515 } 515 }
516}; 516};
517 517
518template <typename T> 518template <typename T>
519struct swap_16_t { 519struct swap_16_t {
520 static T swap(T x) { 520 static T swap(T x) {
521 return static_cast<T>(Common::swap16(x)); 521 return static_cast<T>(Common::swap16(static_cast<u16>(x)));
522 } 522 }
523}; 523};
524 524
525template <typename T> 525template <typename T>
526struct swap_float_t { 526struct swap_float_t {
527 static T swap(T x) { 527 static T swap(T x) {
528 return static_cast<T>(Common::swapf(x)); 528 return static_cast<T>(Common::swapf(static_cast<float>(x)));
529 } 529 }
530}; 530};
531 531
532template <typename T> 532template <typename T>
533struct swap_double_t { 533struct swap_double_t {
534 static T swap(T x) { 534 static T swap(T x) {
535 return static_cast<T>(Common::swapd(x)); 535 return static_cast<T>(Common::swapd(static_cast<double>(x)));
536 } 536 }
537}; 537};
538 538