Skip to content

Commit 61b3cee

Browse files
authored
Replace term "sample" with "example" for warning references in range [C4831, C4940]
1 parent 14e0b60 commit 61b3cee

25 files changed

+31
-31
lines changed

docs/error-messages/compiler-warnings/c4834.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To turn off the warning for an entire project in the Visual Studio IDE:
3030

3131
## Example
3232

33-
This sample generates C4834, and shows four ways to fix it:
33+
This example generates C4834, and shows four ways to fix it:
3434

3535
```cpp
3636
// C4834.cpp

docs/error-messages/compiler-warnings/c4843.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This warning is new in Visual Studio 2017 version 15.5. For information on how t
1717

1818
## Example
1919

20-
This sample shows several **`catch`** statements that cause C4843:
20+
This example shows several **`catch`** statements that cause C4843:
2121

2222
```cpp
2323
// C4843_warning.cpp

docs/error-messages/compiler-warnings/c4866.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ This warning was introduced in Visual Studio 2017 version 15.9 as a result of co
2525

2626
To resolve this warning, first consider whether left-to-right evaluation of the operator elements is necessary, such as when evaluation of the elements might produce order-dependent side-effects. In many cases, the order in which elements are evaluated does not have an observable effect.
2727

28-
If the order of evaluation must be left-to-right, consider whether you can pass the elements by **`const`** reference instead. This change eliminates the warning in the following code sample.
28+
If the order of evaluation must be left-to-right, consider whether you can pass the elements by **`const`** reference instead. This change eliminates the warning in the following code example.
2929

3030
## Example
3131

32-
This sample generates C4866, and shows a way to fix it:
32+
This example generates C4866, and shows a way to fix it:
3333

3434
```cpp
3535
// C4866.cpp

docs/error-messages/compiler-warnings/compiler-warning-c4867.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This warning is always issued as an error. Use the [warning](../../preprocessor/
2020

2121
## Example
2222

23-
The following sample generates C4867.
23+
The following example generates C4867.
2424

2525
```cpp
2626
// C4867.cpp

docs/error-messages/compiler-warnings/compiler-warning-c4868.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ This warning is off by default. Use `/Wall` to activate this warning.
2020

2121
To resolve this warning, first consider whether left-to-right evaluation of the initializer list elements is necessary, such as when evaluation of the elements might produce order-dependent side-effects. In many cases, the order in which elements are evaluated does not have an observable effect.
2222

23-
If the order of evaluation must be left-to-right, consider if it's possible to pass the elements by **`const`** reference instead. A change such as this eliminates the warning in the following code sample.
23+
If the order of evaluation must be left-to-right, consider if it's possible to pass the elements by **`const`** reference instead. A change such as this eliminates the warning in the following code example.
2424

2525
## Example
2626

27-
This sample generates C4868, and shows a way to fix it:
27+
This example generates C4868, and shows a way to fix it:
2828

2929
```cpp
3030
// C4868.cpp

docs/error-messages/compiler-warnings/compiler-warning-c4936.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ C4936 is always issued as an error. You can disable C4936 with the [warning](..
2222

2323
## Example
2424

25-
The following sample generates C4936:
25+
The following example generates C4936:
2626

2727
```cpp
2828
// C4936.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4835.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ When accessing data between managed components, it is recommended that you not u
1616

1717
## Examples
1818

19-
The following sample generates C4835.
19+
The following example generates C4835.
2020

2121
```cpp
2222
// C4835.cpp
@@ -28,7 +28,7 @@ __declspec(dllexport) int m = f(); // C4835
2828
__declspec(dllexport) int *p = &n; // C4835
2929
```
3030
31-
The following sample consumes the component built in the previous sample, showing that the value of the variables is not as expected.
31+
The following example consumes the component built in the previous example, showing that the value of the variables is not as expected.
3232
3333
```cpp
3434
// C4835_b.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4838.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A narrowing conversion can be okay when you know the possible range of converted
2020

2121
## Example
2222

23-
The following sample generates C4838 and shows one way to fix it:
23+
The following example generates C4838 and shows one way to fix it:
2424

2525
```cpp
2626
// C4838.cpp -- C++ narrowing conversion diagnostics

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4905.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](
1818

1919
## Example
2020

21-
The following sample generates C4905.
21+
The following example generates C4905.
2222

2323
```cpp
2424
// C4905.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4906.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](
1818

1919
## Example
2020

21-
The following sample generates C4906:
21+
The following example generates C4906:
2222

2323
```cpp
2424
// C4906.cpp

0 commit comments

Comments
 (0)