-
Notifications
You must be signed in to change notification settings - Fork 284
Replace std::endl with \n #891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One quick fix needed, but more importantly I'd like to see an extensions to cpplint to be included in this pull request to warn about any future std::endl
introduction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spurious '
introduced here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit picking: please indent <<
to the same level as the <<
in the preceding line.
I've implemented the quick fixes. I'll try to look at adapting the linter this evening. |
Hopefully the linter does the right thing now. |
scripts/cpplint.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ''
should be 'runtime/endl'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted!
A rebase is needed to make the tests pass. |
This builds cleanly now. |
Looks ready to go once rebased. |
Rebased now. |
endl
forces flushing of the current stream, which is generally not necessary. By avoidingendl
, our software becomes faster and more concise, and specifies the required behaviour more accurately. Also, our coding guideline specifies that we should prefer '\n' toendl
.