From 8fe5955772e0c10f22a8f6e40616ce79b2e88491 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 09:04:09 +0300 Subject: Autocommit at 29.05.2022 @ 09:04 --- src/Generic/ConsoleInterface/Toolbox.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Generic/ConsoleInterface/Toolbox.cpp') diff --git a/src/Generic/ConsoleInterface/Toolbox.cpp b/src/Generic/ConsoleInterface/Toolbox.cpp index 1723c58..64649e9 100644 --- a/src/Generic/ConsoleInterface/Toolbox.cpp +++ b/src/Generic/ConsoleInterface/Toolbox.cpp @@ -46,7 +46,6 @@ void __printTableLine(unsigned columns) { } void __printPadded(const String& str, unsigned width) { - std::cout << width << " " << str.get_length(); while (width - str.get_length() > 0) { width--; print(" "); @@ -78,12 +77,11 @@ void printTable(const List& items, unsigned columns) { for (unsigned i = 0; i < items.get_count(); i++) { __printPadded(items[i], colWidths[i % columns]); - if (i > 0 && i % columns == 0) + if (i % columns == columns - 1) printLine(""); - else if (i % columns > 0 && i % columns < columns - 1) + else if (i % columns > 0) print("|"); } - printLine(""); delete[] colWidths; } -- cgit v1.3.1-23-gd82d