Skip to content

Commit b67bd21

Browse files
author
Ernest
committedApr 9, 2018
Change coding style: star must be added to front of multi-comment
1 parent 3914287 commit b67bd21

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed
 

‎guides/coding_style/c++/README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
- [Aliases](#aliases)
3232

3333
## Comments
34-
Single line comments should use the standard style (`//`), and multi line comments should use multiline comments (`/* */`). There should be a space between the comment delimiter and the comment text (unless pure-code synopsis).
34+
Single line comments should use the standard style (`//`), and multi line comments should use multiline comments (`/* */`). There should be a space between the comment delimiter and the comment text.
3535

3636
```C++
3737
// Example text
@@ -43,19 +43,19 @@ Single line comments should use the standard style (`//`), and multi line commen
4343
*/
4444

4545
/*
46-
47-
Simple multiline comment
48-
49-
vector synopsis
50-
51-
template <class T, class Allocator = allocator<T> >
52-
class vector
53-
{
54-
public:
55-
using value_type = T;
56-
using allocator_type = Allocator;
57-
}
58-
*/
46+
*
47+
* Simple multiline comment
48+
*
49+
* vector synopsis
50+
*
51+
* template <class T, class Allocator = allocator<T> >
52+
* class vector
53+
* {
54+
* public:
55+
* using value_type = T;
56+
* using allocator_type = Allocator;
57+
* }
58+
*/
5959
```
6060

6161
## Code Width and Alignment

‎third_party/uncrustify.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ cmt_cpp_nl_end = false # false/true
18081808
cmt_cpp_to_c = false # false/true
18091809

18101810
# Whether to put a star on subsequent comment lines.
1811-
cmt_star_cont = false # false/true
1811+
cmt_star_cont = true # false/true
18121812

18131813
# The number of spaces to insert at the start of subsequent comment lines.
18141814
cmt_sp_before_star_cont = 0 # unsigned number

0 commit comments

Comments
 (0)
Please sign in to comment.