diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2017-02-12 01:01:56 +0100 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2017-02-12 01:01:56 +0100 |
commit | 35aa705c3ece8293652ffcf449c71fe80b96e722 (patch) | |
tree | 7c0fb34ec96204cbcd867a973b2476689919a5b4 /DOCS/contribute.md | |
parent | 10a005df0c981050afc35184a42173bea7ea2527 (diff) | |
parent | 3739d1318fdb658bb6037bfe06bb6cefb3b50a09 (diff) | |
download | mpv-35aa705c3ece8293652ffcf449c71fe80b96e722.tar.bz2 mpv-35aa705c3ece8293652ffcf449c71fe80b96e722.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'DOCS/contribute.md')
-rw-r--r-- | DOCS/contribute.md | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/DOCS/contribute.md b/DOCS/contribute.md index 9fc9d8d8bc..994e2040c1 100644 --- a/DOCS/contribute.md +++ b/DOCS/contribute.md @@ -101,18 +101,16 @@ mpv uses C99 with K&R formatting, with some exceptions. do_something(); } ``` -- If the body of an if statement uses braces, the else branch should also - use braces (and reverse). +- If the if has an else branch, both branches should use braces, even if they're + technically redundant. Example: ```C if (a) { - // do something - something(); - something_else(); - } else { one_line(); + } else { + one_other_line(); } ``` - If an if condition spans multiple physical lines, then put the opening brace |