Skip to content

Commit 4eb109f

Browse files
committed
Remove useless checks for negative precision inside a block that already
checked that precision was positive.
1 parent 9d74ea1 commit 4eb109f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/st_formatter.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,8 @@ namespace ST
441441

442442
if (format.precision >= 0) {
443443
format_buffer[end++] = '.';
444-
if (format.precision < 0)
445-
format_buffer[end++] = '-';
446444
ST::uint_formatter<unsigned int> prec;
447-
prec.format(std::abs(format.precision), 10);
445+
prec.format(format.precision, 10);
448446
std::char_traits<char>::move(format_buffer + end, prec.text(), prec.size());
449447

450448
// Ensure one more space (excluding \0) is available for the format specifier

0 commit comments

Comments
 (0)