From 6f0049a2e76fb9f76895907ba20f7911928a54ec Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Sun, 9 Mar 2025 15:14:52 -0400 Subject: [PATCH] lint --- benchmarks/benchmark.cpp | 2 +- include/fast_float/ascii_number.h | 5 ++--- include/fast_float/parse_number.h | 7 ++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/benchmark.cpp b/benchmarks/benchmark.cpp index 42be62b..5645da2 100644 --- a/benchmarks/benchmark.cpp +++ b/benchmarks/benchmark.cpp @@ -236,7 +236,7 @@ int main(int argc, char **argv) { << std::endl; #endif } - if(argc > 1) { + if (argc > 1) { fileload(argv[1]); return EXIT_SUCCESS; } diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index e5d0e63..81c986a 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -292,9 +292,8 @@ parse_number_string(UC const *p, UC const *pend, // assume p < pend, so dereference without checks; answer.negative = (*p == UC('-')); // C++17 20.19.3.(7.1) explicitly forbids '+' sign here - if ((*p == UC('-')) || - (uint64_t(fmt & chars_format::allow_leading_plus) && - !basic_json_fmt && *p == UC('+'))) { + if ((*p == UC('-')) || (uint64_t(fmt & chars_format::allow_leading_plus) && + !basic_json_fmt && *p == UC('+'))) { ++p; if (p == pend) { return report_parse_error( diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index 9814254..e74c478 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -304,9 +304,10 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value, answer.ptr = first; return answer; } - parsed_number_string_t pns = uint64_t(fmt & detail::basic_json_fmt) ? - parse_number_string(first, last, options) : - parse_number_string(first, last, options); + parsed_number_string_t pns = + uint64_t(fmt & detail::basic_json_fmt) + ? parse_number_string(first, last, options) + : parse_number_string(first, last, options); if (!pns.valid) { if (uint64_t(fmt & chars_format::no_infnan)) { answer.ec = std::errc::invalid_argument;