Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-02-13 16:22:27 +0300
committerDanielle Adams <adamzdanielle@gmail.com>2021-02-16 17:16:14 +0300
commit62b2648a962c3979045bc6a6e2a40c73788b7567 (patch)
treef9b02f92ca80f085861864d54c672ff7d2fda0c3 /doc
parent189ce399da16d9a40e5a21ca03086eeaa899601a (diff)
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: https://github.com/nodejs/node/pull/37350 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/guides/cpp-style-guide.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/guides/cpp-style-guide.md b/doc/guides/cpp-style-guide.md
index 56f3f5b4c84..b29fc070c3a 100644
--- a/doc/guides/cpp-style-guide.md
+++ b/doc/guides/cpp-style-guide.md
@@ -1,11 +1,11 @@
-# C++ Style Guide
+# C++ style guide
See also the [C++ codebase README](../../src/README.md) for C++ idioms in the
Node.js codebase not related to stylistic issues.
-## Table of Contents
+## Table of contents
-* [Guides and References](#guides-and-references)
+* [Guides and references](#guides-and-references)
* [Formatting](#formatting)
* [Left-leaning (C++ style) asterisks for pointer declarations](#left-leaning-c-style-asterisks-for-pointer-declarations)
* [C++ style comments](#c-style-comments)
@@ -18,11 +18,11 @@ Node.js codebase not related to stylistic issues.
* [`snake_case_` for private class fields](#snake_case_-for-private-class-fields)
* [`snake_case` for C-like structs](#snake_case-for-c-like-structs)
* [Space after `template`](#space-after-template)
-* [Memory Management](#memory-management)
+* [Memory management](#memory-management)
* [Memory allocation](#memory-allocation)
* [Use `nullptr` instead of `NULL` or `0`](#use-nullptr-instead-of-null-or-0)
* [Use explicit pointer comparisons](#use-explicit-pointer-comparisons)
- * [Ownership and Smart Pointers](#ownership-and-smart-pointers)
+ * [Ownership and smart pointers](#ownership-and-smart-pointers)
* [Avoid non-const references](#avoid-non-const-references)
* [Use AliasedBuffers to manipulate TypedArrays](#use-aliasedbuffers-to-manipulate-typedarrays)
* [Others](#others)
@@ -32,7 +32,7 @@ Node.js codebase not related to stylistic issues.
* [Avoid throwing JavaScript errors in C++ methods](#avoid-throwing-javascript-errors-in-c)
* [Avoid throwing JavaScript errors in nested C++ methods](#avoid-throwing-javascript-errors-in-nested-c-methods)
-## Guides and References
+## Guides and references
The Node.js C++ codebase strives to be consistent in its use of language
features and idioms, as well as have some specific guidelines for the use of
@@ -191,7 +191,7 @@ class FancyContainer {
}
```
-## Memory Management
+## Memory management
### Memory allocation
@@ -208,7 +208,7 @@ Use explicit comparisons to `nullptr` when testing pointers, i.e.
`if (foo == nullptr)` instead of `if (foo)` and
`foo != nullptr` instead of `!foo`.
-### Ownership and Smart Pointers
+### Ownership and smart pointers
* [R.20][]: Use `std::unique_ptr` or `std::shared_ptr` to represent ownership
* [R.21][]: Prefer `unique_ptr` over `shared_ptr` unless you need to share