From 5f52ba842c8b0f94b7cae48761d665c1e2f1de00 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 18 Jul 2023 11:20:41 -0400 Subject: [PATCH] Fix formatting of SolutionArray columns that are all integers Make it explicit that these should be printed as integers. Behavior of {fmt} is different between 6.1.2, which always includes a decimal digit when the input type is double if no other formatting specifier is provided, and later versions which format integral doubles as doubles. Fixes #1526 --- src/base/SolutionArray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/SolutionArray.cpp b/src/base/SolutionArray.cpp index f7559d706d..162a88173d 100644 --- a/src/base/SolutionArray.cpp +++ b/src/base/SolutionArray.cpp @@ -273,7 +273,7 @@ vector doubleColumn(string name, const vector& comp, notation = fmt::format(" {{:>{}.{}f}}", over + maxLen, tail); } else { // all entries are integers - notation = fmt::format(" {{:>{}}}", over + maxLen); + notation = fmt::format(" {{:>{}.0f}}", over + maxLen); } maxLen = fmt::format(notation, 0.).size();