mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-01-01 03:12:18 +08:00
type usage fix.
This commit is contained in:
parent
611cd927f1
commit
f4cae22b6e
@ -564,7 +564,7 @@ parse_int_string(UC const *p, UC const *pend, T &value,
|
||||
auto const *const start_digits = p;
|
||||
|
||||
FASTFLOAT_IF_CONSTEXPR17((std::is_same<T, std::uint8_t>::value)) {
|
||||
const auto len = static_cast<am_bits_t>(pend - p);
|
||||
const auto len = static_cast<am_digits>(pend - p);
|
||||
if (len == 0) {
|
||||
if (has_leading_zeros) {
|
||||
value = 0;
|
||||
@ -608,7 +608,7 @@ parse_int_string(UC const *p, UC const *pend, T &value,
|
||||
const uint32_t magic =
|
||||
((digits + 0x46464646u) | (digits - 0x30303030u)) & 0x80808080u;
|
||||
const auto tz = countr_zero_32(magic); // 7, 15, 23, 31, or 32
|
||||
am_bits_t nd = (tz == 32) ? 4 : (tz >> 3);
|
||||
am_digits nd = (tz >> 3);
|
||||
nd = std::min(nd, len);
|
||||
if (nd == 0) {
|
||||
if (has_leading_zeros) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user