@@ -336,11 +336,13 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value,
336336 ++first;
337337 }
338338 }
339- #endif
339+ #else
340340#ifdef FASTFLOAT_ISNOT_CHECKED_BOUNDS
341341 // We are in parser code with external loop that checks bounds.
342342 FASTFLOAT_ASSUME (first < last);
343- #else
343+ #endif
344+ #endif
345+ #ifndef FASTFLOAT_ISNOT_CHECKED_BOUNDS
344346 if (first == last) {
345347 answer.ec = std::errc::invalid_argument;
346348 answer.ptr = first;
@@ -414,13 +416,12 @@ FASTFLOAT_CONSTEXPR20
414416 typename std::enable_if<is_supported_float_type<T>::value, T>::type
415417 integer_times_pow10 (am_sign_mant_t const mantissa,
416418 am_pow_t const decimal_exponent) noexcept {
417- #ifdef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
418- FASTFLOAT_ASSUME (mantissa >= 0 );
419- const am_mant_t m = static_cast <am_mant_t >(mantissa);
420- #else
419+ #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
421420 const bool is_negative = mantissa < 0 ;
422- const am_mant_t m =
423- static_cast <am_mant_t >(is_negative ? -mantissa : mantissa);
421+ const auto m = static_cast <am_mant_t >(is_negative ? -mantissa : mantissa);
422+ #else
423+ FASTFLOAT_ASSUME (mantissa >= 0 );
424+ const auto m = static_cast <am_mant_t >(mantissa);
424425#endif
425426 T value;
426427 if (clinger_fast_path_impl (m, decimal_exponent,
@@ -460,7 +461,8 @@ FASTFLOAT_CONSTEXPR20
460461 std::is_integral<Int>::value &&
461462 !std::is_signed<Int>::value,
462463 T>::type
463- integer_times_pow10 (Int mantissa, am_pow_t decimal_exponent) noexcept {
464+ integer_times_pow10 (Int const mantissa,
465+ am_pow_t const decimal_exponent) noexcept {
464466 return integer_times_pow10<T>(static_cast <am_mant_t >(mantissa),
465467 decimal_exponent);
466468}
@@ -471,23 +473,26 @@ FASTFLOAT_CONSTEXPR20
471473 std::is_integral<Int>::value &&
472474 std::is_signed<Int>::value,
473475 T>::type
474- integer_times_pow10 (Int mantissa, am_pow_t decimal_exponent) noexcept {
476+ integer_times_pow10 (Int const mantissa,
477+ am_pow_t const decimal_exponent) noexcept {
475478 return integer_times_pow10<T>(static_cast <am_sign_mant_t >(mantissa),
476479 decimal_exponent);
477480}
478481
479482template <typename Int>
480483FASTFLOAT_CONSTEXPR20 typename std::enable_if<
481484 std::is_integral<Int>::value && !std::is_signed<Int>::value, double >::type
482- integer_times_pow10 (Int mantissa, am_pow_t decimal_exponent) noexcept {
485+ integer_times_pow10 (Int const mantissa,
486+ am_pow_t const decimal_exponent) noexcept {
483487 return integer_times_pow10 (static_cast <am_mant_t >(mantissa),
484488 decimal_exponent);
485489}
486490
487491template <typename Int>
488492FASTFLOAT_CONSTEXPR20 typename std::enable_if<
489493 std::is_integral<Int>::value && std::is_signed<Int>::value, double >::type
490- integer_times_pow10 (Int mantissa, am_pow_t decimal_exponent) noexcept {
494+ integer_times_pow10 (Int const mantissa,
495+ am_pow_t const decimal_exponent) noexcept {
491496 return integer_times_pow10 (static_cast <am_sign_mant_t >(mantissa),
492497 decimal_exponent);
493498}
@@ -508,10 +513,11 @@ from_chars_int_advanced(UC const *first, UC const *last, T &value,
508513 ++first;
509514 }
510515 }
511- #endif
516+ #else
512517#ifdef FASTFLOAT_ISNOT_CHECKED_BOUNDS
513518 // We are in parser code with external loop that checks bounds.
514519 FASTFLOAT_ASSUME (first < last);
520+ #endif
515521#endif
516522 if (
517523#ifndef FASTFLOAT_ISNOT_CHECKED_BOUNDS
0 commit comments