summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-01 15:31:36 -0400
committerGravatar bunnei2014-06-12 06:10:46 -0400
commit77c0f9868e947f5a117d94d9e63a0fbbea9acf9a (patch)
treec5cc4addf176f93d84d2087bc35da9483c0a815a /CONTRIBUTING.md
parentCONTRIBUTING: Fix some examples, escape underscores (diff)
downloadyuzu-77c0f9868e947f5a117d94d9e63a0fbbea9acf9a.tar.gz
yuzu-77c0f9868e947f5a117d94d9e63a0fbbea9acf9a.tar.xz
yuzu-77c0f9868e947f5a117d94d9e63a0fbbea9acf9a.zip
Update CONTRIBUTING.md
- removed variable naming starting with "_" - removed "Always break, even after a return" from case statements
Diffstat (limited to '')
-rw-r--r--CONTRIBUTING.md19
1 files changed, 7 insertions, 12 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 49742e4e0..cb1067c92 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,5 +1,4 @@
1# Contributing 1# Contributing
2
3Citra is a brand new project, so we have a great opportunity to keep things clean and well organized early on. As such, coding style is very important when making commits. They aren't very strict rules since we want to be flexible and we understand that under certain circumstances some of them can be counterproductive. Just try to follow as many of them as possible: 2Citra is a brand new project, so we have a great opportunity to keep things clean and well organized early on. As such, coding style is very important when making commits. They aren't very strict rules since we want to be flexible and we understand that under certain circumstances some of them can be counterproductive. Just try to follow as many of them as possible:
4 3
5### General Rules 4### General Rules
@@ -11,18 +10,16 @@ Citra is a brand new project, so we have a great opportunity to keep things clea
11 10
12### Naming Rules 11### Naming Rules
13* Functions 12* Functions
14 * CamelCase, `_` may also be used for clarity (e.g. `ARM_InitCore`) 13 * CamelCase, "_" may also be used for clarity (e.g. ARM_InitCore)
15* Variables 14* Variables
16 * lower\_case\_underscored 15 * lower_case_underscored
17 * Prefix `g_` if global 16 * Prefix "g_" if global
18 * Prefix `_` if internal
19 * Prefix `__` if ultra internal
20* Classes 17* Classes
21 * CamelCase, `_` may also be used for clarity (e.g. `OGL_VideoInterface`) 18 * CamelCase, "_" may also be used for clarity (e.g. OGL_VideoInterface)
22* Files/Folders 19* Files/Folders
23 * lower\_case\_underscored 20 * lower_case_underscored
24* Namespaces 21* Namespaces
25 * CamelCase, `_` may also be used for clarity (e.g. `ARM_InitCore`) 22 * CamelCase, "_" may also be used for clarity (e.g. ARM_InitCore)
26 23
27### Indentation/Whitespace Style 24### Indentation/Whitespace Style
28Follow the indentation/whitespace style shown below. Do not use tabs, use 4-spaces instead. 25Follow the indentation/whitespace style shown below. Do not use tabs, use 4-spaces instead.
@@ -88,15 +85,13 @@ void FooBar() {
88 case 3: 85 case 3:
89 DoSomething(var); 86 DoSomething(var);
90 return; 87 return;
91 // Always break, even after a return
92 break;
93 88
94 default: 89 default:
95 // Yes, even break for the last case 90 // Yes, even break for the last case
96 break; 91 break;
97 } 92 }
98 93
99 std::string 94 std::vector
100 you_can_declare, 95 you_can_declare,
101 a_few, 96 a_few,
102 variables, 97 variables,