Add switch statement to CodingStyle

Requested-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-01-16 12:58:06 +07:00
parent 96a4fd1bb2
commit 2c8e8f8cec

View file

@ -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);
}
}