Changes between Version 26 and Version 27 of CodingStyle


Ignore:
Timestamp:
Aug 1, 2012, 1:37:09 PM (12 years ago)
Author:
Nicolas
Comment:

Formatting. Also changed {{{}}} to `` to make wiki code more readable.

Legend:

Unmodified
Added
Removed
Modified
  • CodingStyle

    v26 v27  
    2121
    2222 * Names should be descriptive without being verbose (local variables names may be short).
    23  * Class and type names, and #defined symbols, are all upper case, with underscores to separate words.
     23 * Class and type names, and `#defined` symbols, are all upper case, with underscores to separate words.
    2424 * Variable and function names are all lower case, with underscores to separate words.
    2525 * No mixed case names.
     
    3535);
    3636}}}
    37  * {{{switch}}} statements: {{{case}}} labels are at same indent level as {{{switch}}}:
     37 * `switch` statements: `case` labels are at same indent level as `switch`
    3838{{{
    3939switch (foo) {
     
    136136=== Includes === #includes
    137137
    138  * A `.cpp` file should have the minimum set of #includes to get that particular file to compile (e.g. the includes needed by {{{foo.cpp}}} should be in {{{foo.cpp}}}, not {{{foo.h}}}).
    139  * foo.cpp should include foo.h first; after that, includes should be ordered from general (`<stdio.h>`) to specific (`shmem.h`).
     138 * A `.cpp` file should have the minimum set of #includes to get that particular file to compile (e.g. the includes needed by `foo.cpp` should be in `foo.cpp`, not `foo.h`).
     139 * `foo.cpp` should include `foo.h` first; after that, includes should be ordered from general (`<stdio.h>`) to specific (`shmem.h`).
    140140
    141141=== Extern declarations === #extern
    142142
    143  * {{{foo.h}}} should have '{{{extern}}}' declarations for all public functions and variables in {{{foo.cpp}}} There should be no '{{{extern}}}' statements in {{{.cpp}}} files.
     143 * `foo.h` should have `extern` declarations for all public functions and variables in `foo.cpp` There should be no `extern` statements in `.cpp` files.
    144144
    145145=== Use of static === #static
    146146
    147  * If a function or variable is used in only one file, declare it {{{static}}}.
     147 * If a function or variable is used in only one file, declare it `static`.
    148148
    149149=== Things to avoid unless there's a truly compelling reason: === #try-avoid