summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-16 12:58:06 +0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-16 12:58:06 +0700
commit2c8e8f8cecb16ce34c24ce4099b8ead7a7baea78 (patch)
treee1ce14451a5eaae6ce1ebfac9c1b9001b83c6177
parent96a4fd1bb223d646bb3f3c8b9d4d0800ebe49e13 (diff)
downloadsubsurface-2c8e8f8cecb16ce34c24ce4099b8ead7a7baea78.tar.gz
Add switch statement to CodingStyle
Requested-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--CodingStyle14
1 files changed, 14 insertions, 0 deletions
diff --git a/CodingStyle b/CodingStyle
index 9efd5f67a..82c86e59f 100644
--- a/CodingStyle
+++ b/CodingStyle
@@ -61,3 +61,17 @@
where the two meet, use your best judgment and go for best consistency
(i.e., where does the variable "originate")
+
+- switch statements with blocks are a little bit special (to avoid indenting
+ too far)
+
+ switch (foo) {
+ case FIRST:
+ whatever();
+ break;
+ case SECOND: {
+ int i;
+ for (i = 0; i < 5; i++)
+ do_something(i);
+ }
+ } \ No newline at end of file