diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-10-17 10:23:32 +0300 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2019-10-23 10:33:04 +0300 |
commit | d561321e4a6a2775c7dc6782f05035bef66fed9d (patch) | |
tree | 79f041902d018f672d1a0379ba08477764561dc2 /src/node_report.cc | |
parent | 19a983c6153a0bfb5336b8de37f9541c423863b3 (diff) |
src: remove unnecessary std::endl usage
This commit removes a few std::endl that could be replaced by '\n' as it
does not look like the buffer needs to be flushed in these places.
This is only done in error handling, and once when the report has been
generated, so this is very minor but I thought I'd bring it up in case
it was overlooked.
PR-URL: https://github.com/nodejs/node/pull/30003
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/node_report.cc')
-rw-r--r-- | src/node_report.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node_report.cc b/src/node_report.cc index 25a4d671c8f..ddeb216c82d 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -110,8 +110,7 @@ std::string TriggerNodeReport(Isolate* isolate, } // Check for errors on the file open if (!outfile.is_open()) { - std::cerr << std::endl - << "Failed to open Node.js report file: " << filename; + std::cerr << "\nFailed to open Node.js report file: " << filename; if (env != nullptr && options->report_directory.length() > 0) std::cerr << " directory: " << options->report_directory; @@ -120,7 +119,7 @@ std::string TriggerNodeReport(Isolate* isolate, return ""; } outstream = &outfile; - std::cerr << std::endl << "Writing Node.js report to file: " << filename; + std::cerr << "\nWriting Node.js report to file: " << filename; } WriteNodeReport(isolate, env, message, trigger, filename, *outstream, @@ -131,7 +130,7 @@ std::string TriggerNodeReport(Isolate* isolate, outfile.close(); } - std::cerr << std::endl << "Node.js report completed" << std::endl; + std::cerr << "\nNode.js report completed" << std::endl; return filename; } |