@@ -258,16 +258,16 @@ enum class parse_error : uint_fast8_t {
258258};
259259
260260template <typename UC> struct parsed_number_string_t {
261- am_mant_t mantissa{ 0 } ;
261+ am_mant_t mantissa;
262262
263263#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
264- bool negative{ false } ;
264+ bool negative;
265265#endif
266- bool invalid{ false }; // be optimistic
267- bool too_many_digits{ false }; // be optimistic
268- parse_error error{parse_error::no_error}; // be optimistic
266+ bool invalid;
267+ bool too_many_digits;
268+ parse_error error;
269269
270- am_pow_t exponent{ 0 } ;
270+ am_pow_t exponent;
271271
272272 // contains the range of the significant digits
273273 span<UC const > integer; // non-nullable
@@ -294,7 +294,7 @@ template <bool basic_json_fmt, typename UC>
294294fastfloat_really_inline FASTFLOAT_CONSTEXPR20 parsed_number_string_t <UC>
295295parse_number_string (UC const *p, UC const *pend,
296296 parse_options_t <UC> const options) noexcept {
297- parsed_number_string_t <UC> answer;
297+ parsed_number_string_t <UC> answer{} ;
298298 // so dereference without checks
299299 FASTFLOAT_ASSUME (p < pend);
300300#ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
@@ -514,8 +514,8 @@ parse_number_string(UC const *p, UC const *pend,
514514 }
515515 answer.exponent = am_pow_t (answer.fraction .ptr - p) + exp_number;
516516 }
517+ // We now corrected both exponent and mantissa, to a truncated value
517518 }
518- // We have now corrected both exponent and mantissa, to a truncated value
519519 }
520520
521521 return answer;
0 commit comments