diff options
| author | 2016-11-05 00:32:38 -0400 | |
|---|---|---|
| committer | 2016-11-05 00:32:38 -0400 | |
| commit | 01013689b8148d2b881f913d4ed38b113e49d02d (patch) | |
| tree | 34b857d8ec65a6dc011240dcac42bfef6cb070e9 | |
| parent | Update CONTRIBUTING.md (diff) | |
| download | yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar.gz yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar.xz yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.zip | |
Update CONTRIBUTING.md
Diffstat (limited to '')
| -rw-r--r-- | CONTRIBUTING.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36fa4b86a..9406dbd0e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md | |||
| @@ -67,13 +67,13 @@ enum SomeEnum { | |||
| 67 | * Note that the asterisks are indented by one space to align to the first line. | 67 | * Note that the asterisks are indented by one space to align to the first line. |
| 68 | */ | 68 | */ |
| 69 | struct Position { | 69 | struct Position { |
| 70 | int x, y; | 70 | int x{}, y{}; // Always intitialize member variables! |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | // Use "typename" rather than "class" here | 73 | // Use "typename" rather than "class" here |
| 74 | template <typename T> | 74 | template <typename T> |
| 75 | void FooBar() { | 75 | void FooBar() { |
| 76 | std::string some_string{ "prefer uniform initialization" }; | 76 | const std::string some_string{ "prefer uniform initialization" }; |
| 77 | 77 | ||
| 78 | int some_array[]{ | 78 | int some_array[]{ |
| 79 | 5, | 79 | 5, |
| @@ -89,7 +89,7 @@ void FooBar() { | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | // Place a single space after the for loop semicolons, prefer pre-increment | 91 | // Place a single space after the for loop semicolons, prefer pre-increment |
| 92 | for (int i = 0; i != 25; ++i) { | 92 | for (int i{}; i != 25; ++i) { |
| 93 | // This is how we write loops | 93 | // This is how we write loops |
| 94 | } | 94 | } |
| 95 | 95 | ||
| @@ -107,7 +107,7 @@ void FooBar() { | |||
| 107 | switch (var) { | 107 | switch (var) { |
| 108 | // No indentation for case label | 108 | // No indentation for case label |
| 109 | case 1: { | 109 | case 1: { |
| 110 | int case_var = var + 3; | 110 | int case_var{ var + 3 }; |
| 111 | DoSomething(case_var); | 111 | DoSomething(case_var); |
| 112 | break; | 112 | break; |
| 113 | } | 113 | } |