Skip to content

Coding Style

CoffeeTableEspresso edited this page Jun 2, 2018 · 8 revisions

The following is coding style decisions we have made:

  • Use enum struct for all enums.
  • Use struct to bundle things without functions/methods (with the possible exception of a constructor/destructor), use class for everything else (i.e. with methods).
  • Use m_ prefix for member/instance variable names and p_ prefix for pointer names.
  • Use C++-style casts (e.g. static_cast, dynamic_cast) instead of C-style casts, except when casting only primitives, in which case C-style casts are allowed.
  • Use nullptr instead of NULL.
Clone this wiki locally