diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-06-23 07:45:36 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-06-23 07:45:36 +1000 |
commit | f3d6fdae84308098a438254c8530fc52677efe57 (patch) | |
tree | 1f02fd395b85b30512e2eb650e21c77396009f60 /CODING_STYLE | |
parent | 1f4dd9985ac372de9817722109f75912ea00b41d (diff) |
Extend CODING_STYLE with the if/else requirements
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'CODING_STYLE')
-rw-r--r-- | CODING_STYLE | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CODING_STYLE b/CODING_STYLE index 1a64ffe6..3648a4e2 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -62,6 +62,17 @@ useit(c); } +- if/else: { on the same line, no curly braces if both blocks are a single + statement. If either if or else block are multiple statements, both must + have curly braces. + + if (foo) { + blah(); + bar(); + } else { + a = 10; + } + - public functions MUST be doxygen-commented, use doxygen's @foo rather than \foo notation |