mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:54:13 +08:00
mdbx: fix key_from_jsonInteger() for MSVC.
Change-Id: I3fc6a6da57707750cb2e8429bbaf10ff1de2dde2
This commit is contained in:
parent
2c08ec21fd
commit
7ea1a4e0e8
@ -17808,14 +17808,14 @@ static __inline int clz64(uint64_t value) {
|
|||||||
unsigned long index;
|
unsigned long index;
|
||||||
#if defined(_M_AMD64) || defined(_M_ARM64) || defined(_M_X64)
|
#if defined(_M_AMD64) || defined(_M_ARM64) || defined(_M_X64)
|
||||||
_BitScanReverse64(&index, value);
|
_BitScanReverse64(&index, value);
|
||||||
return index;
|
return 63 - index;
|
||||||
#else
|
#else
|
||||||
if (value > UINT32_MAX) {
|
if (value > UINT32_MAX) {
|
||||||
_BitScanReverse(&index, (uint32_t)(value >> 32));
|
_BitScanReverse(&index, (uint32_t)(value >> 32));
|
||||||
return index;
|
return 31 - index;
|
||||||
}
|
}
|
||||||
_BitScanReverse(&index, (uint32_t)value);
|
_BitScanReverse(&index, (uint32_t)value);
|
||||||
return index + 32;
|
return 63 - index;
|
||||||
#endif
|
#endif
|
||||||
#endif /* MSVC */
|
#endif /* MSVC */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user