From b6c92139d72375b73951adf33f0a3a0ef54f44f6 Mon Sep 17 00:00:00 2001 From: IRainman Date: Mon, 6 Jul 2026 22:12:02 +0300 Subject: [PATCH] # cleanup --- include/fast_float/parse_number.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index b70a610..d99a6a7 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -25,8 +25,8 @@ from_chars_result_t FASTFLOAT_CONSTEXPR14 parse_infnan(UC const *first, UC const *last, T &value, const chars_format fmt) noexcept { - from_chars_result_t answer{}; - answer.ec = std::errc(); // be optimistic + from_chars_result_t answer; + answer.ptr = first; FASTFLOAT_ASSUME(first < last); // so dereference without checks @@ -55,6 +55,7 @@ from_chars_result_t break; // forbidden char, not nan(n-char-seq-opt) } } + answer.ec = std::errc(); return answer; } if (fastfloat_strncasecmp3(first, str_const_inf())) { @@ -66,6 +67,7 @@ from_chars_result_t } value = minusSign ? -std::numeric_limits::infinity() : std::numeric_limits::infinity(); + answer.ec = std::errc(); return answer; } }