From 845794a9224ee133a34e1af030137da1eda8165c Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Fri, 20 Aug 2021 01:34:29 +0200 Subject: [PATCH] Prevent the compilation output from being printed when printResult is false --- src/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 905a5f4..6d9c5a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,13 +69,12 @@ int main(int argc, char* argv[]) { for (auto& currentFuture: Units) { const auto&& result = currentFuture.get(); if (not result.second.has_value()) { - cout << result.first; + If (printResult) cout << result.first << "\n\n"; } else { - cout << "Compilation of " << result.first << " has failed with the following error:\n" << result.second.value().what(); + cout << "Compilation of " << result.first << " has failed with the following error:\n" << result.second.value().what() << "\n\n"; } - cout << "\n\n"; } } else cout << "No valid file provided.\n"; } return EXIT_SUCCESS; -} +} \ No newline at end of file