3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-09 18:40:51 +00:00

Add static linkage to inline functions in header files (#8519)

This commit is contained in:
Copilot 2026-02-06 22:57:51 +00:00 committed by GitHub
parent bee2b45743
commit 3095ab511f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 16 deletions

View file

@ -80,14 +80,14 @@ static_assert(sizeof(int64_t) == 8, "64 bits");
# define Z3_fallthrough
#endif
inline bool is_power_of_two(unsigned v) { return !(v & (v - 1)) && v; }
static inline bool is_power_of_two(unsigned v) { return !(v & (v - 1)) && v; }
/**
\brief Return the next power of two that is greater than or equal to v.
\warning This function returns 0 for v == 0.
*/
inline unsigned next_power_of_two(unsigned v) {
static inline unsigned next_power_of_two(unsigned v) {
v--;
v |= v >> 1;
v |= v >> 2;