Skip to content

Commit 62b2648

Browse files
Trottdanielleadams
authored andcommitted
doc: apply sentence-consistently in C++ style guide
Use sentence case for headers consistently. This makes the document internally consistent and also aligns it with our docs generally and the style guide we use for docs. PR-URL: #37350 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 189ce39 commit 62b2648

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/guides/cpp-style-guide.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# C++ Style Guide
1+
# C++ style guide
22

33
See also the [C++ codebase README](../../src/README.md) for C++ idioms in the
44
Node.js codebase not related to stylistic issues.
55

6-
## Table of Contents
6+
## Table of contents
77

8-
* [Guides and References](#guides-and-references)
8+
* [Guides and references](#guides-and-references)
99
* [Formatting](#formatting)
1010
* [Left-leaning (C++ style) asterisks for pointer declarations](#left-leaning-c-style-asterisks-for-pointer-declarations)
1111
* [C++ style comments](#c-style-comments)
@@ -18,11 +18,11 @@ Node.js codebase not related to stylistic issues.
1818
* [`snake_case_` for private class fields](#snake_case_-for-private-class-fields)
1919
* [`snake_case` for C-like structs](#snake_case-for-c-like-structs)
2020
* [Space after `template`](#space-after-template)
21-
* [Memory Management](#memory-management)
21+
* [Memory management](#memory-management)
2222
* [Memory allocation](#memory-allocation)
2323
* [Use `nullptr` instead of `NULL` or `0`](#use-nullptr-instead-of-null-or-0)
2424
* [Use explicit pointer comparisons](#use-explicit-pointer-comparisons)
25-
* [Ownership and Smart Pointers](#ownership-and-smart-pointers)
25+
* [Ownership and smart pointers](#ownership-and-smart-pointers)
2626
* [Avoid non-const references](#avoid-non-const-references)
2727
* [Use AliasedBuffers to manipulate TypedArrays](#use-aliasedbuffers-to-manipulate-typedarrays)
2828
* [Others](#others)
@@ -32,7 +32,7 @@ Node.js codebase not related to stylistic issues.
3232
* [Avoid throwing JavaScript errors in C++ methods](#avoid-throwing-javascript-errors-in-c)
3333
* [Avoid throwing JavaScript errors in nested C++ methods](#avoid-throwing-javascript-errors-in-nested-c-methods)
3434

35-
## Guides and References
35+
## Guides and references
3636

3737
The Node.js C++ codebase strives to be consistent in its use of language
3838
features and idioms, as well as have some specific guidelines for the use of
@@ -191,7 +191,7 @@ class FancyContainer {
191191
}
192192
```
193193

194-
## Memory Management
194+
## Memory management
195195

196196
### Memory allocation
197197

@@ -208,7 +208,7 @@ Use explicit comparisons to `nullptr` when testing pointers, i.e.
208208
`if (foo == nullptr)` instead of `if (foo)` and
209209
`foo != nullptr` instead of `!foo`.
210210

211-
### Ownership and Smart Pointers
211+
### Ownership and smart pointers
212212

213213
* [R.20][]: Use `std::unique_ptr` or `std::shared_ptr` to represent ownership
214214
* [R.21][]: Prefer `unique_ptr` over `shared_ptr` unless you need to share

0 commit comments

Comments
 (0)