summaryrefslogtreecommitdiff
path: root/PcsxSrc/Docs/CodingStyle.txt
blob: 4b44c97ce32407e08ddc3abd123320aaf4dc43dd (plain)
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
## PCSX CODING STYLE

typedef struct { // { within struct
    int i;
} name;

void func(int i) { // { within func declaration
    if () { // same
        switch () { // same
            default:
                printf(); // 1 tab per level (considering the default and the code in it
                          // as diferent ones
        }
    }

    for (;;) { // same for while
    }
}

Also try to align the code:
	Something    = x;
	AnotherThing = x;
but not always:
	i = x;
	Something = x;

tab = 4
indent = 4