- Conform new code to style conventions. Avoid unnecessary "esthetic" variations, which are distracting.
- Use the C++ RAII design pattern to manage bracketed critical sections. See class
ResourceMarkfor an example.
+Verboseis used to provide additional output for another flag, but does not enable output by itself.
- Do not use ints or pointers as booleans with
while. Instead, compare explicitly
!= NULL, etc. (See #8 above.)
- Use functions from
globalDefinitions.hppwhen performing bitwise operations on integers. Do not code directly as C operators, unless they are extremely simple. (Examples:
- Naming JTreg tests
- More suggestions on factoring.
- Do not put non-trivial function implementations in .hpp files. If the implementation depends on other .hpp files, put it in a .cpp or a .inline.hpp file.
- .inline.hpp files should only be included in .cpp or .inline.hpp files.
- All .cpp files include precompiled.hpp as the first include line.
- precompiled.hpp is just a build time optimization, so don't rely on it to resolve include problems.
- Keep the include lines sorted.
- Put conditional inclusions (#if ...) at the end of the include list.