mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
96a4fd1bb2
commit
2c8e8f8cec
1 changed files with 14 additions and 0 deletions
14
CodingStyle
14
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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue