Don't use zero as null pointer constant. Use nullptr (C++11).#13802
Don't use zero as null pointer constant. Use nullptr (C++11).#13802practicalswift wants to merge 1 commit intobitcoin:masterfrom
Conversation
fc6c44b to
f0ea2eb
Compare
|
Concept ACK. |
Note to reviewers: This pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
If this is going to be done, shouldn't |
|
@fanquake Yes that would be the best way to make sure we don't regress! Unfortunately |
In which case I suggest to do the same as with |
|
@MarcoFalke Oh, I'd love enabling that warning but in contrast to shadowing I think the probably of regressions is much lower – hopefully making this a one time "switch to C++11" change. New code is unlikely to use I'd assume the instances changed here are from the pre-C++11 era. |
|
Fine, |
|
@MarcoFalke Correct! Type safety is our friend. This change is safe:
So yes, if it compiles it is safe :-) |
f0ea2eb to
08c2760
Compare
|
Weak concept NAK, but I'm okay with it if others are (I understand it's safe if it compiles). Too many files changed (100 lines over 58 files) for a change that isn't really a fix (the reason stated in C++ guidelines is 'readability', which is rather weak for a 58 file change IMO). I feel this is one of those things that can be fixed gradually over time as people update the transgressing code. |
|
Closing this PR due to lack of consensus ACK :-) |
Don't use zero as null pointer constant.
From the developer notes:
From the C++ Core Guidelines:
Found by compiling the project with
-Wzero-as-null-pointer-constantand fixing where appropriate (skipping false positives).