From 7b273fbb541c7c9058800bc613f4291274b2d26e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 16 Mar 2025 08:58:44 -0700 Subject: [PATCH] Minor cleanup --- include/fmt/base.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 3b030f84..2ff2bb1e 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -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; }