Skip to content

Commit

Permalink
src: remove unnecessary std::endl usage
Browse files Browse the repository at this point in the history
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: #30003
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
danbev authored and MylesBorins committed Oct 23, 2019
1 parent 19a983c commit d561321
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -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;
}

Expand Down

0 comments on commit d561321

Please sign in to comment.