From f496321570c6ad7e12dd309934217b6eb3c30805 Mon Sep 17 00:00:00 2001 From: IRainman Date: Sun, 9 Mar 2025 02:37:46 +0300 Subject: [PATCH] Completely remove deprecated macroses FASTFLOAT_ALLOWS_LEADING_PLUS and FASTFLOAT_SKIP_WHITE_SPACE, please use options. Compilation fix when FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN isn't defined. --- include/fast_float/float_common.h | 10 +--------- include/fast_float/parse_number.h | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 28c55f7..7f2d002 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -72,15 +72,7 @@ template struct parse_options_t { : format(fmt), decimal_point(dot), base(static_cast(b)) {} /** Which number formats are accepted */ - const chars_format format - // adjust for deprecated feature macros -#ifdef FASTFLOAT_ALLOWS_LEADING_PLUS - | chars_format::allow_leading_plus -#endif -#ifdef FASTFLOAT_SKIP_WHITE_SPACE - | chars_format::skip_white_space -#endif - ; + const chars_format format; /** The character used as decimal point */ const UC decimal_point; /** The base used for integers */ diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index 017cc9c..0798603 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -378,7 +378,7 @@ from_chars_int_advanced(UC const *first, UC const *last, T &value, #endif if ( #ifndef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN - first == last + first == last || #endif options.base < 2 || options.base > 36) { from_chars_result_t answer;