diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-02-20 11:42:30 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-02-20 11:42:30 -0500 |
| commit | ec065eef8d43f93b02fe8f94e2fd30bc5f47f79c (patch) | |
| tree | 779258a00c2710c395e731b4518e63ae4a56b3b6 | |
| parent | 7d9c9ae177664e4831bd8b9c6d56f58a96869ee4 (diff) | |
| parent | f20fb9b471e9e94820782a068517c77cfc9bba6b (diff) | |
Merge pull request #2081 from Stevoisiak/UpdateStyleGuide
Style Guide: Added rule for do-while loops
| -rw-r--r-- | Contributing.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Contributing.md b/Contributing.md index d0a717e8a1..8784f85fbb 100644 --- a/Contributing.md +++ b/Contributing.md @@ -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`. |
