clang-format (clang-format-17 comment reflow + signature wrap; no semantic change)

This commit is contained in:
fcostaoliveira 2026-06-03 09:35:26 +01:00
parent cb5d9cd9a4
commit 3067491f41
2 changed files with 10 additions and 11 deletions

View File

@ -334,13 +334,12 @@ report_parse_error(UC const *p, parse_error error) {
// store_spans is a *runtime* flag (not a template parameter, deliberately: a
// template would create a second instantiation of this whole function and the
// extra icache pressure wipes out the gain). When false, the integer/fraction
// spans (read only by the rare digit_comp slow path) are not materialized, which
// keeps the fat parsed_number_string_t off the hot path. The caller re-parses
// with store_spans=true if the slow path is actually reached.
// spans (read only by the rare digit_comp slow path) are not materialized,
// which keeps the fat parsed_number_string_t off the hot path. The caller
// re-parses with store_spans=true if the slow path is actually reached.
template <bool basic_json_fmt, typename UC>
fastfloat_really_inline FASTFLOAT_CONSTEXPR20 parsed_number_string_t<UC>
parse_number_string(UC const *p, UC const *pend,
parse_options_t<UC> options,
parse_number_string(UC const *p, UC const *pend, parse_options_t<UC> options,
bool store_spans = true) noexcept {
chars_format const fmt = detail::adjust_for_feature_macros(options.format);
UC const decimal_point = options.decimal_point;

View File

@ -294,8 +294,8 @@ from_chars_advanced(parsed_number_string_t<UC> &pns, T &value) noexcept {
// noinline+cold so the force-inlined spans scanner is emitted ONCE off the hot
// path rather than duplicated into from_chars_float_advanced (which bloated the
// hot frame). from_chars_advanced already handles both the too_many_digits
// disambiguation and the am.power2<0 digit_comp recompute, so both slow branches
// collapse to one helper call.
// disambiguation and the am.power2<0 digit_comp recompute, so both slow
// branches collapse to one helper call.
template <typename T, typename UC>
fastfloat_noinline FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
parse_number_slow_path(UC const *first, UC const *last, T &value,
@ -331,8 +331,8 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value,
}
bool const bjf = uint64_t(fmt & detail::basic_json_fmt) != 0;
// Fast path: parse WITHOUT materializing the integer/fraction spans (read only
// by the rare slow paths). Skipping their stores keeps the fat
// Fast path: parse WITHOUT materializing the integer/fraction spans (read
// only by the rare slow paths). Skipping their stores keeps the fat
// parsed_number_string_t off the hot path. store_spans is a runtime argument,
// so this reuses the single parse_number_string instantiation.
parsed_number_string_t<UC> pns =
@ -366,8 +366,8 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value,
compute_float<binary_format<T>>(pns.exponent, pns.mantissa);
// Slow path B (rare): Eisel-Lemire could not resolve; digit_comp needs the
// integer/fraction spans. Route to the cold helper (clinger there is a
// dead-effect since it already failed here; the cold re-parse + digit_comp via
// from_chars_advanced reproduces this branch).
// dead-effect since it already failed here; the cold re-parse + digit_comp
// via from_chars_advanced reproduces this branch).
if (am.power2 < 0) {
return parse_number_slow_path<T, UC>(first, last, value, options, bjf);
}