[webkit-dev] Switch statement indentation

Geoffrey Garen ggaren at apple.com
Thu Dec 3 12:39:53 PST 2009


Sounds good to me.

Geoff

On Dec 2, 2009, at 8:58 PM, Peter Kasting wrote:

> On Wed, Dec 2, 2009 at 8:05 PM, Maciej Stachowiak <mjs at apple.com> wrote:
> I believe one rule that could work is something like this:
> 
> - Indent case labels inside a switch two spaces.
> - Indent actual statements inside a switch four spaces.
> - In the case where a case label is followed by a block, include the open brace on the same line as the case label and indent the matching close brace only two spaces (but still 4 spaces for the contained statements).
> 
> This is precisely the rule that the Google C++ Style Guide uses ( http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Loops_and_Switch_Statements ).  I think it works well.  I support it.
> 
> PK

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091203/65fc27aa/attachment.html>


More information about the webkit-dev mailing list