Difference between revisions of "Code Formatting Conventions"

Jump to navigation Jump to search
→‎Switch / Case constructs: Added best practice to comment on fallthrough.
(→‎Switch / Case constructs: Added best practice to comment on fallthrough.)
Line 149: Line 149:
<syntax type="C++">
<syntax type="C++">
switch (cmd) {
switch (cmd) {
case kSomeCmd:
    SomeCmd();
    // Fallthrough intended
case kSomeVerySimilarCmd:
    SomeMoreCmd();
    break;
case kSaveCmd:
case kSaveCmd:
     save();
     save();
Line 160: Line 166:
}
}
</syntax>
</syntax>
* Note comment on whether fallthrough is intentional.


== Naming ==
== Naming ==
TrustedUser
574

edits

Navigation menu