blob: b36f5e2a101245e96e64f870f4434605efbe04c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
----------------------------
The Mana World Hacking Guide
----------------------------
With multiple coders working on the same source files, there needs to be a
standard specifying how code is written down. Not doing so can cause quite some
annoyance for certain coders and easily creates more version conflicts than
necessary.
* Indentation:
Code is indented using 4 spaces, no tabs.
* Control constructs like this:
if (condition) {
}
else {
}
for (init; condition; step) {
}
while (condition) {
}
/*
* Documentation about behaviour
* ...
*/
void function(param1, param2) {
}
class TheClass : public TheSubclass {
};
Ending parenthesis may be on next line for clarity.
Bad:
if (condition)
statement;
if (condition) statement;
* Use of whitespace example:
x = ((5 + 4) * 3) / 1.5;
* Agreement on function/class/variable/method/member naming pending.
|