Skip to content

Commit 37215ec

Browse files
author
Break Yang
committed
Fix some typos
1 parent fceda32 commit 37215ec

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ has clearly stated its
1313
which provides the **justification** of the rules in the style guide.
1414
[Dr. Titus Winters](http://alumni.cs.ucr.edu/~titus/) had a very good
1515
[talk](https://www.youtube.com/watch?v=NOCElcMcFik&t=2481s) on this.
16-
Some of the goals that worths mentioning, especially for the new C++
16+
Some of the goals that worth mentioning, especially for the new C++
1717
programmers are:
1818

1919
1. Optimize for the **READER**, not the writer.
@@ -22,9 +22,9 @@ programmers are:
2222
than writing it.
2323
2. Avoid surprising or dangerous constructs.
2424

25-
Black magics may look awesome, but tends to increase the risk of
26-
bugs and incorrectness (not only when you are developing it, but
27-
also when you or someone else is maintaining it). "Don't be
25+
Black magics may look awesome, but they tend to increase the risk
26+
of bugs and incorrectness (not only when you are developing it,
27+
but also when you or someone else is maintaining it). "Don't be
2828
clever".
2929
3. Be **consistent** (with existing code).
3030

@@ -50,8 +50,8 @@ See [C++ Programmer's Toolbox](#c-programmers-toolbox) for details.
5050
mainstream compilers have been supporting it for years.
5151
* Some codebase may require header guards for **consistency**,
5252
but new code base may not have that constraint.
53-
* `#pragma once` reduces the possiblity of bugs (e.g. when
54-
moving files around), and is argurably more readable.
53+
* `#pragma once` reduces the possibility of bugs (e.g. when
54+
moving files around), and is arguably more readable.
5555
* [Details and example](cases/pragma_once.md).
5656
2. **Forward Declarations**
5757

@@ -84,7 +84,7 @@ See [C++ Programmer's Toolbox](#c-programmers-toolbox) for details.
8484

8585
## Namespaces
8686

87-
1. **Unamed Namespace**
87+
1. **Unnamed Namespace**
8888
* Use them in `.cpp` file to hide functions or variables you do
8989
not want expose.
9090
* **Do not** use them in `.h` files.
@@ -137,7 +137,7 @@ See [C++ Programmer's Toolbox](#c-programmers-toolbox) for details.
137137
often more appropriate. Try to restrict use of inheritance to
138138
the "is-a" case: Bar subclasses Foo if it can reasonably be
139139
said that Bar "is a kind of" Foo.
140-
* If you find yourslef wanting to use multiple inheritance,
140+
* If you find yourself wanting to use multiple inheritance,
141141
**THINK TWICE**.
142142
3. **Access Control**
143143
* Data members are **private**, except when they are static
@@ -146,12 +146,12 @@ See [C++ Programmer's Toolbox](#c-programmers-toolbox) for details.
146146
class to be protected when using Google Test).
147147
4. **Declaration Order**
148148
* `public`, `protected` and then `private`.
149-
* In each section, group simular declarations together, prefer
149+
* In each section, group similar declarations together, prefer
150150
the order:
151151
* `typedef` and `using`
152152
* `struct` and `class`
153153
* factory functions
154-
* contructors
154+
* constructors
155155
* `operator=`
156156
* destructors
157157
* methods
@@ -165,7 +165,7 @@ See [C++ Programmer's Toolbox](#c-programmers-toolbox) for details.
165165
way to pass parameters.
166166
* For output parameters, pass pointers.
167167
2. **Default Argument**
168-
* Not recommended for readablity issue. **Do not use** unless
168+
* Not recommended for readability issue. **Do not use** unless
169169
you have to.
170170
3. **Trailing Return Type Syntax**
171171
* When in lambda. Period.
@@ -192,7 +192,7 @@ to
192192
## C++ Programmer's Toolbox
193193
194194
There are many available tools for C++, and it is always good to have
195-
them in your pocket. Some of them helpt enforce the rules
195+
them in your pocket. Some of them help enforce the rules
196196
automatically. Use them to free yourself from worrying about the
197197
format and focus on more important stuff.
198198

0 commit comments

Comments
 (0)