Changeset 1776
- Timestamp:
- Jun 12, 2014, 5:53:06 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/CodingStyle.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CodingStyle.txt
r619 r1776 41 41 if (expr) statement; 42 42 43 // If stat ment is long, split logically and use braces.43 // If statement is long, split logically and use braces. 44 44 if (expr) { 45 45 statement_part1... … … 106 106 107 107 BOOL is_ok; 108 109 Local vari bles can be short as long as meaning is clear.108 109 Local variables can be short as long as meaning is clear. 110 110 111 111 BOOL ok; … … 114 114 115 115 USHORT maxcnt; 116 116 117 117 Spaces 118 118 … … 148 148 return (0); 149 149 150 Do not use superfluous parens when operator precedence wi thdo the150 Do not use superfluous parens when operator precedence will do the 151 151 right thing. 152 152 … … 161 161 Avoid nested ternary conditionals (i.e. ? :). They are hard to read and 162 162 rarely generate better code than switch or if statement. 163 164 Disabling code 165 166 When disabling multiple lines of code, prefer 167 168 #if 0 169 #endif 170 171 to 172 173 /* 174 */ 175 176 comments or // comments. 177 178 When disabling multiple lines of code, it is acceptable to use // comments 179 to disable a single line. The // should be followed by a trailing space 180 181 // DbgMsg("here"); 163 182 164 183 Memory
Note:
See TracChangeset
for help on using the changeset viewer.
