diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html index 22a29427ce8..ff00c816738 100644 --- a/docs/CodingStandards.html +++ b/docs/CodingStandards.html @@ -29,7 +29,7 @@
  • Treat Compiler Warnings Like Errors
  • Write Portable Code
  • -
  • Use of class/struct Keywords
  • +
  • Use of class/struct Keywords
  • Style Issues @@ -38,23 +38,23 @@
    1. A Public Header File is a Module
    2. -
    3. #include as Little as Possible
    4. +
    5. #include as Little as Possible
    6. Keep "internal" Headers Private
    7. -
    8. Use Early Exits and 'continue' to Simplify +
    9. Use Early Exits and continue to Simplify Code
    10. -
    11. Don't use "else" after a - return
    12. +
    13. Don't use else after a + return
    14. Turn Predicate Loops into Predicate Functions
  • The Low-Level Issues
    1. Assert Liberally
    2. -
    3. Do not use 'using namespace std'
    4. +
    5. Do not use 'using namespace std'
    6. Provide a virtual method anchor for classes in headers
    7. -
    8. Don't evaluate end() every time through a +
    9. Don't evaluate end() every time through a loop
    10. #include <iostream> is forbidden
    11. @@ -522,7 +522,7 @@ class itself... just make them private (or protected), and all is well.

      @@ -531,7 +531,7 @@ class itself... just make them private (or protected), and all is well.

      decisions have to be remembered by the reader to understand a block of code. Aim to reduce indentation where possible when it doesn't make it more difficult to understand the code. One great way to do this is by making use of early -exits and the 'continue' keyword in long loops. As an example of using an early +exits and the continue keyword in long loops. As an example of using an early exit from a function, consider this "bad" code:

      @@ -623,7 +623,7 @@ structure the loop like this:

      This has all the benefits of using early exits from functions: it reduces nesting of the loop, it makes it easier to describe why the conditions are true, -and it makes it obvious to the reader that there is no "else" coming up that +and it makes it obvious to the reader that there is no else coming up that they have to push context into their brain for. If a loop is large, this can be a big understandability win.

      @@ -631,14 +631,14 @@ be a big understandability win.

      For similar reasons above (reduction of indentation and easier reading), - please do not use "else" or "else if" after something that interrupts - control flow like return, break, continue, goto, etc. For example, this is + please do not use else or 'else if' after something that interrupts + control flow like return, break, continue, goto, etc. For example, this is "bad":