Skip to content

Commit e89e164

Browse files
authored
Merge pull request MicrosoftDocs#5131 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main)
2 parents 7d1200d + 803b891 commit e89e164

File tree

53 files changed

+96
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+96
-91
lines changed

docs/atl-mfc-shared/cstring-argument-passing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ When you define a class interface, you must determine the argument-passing conve
1414

1515
## <a name="_core_strings_as_function_inputs"></a> Strings as Function Inputs
1616

17-
The most efficient and secure way to use a `CString` object in called functions is to pass a `CString` object to the function. Despite the name, a `CString` object doesn't store a string internally as a C-style string that has a `NULL` terminator. Instead, a `CString` object keeps careful track of the number of characters it has. Having `CString` provide a `LPCTSTR` pointer to a `NULL`-terminated string is a small amount of work that can become significant if your code has to do it constantly. The result is temporary because any change to the `CString` contents invalidates old copies of the `LPCTSTR` pointer.
17+
The most efficient and secure way to use a `CString` object in called functions is to pass a `CString` object to the function. Despite the name, a `CString` object doesn't store a string internally as a C-style string that has a `NULL` terminator. Instead, a `CString` object keeps careful track of the number of characters it has. Having `CString` provide an `LPCTSTR` pointer to a `NULL`-terminated string is a small amount of work that can become significant if your code has to do it constantly. The result is temporary because any change to the `CString` contents invalidates old copies of the `LPCTSTR` pointer.
1818

1919
It does make sense in some cases to provide a C-style string. For example, there can be a situation where a called function is written in C and doesn't support objects. In this case, coerce the `CString` parameter to `LPCTSTR`, and the function will get a C-style `NULL`-terminated string. You can also go the other direction and create a `CString` object by using the `CString` constructor that accepts a C-style string parameter.
2020

docs/atl-mfc-shared/exporting-string-classes-using-cstringt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To resolve this problem, do the following:
2727

2828
Export `CStringA` and `CStringW` (and the necessary base classes) from MFC90.DLL. Projects that include MFC will always use the MFC DLL exported `CStringA` and `CStringW`, as in previous MFC implementations.
2929

30-
Then create a exportable derived class using the `CStringT` template, as `CStringT_Exported` is below, for example:
30+
Then create an exportable derived class using the `CStringT` template, as `CStringT_Exported` is below, for example:
3131

