From 0c4171eb26b4e5cb931dddb3d0525ef1afe50a92 Mon Sep 17 00:00:00 2001 From: IRainman Date: Wed, 22 Oct 2025 02:56:40 +0300 Subject: [PATCH] # small cleanup --- include/fast_float/digit_comparison.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fast_float/digit_comparison.h b/include/fast_float/digit_comparison.h index 475bf29..f7b8878 100644 --- a/include/fast_float/digit_comparison.h +++ b/include/fast_float/digit_comparison.h @@ -177,9 +177,9 @@ round_down(adjusted_mantissa &am, am_pow_t shift) noexcept { template fastfloat_really_inline FASTFLOAT_CONSTEXPR20 void skip_zeros(UC const *&first, UC const *last) noexcept { - uint64_t val; while (!cpp20_and_in_constexpr() && std::distance(first, last) >= int_cmp_len()) { + uint64_t val; ::memcpy(&val, first, sizeof(uint64_t)); if (val != int_cmp_zeros()) { break; @@ -190,7 +190,7 @@ skip_zeros(UC const *&first, UC const *last) noexcept { if (*first != UC('0')) { break; } - first++; + ++first; } } @@ -200,9 +200,9 @@ template fastfloat_really_inline FASTFLOAT_CONSTEXPR20 bool is_truncated(UC const *first, UC const *last) noexcept { // do 8-bit optimizations, can just compare to 8 literal 0s. - uint64_t val; while (!cpp20_and_in_constexpr() && std::distance(first, last) >= int_cmp_len()) { + uint64_t val; ::memcpy(&val, first, sizeof(uint64_t)); if (val != int_cmp_zeros()) { return true;