mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 20:18:49 +00:00
Optimize processing of trailing '}'
This commit is contained in:
parent
fbc38b9083
commit
be0e268468
@ -2148,7 +2148,8 @@ FMT_CONSTEXPR void parse_format_string(
|
|||||||
// 2.5x faster than the naive one-pass implementation on long format strings.
|
// 2.5x faster than the naive one-pass implementation on long format strings.
|
||||||
auto p = find<IS_CONSTEXPR>(begin, end, '{');
|
auto p = find<IS_CONSTEXPR>(begin, end, '{');
|
||||||
if (p == end) {
|
if (p == end) {
|
||||||
write(begin, end);
|
if (begin != end)
|
||||||
|
write(begin, end);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
write(begin, p);
|
write(begin, p);
|
||||||
|
Loading…
Reference in New Issue
Block a user