3232
[!code-cpp[NVC_MFC_DLL#7](../atl-mfc-shared/codesnippet/cpp/exporting-string-classes-using-cstringt_2.cpp)]
3333

docs/atl-mfc-shared/reference/classes-shared-by-mfc-and-atl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following table lists the classes shared between MFC and ATL.
2121
|[CRect](../../atl-mfc-shared/reference/crect-class.md)|A class similar to a Windows [RECT](/windows/win32/api/windef/ns-windef-rect) structure that also includes member functions to manipulate `CRect` objects and Windows `RECT` structures.|atltypes.h|
2222
|[CSimpleStringT](../../atl-mfc-shared/reference/csimplestringt-class.md)|Represents a `CSimpleStringT` object.|atlsimpstr.h|
2323
|[CSize](../../atl-mfc-shared/reference/csize-class.md)|A class similar to the Windows [SIZE](/windows/win32/api/windef/ns-windef-size) structure, which implements a relative coordinate or position.|atltypes.h|
24-
|[CStrBufT](../../atl-mfc-shared/reference/cstrbuft-class.md)|Provides automatic resource cleanup for `GetBuffer` and `ReleaseBuffer` calls on a existing `CStringT` object.|atlsimpstr.h|
24+
|[CStrBufT](../../atl-mfc-shared/reference/cstrbuft-class.md)|Provides automatic resource cleanup for `GetBuffer` and `ReleaseBuffer` calls on an existing `CStringT` object.|atlsimpstr.h|
2525
|[CStringData](../../atl-mfc-shared/reference/cstringdata-class.md)|Represents the data of a string object.|atlsimpstr.h|
2626
|[CStringT](../../atl-mfc-shared/reference/cstringt-class.md)|Represents a `CStringT` object.|cstringt.h (MFC dependent) atlstr.h (MFC independent)|
2727
|[CTime](../../atl-mfc-shared/reference/ctime-class.md)|Represents an absolute time and date.|atltime.h|

docs/build/open-folder-projects-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This configuration inherits the environment variables of the Visual Studio [x64
7474
7575
## Default configuration for MinGW-w64
7676

77-
If you add the MinGW-W64 configuration, the JSON looks this this:
77+
If you add the MinGW-W64 configuration, the JSON looks this:
7878

7979
```json
8080
{

docs/build/reference/filealign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.assetid: c1017a35-8d71-4ad9-934b-a3e3ea037fa0
88
---
99
# /FILEALIGN (Align sections in files)
1010

11-
The **/FILEALIGN** linker option lets you specify the alignment of sections written to your output file as a multiple of an specified size.
11+
The **/FILEALIGN** linker option lets you specify the alignment of sections written to your output file as a multiple of a specified size.
1212

1313
## Syntax
1414

docs/build/walkthrough-build-debug-wsl2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ If you have a MSBuild-based Linux project, then you can upgrade to the WSL 2 too
128128

129129
If you're targeting a WSL 2 distribution and you don't want to use the WSL 2 toolset, then in the **Platform Toolset** dropdown, select the **GCC for Windows Subsystem for Linux** or **Clang for Windows Subsystem for Linux** toolset. If either of these toolsets are selected, Visual Studio won't maintain a copy of your source files in the WSL file system and will instead access source files over the mounted Windows drive (`/mnt/`…). System headers are still automatically copied to the Windows file system to provide a native IntelliSense experience. Customize the headers that are included or excluded from this copy in **Property Pages** > **General**.
130130

131-
In most cases, it's best to use the WSL 2 toolset with WSL 2 distributions because WSL 2 is slower when project files are stored in the Windows file system. To to learn more, see [Comparing WSL 1 and WSL 2](/windows/wsl/compare-versions).
131+
In most cases, it's best to use the WSL 2 toolset with WSL 2 distributions because WSL 2 is slower when project files are stored in the Windows file system. To learn more, see [Comparing WSL 1 and WSL 2](/windows/wsl/compare-versions).
132132
133133
## See also
134134

docs/c-language/escape-sequences.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Note that the question mark preceded by a backslash (**\\?**) specifies a litera
3434

3535
**Microsoft Specific**
3636

37-
If a backslash precedes a character that does not appear in the table, the compiler handles the undefined character as the character itself. For example, `\c` is treated as an `c`.
37+
If a backslash precedes a character that does not appear in the table, the compiler handles the undefined character as the character itself. For example, `\c` is treated as a `c`.
3838

3939
**END Microsoft Specific**
4040

docs/code-quality/c26444.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ An unnamed variable declaration creates a temporary object that is discarded at
1818
## Remarks
1919

2020
- This rule detects types with a hand-written destructor or a compiler-generated destructor that transitively calls a hand-written destructor.
21-
- This rule can flag code that invokes a nontrivial constructor of a RAII type.
21+
- This rule can flag code that invokes a nontrivial constructor of an RAII type.
2222
- The logic skips temporaries if they're used in higher-level expressions. One example is temporaries that are passed as arguments or used to invoke a function.
2323

2424
Code analysis name: `NO_UNNAMED_RAII_OBJECTS`

docs/code-quality/using-the-cpp-core-guidelines-checkers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Because of the way the code analysis rules get loaded within Visual Studio 2015,
321321

322322
1. Select the Microsoft.CppCoreCheck package and then choose the **Install** button to add the rules to your project.
323323

324-
The NuGet package adds a MSBuild *`.targets`* file to your project that is invoked when you enable code analysis on your project. The *`.targets`* file adds the C++ Core Check rules as another extension to the Visual Studio Code analysis tool. When the package is installed, you can use the Property Pages dialog to enable or disable the released and experimental rules.
324+
The NuGet package adds an MSBuild *`.targets`* file to your project that is invoked when you enable code analysis on your project. The *`.targets`* file adds the C++ Core Check rules as another extension to the Visual Studio Code analysis tool. When the package is installed, you can use the Property Pages dialog to enable or disable the released and experimental rules.
325325

326326
::: moniker-end
327327

docs/code-quality/walkthrough-analyzing-c-cpp-code-for-defects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ In this walkthrough, you'll:
9090

9191
C6230: Implicit cast between semantically different types: using HRESULT in a Boolean context.
9292

93-
The code editor displays the line that caused the warning inside the function `bool ProcessDomain()`. This warning indicates that a `HRESULT` is being used in an 'if' statement where a Boolean result is expected. It's typically a mistake, because when the `S_OK` HRESULT is returned from a function it indicates success, but when converted into a boolean value it evaluates to **`false`**.
93+
The code editor displays the line that caused the warning inside the function `bool ProcessDomain()`. This warning indicates that an `HRESULT` is being used in an 'if' statement where a Boolean result is expected. It's typically a mistake, because when the `S_OK` HRESULT is returned from a function it indicates success, but when converted into a boolean value it evaluates to **`false`**.
9494

9595
1. Correct this warning by using the `SUCCEEDED` macro, which converts to **`true`** when a `HRESULT` return value indicates success. Your code should resemble the following code:
9696

0 commit comments

Comments
 (0)