Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Generic / ConsoleInterface / Toolbox.cpp
diff options
context:
space:
mode:
Commit8fe5955772e0c10f22a8f6e40616ce79b2e88491 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 09:04:09 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 09:04:09 +0300
Files7222a140de6faaf3660677b3f42f8f3374336022 /src/Generic/ConsoleInterface/Toolbox.cpp
FMI-OOP-P2_Tables-8fe5955772e0c10f22a8f6e40616ce79b2e88491.tar
FMI-OOP-P2_Tables-8fe5955772e0c10f22a8f6e40616ce79b2e88491.tar.gz
FMI-OOP-P2_Tables-8fe5955772e0c10f22a8f6e40616ce79b2e88491.zip
Parent189c8857e59b03124602a22782f16ef7dbc03337 (diff)
Autocommit at 29.05.2022 @ 09:04
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;
}