diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 780f6d7..8ada34d 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -68,20 +68,20 @@ using from_chars_result = from_chars_result_t; template struct parse_options_t { FASTFLOAT_CONSTEXPR20 explicit parse_options_t( - chars_format fmt = chars_format::general, UC dot = UC('.'), + chars_format const fmt = chars_format::general, UC const dot = UC('.'), int const b = 10) noexcept : format(fmt), decimal_point(dot), base(uint8_t(b)) { #ifdef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN - assert(b >= 2 && b <= 36); + //static_assert(b >= 2 && b <= 36); #endif } /** Which number formats are accepted */ - chars_format format; + chars_format const format; /** The character used as decimal point */ - UC decimal_point; + UC const decimal_point; /** The base used for integers */ - uint8_t base; /* only allowed from 2 to 36 */ + uint8_t const base; /* only allowed from 2 to 36 */ FASTFLOAT_ASSUME(base >= 2 && base <= 36); }; diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index ca94b05..7cece6b 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -312,7 +312,7 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value, #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN if (uint8_t(options.format & chars_format::skip_white_space)) { while ((first != last) && fast_float::is_space(*first)) { - first++; + ++first; } } if (first == last) { @@ -375,7 +375,7 @@ from_chars_int_advanced(UC const *first, UC const *last, T &value, #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN if (uint8_t(options.format & chars_format::skip_white_space)) { while ((first != last) && fast_float::is_space(*first)) { - first++; + ++first; } } if (first == last || options.base < 2 || options.base > 36) {