From dbe83da2d1e64d77ba218b7ade3d843d348d6a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= <m.kroening@hotmail.de> Date: Wed, 9 Jan 2019 12:16:19 +0100 Subject: [PATCH] Replace `std::endl` with `'\n'` See [LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html#avoid-std-endl) --- pi2-demo/src/main.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pi2-demo/src/main.cpp b/pi2-demo/src/main.cpp index 9f5d7da..a7c3ff7 100644 --- a/pi2-demo/src/main.cpp +++ b/pi2-demo/src/main.cpp @@ -49,12 +49,12 @@ int main(int argc, char *argv[]) { po::notify(variablesMap); if (variablesMap.count("help") > 0) { - std::cout << "Usage: " + std::string(args.at(0)) + - " [OPTION]... [FILE]\n" - "Parses and simulates FILE according to the PI-2 of the " - "RWTH.\n\n" - << visibleOptions << std::endl; - return 1; + std::cout + << "Usage: " << args.at(0) + << " [OPTION]... [FILE]\n" + "Parses and simulates FILE according to the PI-2 of the RWTH.\n\n" + << visibleOptions; + return 0; } if (variablesMap.count("input-file") > 0) { @@ -77,16 +77,16 @@ int main(int argc, char *argv[]) { std::chrono::seconds(seconds); map.simulate(duration, timescale, refreshRate); - std::cout << "Simulation done!" << std::endl; + std::cout << "Simulation done!\n"; } else { - std::cout << "Failed to open " << nativePathname << std::endl; + std::cout << "Failed to open " << nativePathname << '\n'; return 1; } } else { std::cout << "Input file was not set.\n"; } } catch (std::exception &e) { - std::cout << e.what() << std::endl; + std::cout << e.what() << '\n'; return 1; } } -- GitLab