Changes between Version 9 and Version 10 of CodingRules
- Timestamp:
- 11/26/13 15:35:57 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingRules
v9 v10 34 34 0. Sometimes including system headers is not identical for all operating systems, comments might help 35 35 0. Try to avoid using dynamic allocation whenever possible: "int i=5; /* do something with i*/; /* i runs out of scope */" is preferred over "int *i = new int; *i=5; /* do something with i */; delete i;" Although this example sounds ridiculous, the same is true for every class instance you allocate. 36 0. Initialization of all data members using their constructor (see example) is preferred over using assignments (optimization reasons) 36 37 37 38 == Example ==