Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Coding Style

James D edited this page May 17, 2021 · 3 revisions

Coding Style

The coding style is enforced using Clang-Format. Ensure you have run clang-format on your code before submitting a pull request. Check the Clang-Format File for all the options used.

Code

  • Functions: are named using 'snake_case' e.g. (my_function)
  • Classes & Structs: are named using 'snake_case' e.g. (my_class)
  • Variables: are named using 'snake_case' e.g. (my_variable)
  • Constants: are named using all capital letters e.g. (MY_CONSTANT)
  • Enums: are named with 'PascalCase' e.g. (MyEnum)
  • Namespaces: are named in all lowercase letters in one word e.g. (mynamespace)
  • Template Parameters: are named in all capital letters e.g. (template<typename>)

File

  • Name: are named using 'snake_case' e.g. (my_file.hpp)
  • Extension:
    • .hpp: When the definition and declaration are in the same file.
    • .cpp: When the definition is in the file.
    • .h: When the declaration is in the file.

Clone this wiki locally