mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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
|
where the two meet, use your best judgment and go for best consistency
|
||||||
(i.e., where does the variable "originate")
|
(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…
Add table
Reference in a new issue