mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-29 18:27:40 +02:00
Minor cleanup
This commit is contained in:
@ -1722,14 +1722,12 @@ class format_string_checker {
|
||||
// If id is out of range, it means we do not know the type and cannot parse
|
||||
// the format at compile time. Instead, skip over content until we finish
|
||||
// the format spec, accounting for any nested replacements.
|
||||
auto bracket_count = 0;
|
||||
while (begin != end && (bracket_count > 0 || *begin != '}')) {
|
||||
for (int bracket_count = 0;
|
||||
begin != end && (bracket_count > 0 || *begin != '}'); ++begin) {
|
||||
if (*begin == '{')
|
||||
++bracket_count;
|
||||
else if (*begin == '}')
|
||||
--bracket_count;
|
||||
|
||||
++begin;
|
||||
}
|
||||
return begin;
|
||||
}
|
||||
|
Reference in New Issue
Block a user