Merge branch 'jk/doc-coding-guideline'
Elaborate on a style niggle that has been part of "mimic existing code". * jk/doc-coding-guideline: CodingGuidelines: mention C whitespace rules
This commit is contained in:
commit
2b66d315bb
@ -126,6 +126,17 @@ For C programs:
|
||||
"char * string". This makes it easier to understand code
|
||||
like "char *string, c;".
|
||||
|
||||
- Use whitespace around operators and keywords, but not inside
|
||||
parentheses and not around functions. So:
|
||||
|
||||
while (condition)
|
||||
func(bar + 1);
|
||||
|
||||
and not:
|
||||
|
||||
while( condition )
|
||||
func (bar+1);
|
||||
|
||||
- We avoid using braces unnecessarily. I.e.
|
||||
|
||||
if (bla) {
|
||||
|
Loading…
Reference in New Issue
Block a user