From 880374f98e4dda693dbcbcac4eff3e33ccb8f218 Mon Sep 17 00:00:00 2001 From: DankParrot Date: Mon, 3 Aug 2020 18:26:45 -0700 Subject: [PATCH] Fix wrong return type for ReverseBytes --- src/util/ByteUtil.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/ByteUtil.h b/src/util/ByteUtil.h index 7cefd95..1a45e5c 100644 --- a/src/util/ByteUtil.h +++ b/src/util/ByteUtil.h @@ -13,15 +13,15 @@ namespace Feather // TODO: Make this constexpr inline uint8_t ReverseBytes(uint8_t n) { return n; } - #ifdef __GNUC__ +#ifdef __GNUC__ inline uint16_t ReverseBytes(uint16_t n) { return __builtin_bswap16(n); } inline uint32_t ReverseBytes(uint32_t n) { return __builtin_bswap32(n); } - inline uint32_t ReverseBytes(uint64_t n) { return __builtin_bswap64(n); } - #else + inline uint64_t ReverseBytes(uint64_t n) { return __builtin_bswap64(n); } +#else inline uint16_t ReverseBytes(uint16_t n) { return _byteswap_ushort(n); } inline uint32_t ReverseBytes(uint32_t n) { return _byteswap_ulong (n); } inline uint64_t ReverseBytes(uint64_t n) { return _byteswap_uint64(n); } - #endif +#endif inline int8_t ReverseBytes(int8_t n) { return n; } inline int16_t ReverseBytes(int16_t n) { return int16_t(ReverseBytes(uint16_t(n))); }