summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-11-05 05:32:38 +0100
committerGitHub <noreply@github.com>2016-11-05 05:32:38 +0100
commit01013689b8148d2b881f913d4ed38b113e49d02d (patch)
tree34b857d8ec65a6dc011240dcac42bfef6cb070e9 /CONTRIBUTING.md
parentUpdate CONTRIBUTING.md (diff)
downloadyuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar
yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar.gz
yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar.bz2
yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar.lz
yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar.xz
yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.tar.zst
yuzu-01013689b8148d2b881f913d4ed38b113e49d02d.zip
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md8
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 {
* Note that the asterisks are indented by one space to align to the first line.
*/
struct Position {
- int x, y;
+ int x{}, y{}; // Always intitialize member variables!
};
// Use "typename" rather than "class" here
template <typename T>
void FooBar() {
- std::string some_string{ "prefer uniform initialization" };
+ const std::string some_string{ "prefer uniform initialization" };
int some_array[]{
5,
@@ -89,7 +89,7 @@ void FooBar() {
}
// Place a single space after the for loop semicolons, prefer pre-increment
- for (int i = 0; i != 25; ++i) {
+ for (int i{}; i != 25; ++i) {
// This is how we write loops
}
@@ -107,7 +107,7 @@ void FooBar() {
switch (var) {
// No indentation for case label
case 1: {
- int case_var = var + 3;
+ int case_var{ var + 3 };
DoSomething(case_var);
break;
}