From 014f73426036502337c8fc10c8fb4ed9480685d7 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Fri, 4 Jul 2025 02:26:01 +0200 Subject: [PATCH] Remove unused code. --- src/utils/lib.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/utils/lib.h b/src/utils/lib.h index 4925c5e82..aff8ad8a9 100644 --- a/src/utils/lib.h +++ b/src/utils/lib.h @@ -440,22 +440,6 @@ static inline bool is_power_of_two(uint64_t x) return x != 0 && (x & (x - 1)) == 0; } -static int clz(uint64_t num) -{ -#if IS_CLANG || IS_GCC - return (int)__builtin_ctzll(num); -#else - unsigned long index; - _BitScanReverse64(&index, (__int64)num); - return (int)index; -#endif -} - -static inline unsigned char power_of_2(uint64_t pot_value) -{ - return 64 - clz(pot_value); -} - static inline uint32_t next_highest_power_of_2(uint32_t v) { v--;