mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 15:29:31 +03:00
fix cast on msvc
This commit is contained in:
parent
fae61ed946
commit
aad0bc2ae3
1 changed files with 2 additions and 2 deletions
|
@ -855,7 +855,7 @@ static inline size_t mi_clz(size_t x) {
|
||||||
#else
|
#else
|
||||||
_BitScanReverse64(&idx, x);
|
_BitScanReverse64(&idx, x);
|
||||||
#endif
|
#endif
|
||||||
return ((MI_SIZE_BITS - 1) - idx);
|
return ((MI_SIZE_BITS - 1) - (size_t)idx);
|
||||||
}
|
}
|
||||||
static inline size_t mi_ctz(size_t x) {
|
static inline size_t mi_ctz(size_t x) {
|
||||||
if (x==0) return MI_SIZE_BITS;
|
if (x==0) return MI_SIZE_BITS;
|
||||||
|
@ -865,7 +865,7 @@ static inline size_t mi_ctz(size_t x) {
|
||||||
#else
|
#else
|
||||||
_BitScanForward64(&idx, x);
|
_BitScanForward64(&idx, x);
|
||||||
#endif
|
#endif
|
||||||
return idx;
|
return (size_t)idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue