Ignore zero-padding for non-finite floating points (#2310)

* Ignore zero-padding for non-finite floating points

* keep width for non-finite formatting with 0-padding

* clang-format

* preserve alignment

* align code-style
This commit is contained in:
Liedtke
2021-05-27 14:13:05 -07:00
committed by GitHub
parent 7612f18dc8
commit a70a4ae053
3 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -1947,7 +1947,7 @@ template <typename Char> class specs_setter {
FMT_CONSTEXPR void on_localized() { specs_.localized = true; }
FMT_CONSTEXPR void on_zero() {
specs_.align = align::numeric;
if (specs_.align == align::none) specs_.align = align::numeric;
specs_.fill[0] = Char('0');
}