Skip to content

Commit 25044af

Browse files
committed
Correct a few typos.
A quick inspection with 'aspell -l en_US'.
1 parent 0785e0b commit 25044af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CppCoreGuidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ They are meant to inhibit perfectly valid C++ code that correlates with errors,
225225
The rules are not perfect.
226226
A rule can do harm by prohibiting something that is useful in a given situation.
227227
A rule can do harm by failing to prohibit something that enables a serious error in a given situation.
228-
A rule can do a lot of harm by being vague, ambiguous, unenforcable, or by enabling every solution to a problem.
228+
A rule can do a lot of harm by being vague, ambiguous, unenforceable, or by enabling every solution to a problem.
229229
It is impossible to completely meet the "do no harm" criteria.
230230
Instead, our aim is the less ambitious: "Do the most good for most programmers";
231231
if you cannot live with a rule, object to it, ignore it, but don't water it down until it becomes meaningless.
@@ -11292,7 +11292,7 @@ these `thread`s can be seen as just a function object called from `some_fct`.
1129211292
##### Enforcement
1129311293

1129411294
In general, it is undecidable whether a `detach()` is executed for a `thread`, but simple common cases are easily detected.
11295-
If we cannot prove that a `thread` does not `detatch()`, we must assume that it does and that it outlives the scope in which it was constructed;
11295+
If we cannot prove that a `thread` does not `detach()`, we must assume that it does and that it outlives the scope in which it was constructed;
1129611296
After that, the usual lifetime and ownership (for global objects) enforcement applies.
1129711297

1129811298

@@ -11665,7 +11665,7 @@ We could rewrite this to
1166511665
do0(); // preparation: does not need lock
1166611666
my_lock.lock();
1166711667
do1(); // transaction: needs locking
11668-
my_lock.unluck();
11668+
my_lock.unlock();
1166911669
do2(); // cleanup: does not need locking
1167011670
}
1167111671

0 commit comments

Comments
 (0)