mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-18 13:14:40 +03:00
Fix minor typos (#2022)
* Fix minor typos Fix minor typos * Update isocpp.dic
This commit is contained in:
@@ -1070,7 +1070,7 @@ There are several more performance bugs and gratuitous complication.
|
|||||||
}
|
}
|
||||||
|
|
||||||
This is actually an example from production code.
|
This is actually an example from production code.
|
||||||
We can see that in our condition we have `i < strlen(s)`. This expression will be evaluated on every iteration of the loop, which means that `strlen` must walk through string every loop to discover its length. While the string contents are changing, it's assumed that `toLower` will not affect the length of the string, so it's better to cache the length outside the loop and not incur that cost each iteration.
|
We can see that in our condition we have `i < strlen(s)`. This expression will be evaluated on every iteration of the loop, which means that `strlen` must walk through string every loop to discover its length. While the string contents are changing, it's assumed that `tolower` will not affect the length of the string, so it's better to cache the length outside the loop and not incur that cost each iteration.
|
||||||
|
|
||||||
##### Note
|
##### Note
|
||||||
|
|
||||||
@@ -2376,7 +2376,7 @@ Parameter passing semantic rules:
|
|||||||
* [F.45: Don't return a `T&&`](#Rf-return-ref-ref)
|
* [F.45: Don't return a `T&&`](#Rf-return-ref-ref)
|
||||||
* [F.46: `int` is the return type for `main()`](#Rf-main)
|
* [F.46: `int` is the return type for `main()`](#Rf-main)
|
||||||
* [F.47: Return `T&` from assignment operators](#Rf-assignment-op)
|
* [F.47: Return `T&` from assignment operators](#Rf-assignment-op)
|
||||||
* [F.48: Don't `return std::move(local)`](#Rf-return-move-local)
|
* [F.48: Don't return `std::move(local)`](#Rf-return-move-local)
|
||||||
* [F.49: Don't return `const T`](#Rf-return-const)
|
* [F.49: Don't return `const T`](#Rf-return-const)
|
||||||
|
|
||||||
Other function rules:
|
Other function rules:
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ tmp
|
|||||||
TMP
|
TMP
|
||||||
tock
|
tock
|
||||||
TODO
|
TODO
|
||||||
toLower
|
tolower
|
||||||
toolchains
|
toolchains
|
||||||
TotallyOrdered
|
TotallyOrdered
|
||||||
TP
|
TP
|
||||||
|
|||||||
Reference in New Issue
Block a user