From 0698d10953b4276e8e24fd02c5f20db9f037235c Mon Sep 17 00:00:00 2001 From: rimathia Date: Sun, 8 Nov 2020 19:12:43 +0100 Subject: [PATCH] replace unnecessary continue with break, get rid of now redundant it == end check --- include/fmt/printf.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/fmt/printf.h b/include/fmt/printf.h index ace4c693..b44afaba 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -475,10 +475,8 @@ OutputIt basic_printf_context::format() { auto it = start; while (it != end) { if (!detail::find(it, end, '%', it)) { - it = end; - } - if (it == end) { - continue; + it = end; // detail::find leaves it == nullptr if it doesn't find '%' + break; } char_type c = *it++; if (it != end && *it == c) {