diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 7ff36ec..9100000 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -250,19 +250,18 @@ enum class parse_error : uint_fast8_t { }; template struct parsed_number_string_t { - // an unsigned int avoids signed overflows (which are bad) am_mant_t mantissa{0}; am_pow_t exponent{0}; + // contains the range of the significant digits + span integer{}; // non-nullable + span fraction{}; // nullable UC const *lastmatch{nullptr}; #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN bool negative{false}; #endif - bool invalid{false}; - bool too_many_digits{false}; - // contains the range of the significant digits - span integer{}; // non-nullable - span fraction{}; // nullable - parse_error error{parse_error::no_error}; + bool invalid{false}; // be optimistic + bool too_many_digits{false}; // be optimistic + parse_error error{parse_error::no_error}; // be optimistic }; using byte_span = span; diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index b3393e0..8d64a1e 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -502,7 +502,7 @@ full_multiplication(uint64_t a, uint64_t b) noexcept { } // Value of the mantissa. -typedef uint_fast64_t am_mant_t; +typedef uint_fast64_t am_mant_t; // an unsigned int avoids signed overflows (which are bad) // Size of bits in the mantissa and path and rounding shifts typedef int_fast8_t am_bits_t;