From 5b8641dddfccf50ae9818512525674e9bd81edb9 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 13 Jun 2020 16:50:55 -0700 Subject: [PATCH] Undo branching reduction --- include/fmt/format.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index d2b759c6..6998555b 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2983,8 +2983,7 @@ class format_int { bool negative = value < 0; if (negative) abs_value = 0 - abs_value; str_ = format_decimal(abs_value); - str_[-1] = '-'; - str_ -= negative ? 1 : 0; + if (negative) *--str_ = '-'; } public: