From 41bdac7d58450f4d31a3a768250bc3fb6ee6f1f8 Mon Sep 17 00:00:00 2001 From: Peter Conrad Date: Sat, 2 Mar 2019 17:45:23 +0100 Subject: [PATCH] Removed bitutil because architecture-independent byte order reversal rarely makes sense, and boost::endian provides a better alternative --- include/fc/bitutil.hpp | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 include/fc/bitutil.hpp diff --git a/include/fc/bitutil.hpp b/include/fc/bitutil.hpp deleted file mode 100644 index 4d6c3ab..0000000 --- a/include/fc/bitutil.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once -#include - -namespace fc { - -inline uint64_t endian_reverse_u64( uint64_t x ) -{ - return (((x >> 0x38) & 0xFF) ) - | (((x >> 0x30) & 0xFF) << 0x08) - | (((x >> 0x28) & 0xFF) << 0x10) - | (((x >> 0x20) & 0xFF) << 0x18) - | (((x >> 0x18) & 0xFF) << 0x20) - | (((x >> 0x10) & 0xFF) << 0x28) - | (((x >> 0x08) & 0xFF) << 0x30) - | (((x ) & 0xFF) << 0x38) - ; -} - -inline uint32_t endian_reverse_u32( uint32_t x ) -{ - return (((x >> 0x18) & 0xFF) ) - | (((x >> 0x10) & 0xFF) << 0x08) - | (((x >> 0x08) & 0xFF) << 0x10) - | (((x ) & 0xFF) << 0x18) - ; -} - -} // namespace fc