diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 62b6fbc..0b38139 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -374,7 +374,7 @@ parse_number_string(UC const *p, UC const *pend, answer.exponent = static_cast(before - p); answer.fraction = span(before, static_cast(p - before)); - digit_count -= answer.exponent; + digit_count -= static_cast(answer.exponent); #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN FASTFLOAT_IF_CONSTEXPR17(basic_json_fmt) { // at least 1 digit in fractional part diff --git a/include/fast_float/decimal_to_binary.h b/include/fast_float/decimal_to_binary.h index cb810f2..badf0fa 100644 --- a/include/fast_float/decimal_to_binary.h +++ b/include/fast_float/decimal_to_binary.h @@ -140,7 +140,7 @@ compute_float(int64_t q, uint64_t w) noexcept { // practice, we can win big with the compute_product_approximation if its // additional branch is easily predicted. Which is best is data specific. limb_t upperbit = limb_t(product.high >> 63); - limb_t shift = upperbit + 64 - binary::mantissa_explicit_bits() - 3; + limb_t shift = limb_t(upperbit + 64 - binary::mantissa_explicit_bits() - 3); answer.mantissa = product.high >> shift;