mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Copy-Paste-Typo in Comment for ES.87 sample (==0/!=0) (#1145)
This commit is contained in:
parent
01e59d5452
commit
9c98f9679c
|
@ -12508,7 +12508,7 @@ The opposite condition is most easily expressed using a negation:
|
|||
|
||||
// These all mean "if `p` is `nullptr`"
|
||||
if (!p) { ... } // good
|
||||
if (p == 0) { ... } // redundant `!= 0`; bad: don't use `0` for pointers
|
||||
if (p == 0) { ... } // redundant `== 0`; bad: don't use `0` for pointers
|
||||
if (p == nullptr) { ... } // redundant `== nullptr`, not recommended
|
||||
|
||||
##### Enforcement
|
||||
|
|
Loading…
Reference in New Issue
Block a user