Skip to content
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

[string.conversions] Replaced comparisons of a pointer against 0 with comparision against nullptr #3941

Conversation

gamecentric
Copy link
Contributor

While technically correct, comparing pointers against nullptr is usually preferred to comparing them against the null pointer costant 0. Moreover, it seems more consistent to compare against nullptr, since the default value of the pointer idx is actually declared as nullptr in the synopsis.

…nullptr, for consistency with other parts of the library
@jwakely
Copy link
Member

jwakely commented Apr 15, 2020

Please add the [stable.name] for the affected subclause(s) to the commit summary.

@gamecentric gamecentric changed the title Replaced comparisons of a pointer against 0 with comparision against nullptr [string.conversions] Replaced comparisons of a pointer against 0 with comparision against nullptr Apr 15, 2020
@gamecentric
Copy link
Contributor Author

Sorry. Done it.

@jensmaurer jensmaurer requested a review from jwakely April 15, 2020 19:41
@zygoloid zygoloid merged commit 9e5415a into cplusplus:master Apr 16, 2020
@gamecentric gamecentric deleted the string.conversions-ptr-comparisons-with-0 branch April 23, 2020 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants