Skip to content

Commit cd72741

Browse files
committed
Fix acrolinx suggestions.
1 parent 28582ac commit cd72741

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

docs/code-quality/c26478.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ helpviewer_keywords: ["C26478"]
1313

1414
This warning is to indicate that the use of `std::move` not consistent with how `std::move` is intended to be used.
1515

16-
`const` objects cannot be moved, calling `std::move` on them has no effect. This pattern can result in unintended copies.
16+
`const` objects can't be moved, calling `std::move` on them has no effect. This pattern can result in unintended copies.
1717

1818
Code analysis name: `NO_MOVE_OP_ON_CONST`
1919

docs/code-quality/c26479.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ helpviewer_keywords: ["C26479"]
1111
1212
## Remarks
1313

14-
The compiler knows that the return statement is the last use of a local variable, so it will move out of the
15-
variable whenever possible. Adding a `std::move` is redundant in this scenario. Moreover, redundant `std::move`s
14+
The compiler knows that the return statement is the last use of a local variable, so it is using move semantics for
15+
returning the value whenever possible. Adding a `std::move` is redundant in this scenario. Moreover, redundant `std::move`s
1616
can prevent copy elision from happening.
1717

1818
Code analysis name: `NO_MOVE_RET_ON_LOCALS`

docs/code-quality/c26817.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ void less_expensive_function(std::vector<MyComplexType>& complex_vector_ref)
6565
}
6666
```
6767

68-
The **`const`** keyword makes the loop variable immutable. Use of a non-const reference may cause potentially unwanted side effects in the original container elements. If you need to modify only the local loop variable, the potentially expensive copying is unavoidable.
68+
The **`const`** keyword makes the loop variable immutable. Use of a non-const reference enables potentially unwanted side effects in the original container elements. If you need to modify only the local loop variable, the potentially expensive copying is unavoidable.

docs/code-quality/c26820.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ helpviewer_keywords: ["C26820"]
1111
1212
For more information, see [P.9: Don't waste time or space](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rp-waste) in the C++ Core Guidelines.
1313

14-
This check covers non-obvious and easy-to-miss behavior when assigning a reference to a variable marked **`auto`**. The type of the **`auto`** variable is resolved to a value rather than a reference, and an implicit copy is made.
14+
This check covers nonobvious and easy-to-miss behavior when assigning a reference to a variable marked **`auto`**. The type of the **`auto`** variable is resolved to a value rather than a reference, and an implicit copy is made.
1515

1616
## Remarks
1717

docs/code-quality/how-to-specify-additional-code-information-by-using-analysis-assume.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ helpviewer_keywords:
1010
---
1111
# How to specify additional code information by using `_Analysis_assume_`
1212

13-
You can provide hints to the code analysis tool for C/C++ code that will help the analysis process and reduce warnings. To provide additional information, use the following function macro:
13+
You can provide hints to the code analysis tool for C/C++ code that help the analysis process and reduce warnings. To provide additional information, use the following function macro:
1414

1515
`_Analysis_assume_( expr )`
1616

@@ -44,7 +44,7 @@ void test()
4444
}
4545
```
4646
47-
Note that `_Analysis_assume_` should be used as a last resort, we should first try to make the contracts of the functions more precise. In this case we could improve the contract of `FreeAndNull` instead of using `_Analysis_assume_`:
47+
`_Analysis_assume_` should be used as a last resort, we should first try to make the contracts of the functions more precise. In this case we could improve the contract of `FreeAndNull` instead of using `_Analysis_assume_`:
4848
4949
```cpp
5050
#include <windows.h>

0 commit comments

Comments
 (0)