-
Notifications
You must be signed in to change notification settings - Fork 12
Coding Style
We don't have any explicit C++ coding standards. Alternatively Pomdog use ClangFormat so please see ClangFormat file for details about basic coding style of this project.
If you would like to contribute and submit pull request, you don't need to worry about some trivial style (e.g. asterisk *
and ampersand &
position with const
in function declaration). We just want things to work automatically (such as ClangFormat), so feedback and contributions are very welcome!
In general you should follow the widely used coding standards, such as the followings:
And the following links will help you write C++:
If you need further information, please visit:
- Blender Coding Style
- Blink Coding Style Guidelines
- Inkscape Coding Style
- Mozilla Coding Style
- Qt - API Design Principles
- WebKit Coding Style Guidelines
brew install clang-format
From the root of your engine directory, run the following at command line:
clang-format path/to/filename.cpp
To edit a file, use -i
option:
clang-format -i path/to/filename.cpp
For more information about clang-format, please see:
cd pomdog
python tools/refactor_sources.py experimental/
python tools/refactor_sources.py include/
python tools/refactor_sources.py src/