C++ style guide: Difference between revisions

Jump to navigation Jump to search
Line 69: Line 69:
Indent ''both'' the curly braces and the body of the switch statement (so that the body gets indented by ''two'' indents).
Indent ''both'' the curly braces and the body of the switch statement (so that the body gets indented by ''two'' indents).


However, the {{codeline:case}} statement is not doubly indented and instead aligns with the first brace.
However, the {{codeline|case}} statement is not doubly indented and instead aligns with the first brace.


<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
Line 83: Line 83:
     return true;
     return true;
   }
   }
</syntaxhighlight>    
</syntaxhighlight>


==== Split long expressions ====
==== Split long expressions ====