Changes between Version 8 and Version 9 of CodingRules
- Timestamp:
- 11/26/13 15:34:57 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingRules
v8 v9 33 33 0. If you omit intentionally a break in a switch statement (*fallthru*) add a comment 34 34 0. Sometimes including system headers is not identical for all operating systems, comments might help 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 use.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 36 37 37 == Example ==