From 1a189ebdd737f6890267a7e870590db48641bebb Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sun, 15 Feb 2026 17:11:17 +0000 Subject: [PATCH] fix --- src/util/util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/util.h b/src/util/util.h index aec42116b..7b69ec921 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -103,6 +103,7 @@ static inline unsigned next_power_of_two(unsigned v) { /** \brief Return the position of the most significant bit. */ +static inline unsigned log2(int v) { return std::bit_width((unsigned)v) - 1; } static inline unsigned log2(unsigned v) { return std::bit_width(v) - 1; } static inline unsigned log2(uint64_t v) { return std::bit_width(v) - 1; }