Changes between Version 5 and Version 6 of CodingStyle


Ignore:
Timestamp:
Dec 22, 2007, 5:26:26 PM (17 years ago)
Author:
Nicolas
Comment:

More monospaced formatting

Legend:

Unmodified
Added
Removed
Modified
  • CodingStyle

    v5 v6  
    88 * If a function becomes longer than 100 lines or so, split it up.
    99 * If a file is becoming 'landfill', split it up.
    10  * C++ .h files often contain both interface and implementation. Clearly divide these.
     10 * C++ `.h` files often contain both interface and implementation. Clearly divide these.
    1111
    1212=== Code documentation ===
    1313
    14  * .C files have a comment at the top saying what's in the file (and perhaps what isn't).
     14 * `.C` files have a comment at the top saying what's in the file (and perhaps what isn't).
    1515 * Functions are preceded by a comment saying what they do.
    16  * Structs and classes are preceded by a comment saying what they are.
     16 * structs and classes are preceded by a comment saying what they are.
    1717
    1818=== Naming ===
     
    8686=== Includes ===
    8787
    88  * A .C file should have the minimum set of #includes to get that particular file to compile (e.g. the includes needed by {{{foo.C}}} should be in {{{foo.C}}}, not {{{foo.h}}}).
     88 * A `.C` file should have the minimum set of #includes to get that particular file to compile (e.g. the includes needed by {{{foo.C}}} should be in {{{foo.C}}}, not {{{foo.h}}}).
    8989 * Includes should be ordered from general (`<stdio.h>`) to specific (`thisfile.h`).
    9090
     
    105105=== Things to avoid ===
    106106
    107  * Use {{{typedef}}} (not {{{#define}}}) to define types.
    108  * Don't use {{{memset()}}} or {{{memcpy()}}} to initialize or copy classes that are non-C compatible. Write a default constructor and a copy constructor.
     107 * Use `typedef` (not `#define`) to define types.
     108 * Don't use `memset()` or `memcpy()` to initialize or copy classes that are non-C compatible. Write a default constructor and a copy constructor instead.
    109109
    110110=== Error codes ===