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

Use nullptr as NULL pointer constant instead of NULL or 0. #737

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Jan 28, 2018

This changes only code, no string literals or comments.


This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Jan 28, 2018
@iphydf iphydf force-pushed the nullptr branch 12 times, most recently from e62f09a to 893422f Compare January 30, 2018 12:11
@sudden6
Copy link

sudden6 commented Jan 30, 2018

where does nullptr come from? AFAIR it's not in any C standard?

@iphydf
Copy link
Member Author

iphydf commented Jan 30, 2018

Correct, it's defined in ccompat.h. The point is that clang 5 has a warning against using 0 as a nullptr constant, which is really nice to have. It got me to fix lots of 0 as null pointer constant in the code. But this warning only exists in C++ mode, so I've defined nullptr as NULL for C mode.

@sudden6
Copy link

sudden6 commented Jan 30, 2018

:lgtm_strong: good idea


Reviewed 73 of 73 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

This changes only code, no string literals or comments.
@iphydf iphydf modified the milestones: v0.2.x, v0.2.0 Jan 31, 2018
@iphydf iphydf merged commit 92ffad1 into TokTok:master Jan 31, 2018
@iphydf iphydf deleted the nullptr branch January 31, 2018 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants