Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Generic / ConsoleInterface / Toolbox.cpp
diff options
context:
space:
mode:
1 files changed, 2 insertions, 4 deletions
-rw-r--r--src/Generic/ConsoleInterface/Toolbox.cpp6
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<String>& 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;
}