1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-03-10 20:31:47 +00:00

Merge pull request #2407 from glassez/coding_guide

Fix internal conflicts in CODING_GUIDELINES.md.
This commit is contained in:
sledgehammer999 2015-01-18 12:03:02 +02:00
commit 71eec8e2e0

View File

@ -59,13 +59,17 @@ default:
#### c. Blocks in switch's case labels #### #### c. Blocks in switch's case labels ####
```c++ ```c++
switch (var) switch (var) {
case 1: { case 1: {
//declare local variables //declare local variables
//code //code
} }
case 2: break;
case 2: {
//declare local variables
//code //code
}
break;
default: default:
//code //code
} }
@ -93,7 +97,7 @@ if (condition)
a = a + b; 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++ ```c++
a = myFunction(); a = myFunction();
b = a * 1500; b = a * 1500;