638
edits
No edit summary |
(→Control Flow: Add the jorendorff rule) |
||
| Line 187: | Line 187: | ||
DoThat(); | DoThat(); | ||
DoTheOther(); | DoTheOther(); | ||
* Avoid using && or || to mix deciding-whether-to-do-something with error-checking. | |||
if (obj->hasProblems() && !obj->rectify()) /* bad */ | |||
return false; | |||
if (obj->hasProblems()) { /* OK */ | |||
if (!obj->rectify()) | |||
return false; | |||
} | |||
= Comments = | = Comments = | ||
edits