forked from stepmania/stepmania
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME-GUIDELINES
30 lines (20 loc) · 1.02 KB
/
README-GUIDELINES
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
Bits of possibly less-than-obvious advice:
archutils/ contains arch-specific code. This should contain code
shared by more than one arch/ driver.
arch/ contains drivers for specific features that can be better
implemented nonportably. Most drivers (all except sound) contain
default, portable implementations, so StepMania should work mostly
out-of-the-box on platforms that are supported by the supporting
libraries (particularly SDL); only a sound driver needs to be
written.
Avoid accessing other singleton classes from singleton destructors. That
introduces dependencies on the order of destruction, and can cause problems
if one of the singletons throws an exception.
This kills VC:
template<class T> static void YY( T opt ) { }
enum { A } a;
enum { A1 } b;
void XX() { YY(a); YY(b); }
foo.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '?YY@@YAXW4__unnamed@@@Z'
It mangles the template incorrectly. Solution: don't use anonymous
enums as template parameters; give them a name.