mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-31 00:32:52 +00:00
btstack_util: fix btstack_clz for 'other' compilers
This commit is contained in:
parent
294f7bb5b2
commit
af0ac87149
@ -466,6 +466,7 @@ uint8_t btstack_clz(uint32_t value) {
|
||||
}
|
||||
#else
|
||||
// divide-and-conquer implementation for 32-bit integers
|
||||
uint32_t x = value;
|
||||
if (x == 0) return 32;
|
||||
uint8_t r = 0;
|
||||
if ((x & 0xffff0000u) == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user