From 2418a84f02da298ed3f58055bca2b58b67662ec0 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 20 Feb 2015 08:51:01 -0800 Subject: [PATCH] Cleanup --- format.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/format.h b/format.h index ce0d6594..14bfdaca 100644 --- a/format.h +++ b/format.h @@ -50,6 +50,12 @@ namespace fmt { namespace internal { # pragma intrinsic(_BitScanReverse) +inline uint32_t builtin_clz(uint32_t x) { + unsigned long r = 0; + _BitScanReverse(&r, x); + return 31 - r; +} +# define FMT_BUILTIN_CLZ(n) fmt::internal::builtin_clz(n) # ifdef _WIN64 # pragma intrinsic(_BitScanReverse64) inline uint32_t builtin_clzll(uint64_t n) { @@ -59,12 +65,6 @@ inline uint32_t builtin_clzll(uint64_t n) { } # define FMT_BUILTIN_CLZLL(n) fmt::internal::builtin_clzll(n) # endif -inline uint32_t builtin_clz(uint32_t x) { - unsigned long r = 0; - _BitScanReverse(&r, x); - return 31 - r; -} -# define FMT_BUILTIN_CLZ(n) fmt::internal::builtin_clz(n) } } #endif