Skip to content

Commit 725a2eb

Browse files
committed
More typo fixes
1 parent 772fb4b commit 725a2eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Docs/Migrating C++ CX source code to C++ WinRT.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ First let's look at how to get property values. Here's the C++/CX code:
7878
7979
auto id = record->XboxUserId;
8080
81-
auto state = record->UserState,
81+
auto state = record->UserState;
8282
8383
auto size = record->PresenceDeviceRecords->Size;
8484
@@ -92,7 +92,7 @@ The equivalent C++/WinRT source code to retrieve the value for a Windows Runtime
9292

9393
auto id = record.XboxUserId();
9494

95-
auto state = record.UserState(),
95+
auto state = record.UserState();
9696

9797
auto size = record.PresenceDeviceRecords().Size();
9898

@@ -197,7 +197,7 @@ When we allocate the structure, let's use a different constructor for the 'mySet
197197
198198
This change invokes the PropertySet(nullptr\_t) constructor rather than the PropertySet() default constructor. The nullptr\_t constructor does not call into the Windows Runtime to create the backing type. Instead, the 'mySet' field is not connected to any backing object until you assign it a value.
199199
200-
Whenever you want to lazily initialize a C++/WinRT class variable, assign nullptr to the value when declaring the instance. Later you can then assign the appropriately constructed object to the variable.
200+
Whenever you want to lazily initialize a C++/WinRT class variable, assign nullptr to the value when declaring the instance. Later you can assign the appropriately constructed object to the variable.
201201
202202
Just say no to 'ref new'
203203
------------------------
@@ -297,7 +297,7 @@ As described previously, such a field declaration invokes the default constructo
297297

298298
But the XboxLiveContext class has no default constructor. It has a constructor that requires a User object parameter to the constructor. And we won't have the necessary User object until later, when we make the assignment to the field.
299299

300-
How can I tell the compile to \*not\* use the default constructor? The same as shown previously. Assign nullptr to the field:
300+
How can I tell the compiler to \*not\* use the default constructor? The same as shown previously. Assign nullptr to the field:
301301

302302
```C++
303303
class Sample : . . . {
@@ -603,7 +603,7 @@ to
603603
task<adapter> const & resultTask
604604
```
605605

606-
Eliminating the hat and const reference changes, already discussed, we simply changed task&lt;XboxSocialRelationShipResult&gt; to task&lt;adapter&gt;.
606+
Eliminating the hat and const reference changes, already discussed, we simply changed task&lt;XboxSocialRelationshipResult&gt; to task&lt;adapter&gt;.
607607

608608
Why? Unfortunately, the current implementation of PPL does not support types without a default constructor. As described previously, many Windows Runtime types do not have a default constructor. As such, the C++/WinRT projection of those types also do not have a default constructor. Therefore, these projected types don't work, as is, with PPL.
609609

0 commit comments

Comments
 (0)