forked from DeaDBeeF-Player/deadbeef
-
Notifications
You must be signed in to change notification settings - Fork 5
Code guidelines
Alexey Yakovenko edited this page Feb 4, 2015
·
3 revisions
I hate code guidelines. Especially when they tell to use tabs instead of spaces, or put { on separate lines, or similar nonsense. But code must be consistent, so please try following this very small set of rules/recommendations, when contributing to deadbeef.
- Follow the existing style of a file as much as possible
- 4 spaces for indentation (mandatory)
- Prefer the opening { on the same line, e.g.
void my_function (void) {
- Use (void) instead of empty argument list
- Space before ( is better than no space, including functions, e.g.
int main (void)
-
Don't do this
( void )
- Position the star correctly in pointers, e.g.
int *value;
- No trailing line-breaks