Remove obsolete parse-benchmark
This commit is contained in:
parent
e004f1d699
commit
275b4b3417
@ -2046,9 +2046,10 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> {
|
||||
if (begin == end || *begin == '}') return {begin, begin};
|
||||
auto handler = spec_handler{*this, ctx, format_str};
|
||||
auto result = detail::parse_align(begin, end);
|
||||
begin = result.end;
|
||||
specs.align = result.align;
|
||||
if (result.fill.size() != 0) specs.fill = result.fill;
|
||||
auto fill_size = result.end - begin - 1;
|
||||
if (fill_size > 0) specs.fill = {begin, detail::to_unsigned(fill_size)};
|
||||
begin = result.end;
|
||||
if (begin == end) return {begin, begin};
|
||||
begin = detail::parse_width(begin, end, handler);
|
||||
if (begin == end) return {begin, begin};
|
||||
|
@ -2364,7 +2364,6 @@ FMT_CONSTEXPR auto parse_nonnegative_int(const Char*& begin, const Char* end,
|
||||
|
||||
template <typename Char> struct parse_align_result {
|
||||
const Char* end;
|
||||
basic_string_view<Char> fill;
|
||||
align_t align;
|
||||
};
|
||||
|
||||
@ -2373,7 +2372,6 @@ template <typename Char>
|
||||
FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end)
|
||||
-> parse_align_result<Char> {
|
||||
FMT_ASSERT(begin != end, "");
|
||||
auto fill = basic_string_view<Char>();
|
||||
auto align = align::none;
|
||||
auto p = begin + code_point_length(begin);
|
||||
if (end - p <= 0) p = begin;
|
||||
@ -2392,12 +2390,11 @@ FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end)
|
||||
if (align != align::none) {
|
||||
if (p != begin) {
|
||||
auto c = *begin;
|
||||
if (c == '}') return {begin, {}, align::none};
|
||||
if (c == '}') return {begin, align::none};
|
||||
if (c == '{') {
|
||||
throw_format_error("invalid fill character '{'");
|
||||
return {begin, {}, align::none};
|
||||
return {begin, align::none};
|
||||
}
|
||||
fill = {begin, to_unsigned(p - begin)};
|
||||
begin = p + 1;
|
||||
} else {
|
||||
++begin;
|
||||
@ -2408,7 +2405,7 @@ FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end)
|
||||
}
|
||||
p = begin;
|
||||
}
|
||||
return {begin, fill, align};
|
||||
return {begin, align};
|
||||
}
|
||||
|
||||
template <typename Char> FMT_CONSTEXPR bool is_name_start(Char c) {
|
||||
@ -2589,11 +2586,12 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs(const Char* begin,
|
||||
if (begin == end) return begin;
|
||||
|
||||
auto result = parse_align(begin, end);
|
||||
begin = result.end;
|
||||
if (result.align != align::none) {
|
||||
if (result.fill.size() != 0) handler.on_fill(result.fill);
|
||||
auto fill_size = result.end - begin - 1;
|
||||
if (fill_size > 0) handler.on_fill({begin, to_unsigned(fill_size)});
|
||||
handler.on_align(result.align);
|
||||
}
|
||||
begin = result.end;
|
||||
if (begin == end) return begin;
|
||||
|
||||
// Parse sign.
|
||||
|
Loading…
Reference in New Issue
Block a user