Skip to content

Commit 0fe34ff

Browse files
committed
fix: ordered list
#4055
1 parent 3ae3d40 commit 0fe34ff

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

docs/atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@ In this step, you add functionality to the control and script the Web page to re
1515

1616
### To add control features
1717

18-
1. Open PolyCtl.cpp and replace the following code:
19-
20-
```cpp
21-
if (PtInRegion(hRgn, xPos, yPos))
22-
Fire_ClickIn(xPos, yPos);
23-
else
24-
Fire_ClickOut(xPos, yPos);
25-
```
26-
27-
with
28-
29-
```cpp
30-
short temp = m_nSides;
31-
if (PtInRegion(hRgn, xPos, yPos))
32-
{
33-
Fire_ClickIn(xPos, yPos);
34-
put_Sides(++temp);
35-
}
36-
else
37-
{
38-
Fire_ClickOut(xPos, yPos);
39-
put_Sides(--temp);
40-
}
41-
```
18+
Open PolyCtl.cpp and replace the following code:
19+
20+
```cpp
21+
if (PtInRegion(hRgn, xPos, yPos))
22+
Fire_ClickIn(xPos, yPos);
23+
else
24+
Fire_ClickOut(xPos, yPos);
25+
```
26+
27+
with
28+
29+
```cpp
30+
short temp = m_nSides;
31+
if (PtInRegion(hRgn, xPos, yPos))
32+
{
33+
Fire_ClickIn(xPos, yPos);
34+
put_Sides(++temp);
35+
}
36+
else
37+
{
38+
Fire_ClickOut(xPos, yPos);
39+
put_Sides(--temp);
40+
}
41+
```
4242

4343
The shape will now add or remove sides depending on where you click.
4444

docs/parallel/concrt/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,27 @@ This section describes how to use the `parallel_invoke` algorithm to perform the
3838

3939
1. Add a `#include` directive for the header file ppl.h.
4040

41-
[!code-cpp[concrt-parallel-bitonic-sort#10](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_2.cpp)]
41+
[!code-cpp[concrt-parallel-bitonic-sort#10](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_2.cpp)]
4242

4343
1. Add a **`using`** directive for the `concurrency` namespace.
4444

45-
[!code-cpp[concrt-parallel-bitonic-sort#11](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_3.cpp)]
45+
[!code-cpp[concrt-parallel-bitonic-sort#11](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_3.cpp)]
4646

4747
1. Create a new function, called `parallel_bitonic_mege`, which uses the `parallel_invoke` algorithm to merge the sequences in parallel if there is sufficient amount of work to do. Otherwise, call `bitonic_merge` to merge the sequences serially.
4848

49-
[!code-cpp[concrt-parallel-bitonic-sort#2](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_4.cpp)]
49+
[!code-cpp[concrt-parallel-bitonic-sort#2](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_4.cpp)]
5050

5151
1. Perform a process that resembles the one in the previous step, but for the `bitonic_sort` function.
5252

53-
[!code-cpp[concrt-parallel-bitonic-sort#3](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_5.cpp)]
53+
[!code-cpp[concrt-parallel-bitonic-sort#3](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_5.cpp)]
5454

5555
1. Create an overloaded version of the `parallel_bitonic_sort` function that sorts the array in increasing order.
5656

57-
[!code-cpp[concrt-parallel-bitonic-sort#4](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_6.cpp)]
57+
[!code-cpp[concrt-parallel-bitonic-sort#4](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_6.cpp)]
5858

59-
The `parallel_invoke` algorithm reduces overhead by performing the last of the series of tasks on the calling context. For example, in the `parallel_bitonic_sort` function, the first task runs on a separate context, and the second task runs on the calling context.
59+
The `parallel_invoke` algorithm reduces overhead by performing the last of the series of tasks on the calling context. For example, in the `parallel_bitonic_sort` function, the first task runs on a separate context, and the second task runs on the calling context.
6060

61-
[!code-cpp[concrt-parallel-bitonic-sort#5](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_7.cpp)]
61+
[!code-cpp[concrt-parallel-bitonic-sort#5](../../parallel/concrt/codesnippet/cpp/how-to-use-parallel-invoke-to-write-a-parallel-sort-routine_7.cpp)]
6262

6363
The following complete example performs both the serial and the parallel versions of the bitonic sort algorithm. The example also prints to the console the time that is required to perform each computation.
6464

0 commit comments

Comments
 (0)