-
-
Notifications
You must be signed in to change notification settings - Fork 957
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
Codechange: Use null pointer literal instead of the NULL macro #7407
Conversation
a) you killed my browser. Mean! :P |
NULL should not be allowed in new code after this. |
What I meant to say: any way to enforce that? Compiler-flag? Or do we need to add this to the commit-checker? :) |
doesn't sound right |
This is our commit checker being paranoid. It is a new style we enforce. But for these patches we might want to make an exception for them :) I would vote we just overrule its outcome. |
d437a7e
to
ec98e36
Compare
c88a121
to
b9c95de
Compare
I have a script which I run periodically to keep this PR up to date. Otherwise there's not much left to do on this one. find . ! -path './3rdparty/*' -name '*.h' | xargs sed -i -e 's/\bNULL\b/nullptr/g'
find . ! -path './3rdparty/*' -name '*.[hc]pp' | xargs sed -i -e 's/\bNULL\b/nullptr/g'
sed -i -e 's/hIMC != nullptr/hIMC != NULL/' video/win32_v.cpp |
You either should drop the comment change in stdafx.h or reformat the whole block to conform to the new coding style ( Alternatively, you find an admin to force a merge ignoring the commit-checker. I would merge, but I'm not an admin. |
Use of nullptr is preferential to the NULL macro since C++11.
This was done with a simple
sed