From 9f095c7d197cb9bc0164546d7b578e263089ded0 Mon Sep 17 00:00:00 2001 From: dominic Date: Wed, 31 Jan 2024 16:43:16 +0100 Subject: [PATCH] removed redundant else --- include/fmt/std.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index 1157e259..ff96a952 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -255,10 +255,8 @@ template auto write_escaped_alternative(OutputIt out, const T& v) -> OutputIt { if constexpr (has_to_string_view::value) return write_escaped_string(out, detail::to_string_view(v)); - else if constexpr (std::is_same_v) - return write_escaped_char(out, v); - else - return write(out, v); + if constexpr (std::is_same_v) return write_escaped_char(out, v); + return write(out, v); } } // namespace detail