From be1954e04cb5a0c3a526f78ed5490a5e65310280 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 15 Oct 2020 14:49:45 -0400 Subject: 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 --- src/common/swap.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common/swap.h') 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 v) { template struct swap_64_t { static T swap(T x) { - return static_cast(Common::swap64(x)); + return static_cast(Common::swap64(static_cast(x))); } }; template struct swap_32_t { static T swap(T x) { - return static_cast(Common::swap32(x)); + return static_cast(Common::swap32(static_cast(x))); } }; template struct swap_16_t { static T swap(T x) { - return static_cast(Common::swap16(x)); + return static_cast(Common::swap16(static_cast(x))); } }; template struct swap_float_t { static T swap(T x) { - return static_cast(Common::swapf(x)); + return static_cast(Common::swapf(static_cast(x))); } }; template struct swap_double_t { static T swap(T x) { - return static_cast(Common::swapd(x)); + return static_cast(Common::swapd(static_cast(x))); } }; -- cgit v1.2.3