Skip to content

Commit

Permalink
Style Guide: Added rule for do-while loops
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevoisiak committed Feb 20, 2015
1 parent 8b095a0 commit f20fb9b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Contributing.md
Expand Up @@ -159,6 +159,13 @@ private:
- Empty-bodied loops should use braces after their header, not a semicolon.
- Yes: `while (condition) {}`
- No: `while (condition);`
- For do-while loops, place 'while' on the same line as the closing brackets

```c++
do
{
} while (false);
```
### Functions
- If a function parameter is a pointer or reference and its value or data isn't intended to be changed, please mark that parameter as `const`.
Expand Down

0 comments on commit f20fb9b

Please sign in to comment.