mirror of
https://github.com/Z3Prover/z3
synced 2026-07-15 11:35:42 +00:00
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
c1c01b418f
commit
20bba3e452
1 changed files with 3 additions and 3 deletions
|
|
@ -103,9 +103,9 @@ 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; }
|
||||
static inline unsigned log2(int v) { return v > 0 ? (std::bit_width(static_cast<unsigned>(v)) - 1) : 0; }
|
||||
static inline unsigned log2(unsigned v) { return v ? (std::bit_width(v) - 1) : 0; }
|
||||
static inline unsigned log2(uint64_t v) { return v ? (std::bit_width(v) - 1) : 0; }
|
||||
|
||||
static_assert(sizeof(unsigned) == 4, "unsigned are 32 bits");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue