Don't parse % unless FMT_DEPRECATED_PERCENT is set

This commit is contained in:
Victor Zverovich 2019-11-19 11:54:18 -08:00
parent 57b6f2966d
commit e9bff78814

View File

@ -1288,12 +1288,12 @@ FMT_CONSTEXPR float_spec parse_float_type_spec(char spec,
case 'f': case 'f':
result.format = float_format::fixed; result.format = float_format::fixed;
break; break;
case '%':
#if FMT_DEPRECATED_PERCENT #if FMT_DEPRECATED_PERCENT
case '%':
result.format = float_format::fixed; result.format = float_format::fixed;
result.percent = true; result.percent = true;
#endif
break; break;
#endif
case 'A': case 'A':
result.upper = true; result.upper = true;
FMT_FALLTHROUGH; FMT_FALLTHROUGH;