From 3ae6ff82da439c9c2072ecdf2cdfbdbebb8939e2 Mon Sep 17 00:00:00 2001 From: cdfrey Date: Fri, 8 Jun 2007 19:23:01 +0000 Subject: [PATCH] - updated doc/CodingStyle.txt to cover switch() statements --- doc/CodingStyle.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/CodingStyle.txt b/doc/CodingStyle.txt index 024c8225..16ad075e 100644 --- a/doc/CodingStyle.txt +++ b/doc/CodingStyle.txt @@ -59,6 +59,18 @@ As for coding style, I keep opening braces on the statement line: else { } +Except for switches, because that's just wrong. :-) + + switch( something ) + { + case 1: + break; + case 2: + break; + default: + break; + } + I put spaces inside the parentheses too. For reeeeeally long lines, I sometimes favour keeping it all on one line -- 2.11.4.GIT