Changes between Version 18 and Version 19 of CodingRules


Ignore:
Timestamp:
11/29/13 09:07:24 (12 years ago)
Author:
tbretz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodingRules

    v18 v19  
    33330. Source files have the extension cc, header files the extension h, C source files just c.
    34340. Operators +=, -=, etc. are preferable over constructions like x=x+, x=x-, ...
    35 0. If you omit intentionally a break in a switch statement (*fallthru*) add a comment
     350. If you omit intentionally a break in a switch statement (*fallthru*) add a comment (only necessary *after* code between two case-statements, not necessary if there is nothing at all between two case statements)
    36360. Sometimes including system headers is not identical for all operating systems, comments might help
    37370. 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.