Browse Source

Merge pull request #2407 from glassez/coding_guide

Fix internal conflicts in CODING_GUIDELINES.md.
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
71eec8e2e0
  1. 10
      CODING_GUIDELINES.md

10
CODING_GUIDELINES.md

@ -59,13 +59,17 @@ default: @@ -59,13 +59,17 @@ default:
#### c. Blocks in switch's case labels ####
```c++
switch (var)
switch (var) {
case 1: {
//declare local variables
//code
}
case 2:
break;
case 2: {
//declare local variables
//code
}
break;
default:
//code
}
@ -93,7 +97,7 @@ if (condition) @@ -93,7 +97,7 @@ if (condition)
a = a + b;
```
One acceptable exception to this **can be** `return` or `break` statements, provided that the test condition isn't very long. However you can choose to use the first rule instead.
One acceptable exception to this **can be** `return`, `break` or `continue` statements, provided that the test condition isn't very long. However you can choose to use the first rule instead.
```c++
a = myFunction();
b = a * 1500;

Loading…
Cancel
Save