File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 44
55* [ Formatting] ( #formatting )
66 * [ Left-leaning (C++ style) asterisks for pointer declarations] ( #left-leaning-c-style-asterisks-for-pointer-declarations )
7+ * [ C++ style comments] ( #c-style-comments )
78 * [ 2 spaces of indentation for blocks or bodies of conditionals] ( #2-spaces-of-indentation-for-blocks-or-bodies-of-conditionals )
89 * [ 4 spaces of indentation for statement continuations] ( #4-spaces-of-indentation-for-statement-continuations )
910 * [ Align function arguments vertically] ( #align-function-arguments-vertically )
@@ -33,6 +34,26 @@ these rules:
3334
3435` char* buffer; ` instead of ` char *buffer; `
3536
37+ ## C++ style comments
38+
39+ Use C++ style comments (` // ` ) for both single-line and multi-line comments.
40+ Comments should also start with uppercase and finish with a dot.
41+
42+ Examples:
43+
44+ ``` c++
45+ // A single-line comment.
46+
47+ // Multi-line comments
48+ // should also use C++
49+ // style comments.
50+ ```
51+
52+ The codebase may contain old C style comments (` /* */ ` ) from before this was the
53+ preferred style. Feel free to update old comments to the preferred style when
54+ working on code in the immediate vicinity or when changing/improving those
55+ comments.
56+
3657## 2 spaces of indentation for blocks or bodies of conditionals
3758
3859``` c++
You can’t perform that action at this time.
0 commit comments