Skip to content

Commit da2ea07

Browse files
author
mtx48109
committed
cpp formatting review pr20
1 parent 4dd72c1 commit da2ea07

30 files changed

+56
-84
lines changed

docs/cpp/multiplicative-operators-and-the-modulus-operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int main() {
7777
}
7878
```
7979

80-
## See Also
80+
## See also
8181
[Expressions with Binary Operators](../cpp/expressions-with-binary-operators.md)
8282
[C++ Built-in Operators, Precedence and Associativity](../cpp/cpp-built-in-operators-precedence-and-associativity.md)
8383
[C Multiplicative Operators](../c-language/c-multiplicative-operators.md)

docs/cpp/mutable-data-members-cpp.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ This keyword can only be applied to non-static and non-const data members of a c
1818
## Syntax
1919

2020
```
21-
2221
mutable member-variable-declaration;
2322
```
2423

@@ -45,5 +44,5 @@ int main()
4544
}
4645
```
4746

48-
## See Also
47+
## See also
4948
[Keywords](../cpp/keywords-cpp.md)

docs/cpp/naked-cpp.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ __declspec(naked) declarator
2929

3030
The compiler cannot generate an inline function for a function marked with the naked attribute, even if the function is also marked with the [__forceinline](inline-functions-cpp.md) keyword.
3131

32-
3332
The compiler issues an error if the **naked** attribute is applied to anything other than the definition of a non-member method.
3433

3534
## Examples
@@ -61,7 +60,7 @@ __declspec( naked ) int func(); // Error--naked attribute not permitted on func
6160

6261
**END Microsoft Specific**
6362

64-
## See Also
63+
## See also
6564
[__declspec](../cpp/declspec.md)
6665
[Keywords](../cpp/keywords-cpp.md)
6766
[Naked Function Calls](../cpp/naked-function-calls.md)

docs/cpp/naked-function-calls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ ms.workload: ["cplusplus"]
2525

2626
**END Microsoft Specific**
2727

28-
## See Also
28+
## See also
2929
[Calling Conventions](../cpp/calling-conventions.md)

docs/cpp/name-resolution-for-dependent-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int main()
8484
8585
### Output
8686
87-
```
87+
```Output
8888
Int MyNamespace::myFunction
8989
```
9090

@@ -120,5 +120,5 @@ int main() {
120120
121121
Conformance with the disambiguation rules is required because, by default, C++ assumes that `AY::Rebind` isn't a template, and so the compiler interprets the following "`<`" as a less-than. It has to know that `Rebind` is a template so that it can correctly parse "`<`" as an angle bracket.
122122
123-
## See Also
123+
## See also
124124
[Name Resolution](../cpp/templates-and-name-resolution.md)

docs/cpp/name-resolution-for-locally-declared-names.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,5 @@ Base
163163
1
164164
```
165165

166-
## See Also
167-
168-
[Name Resolution](../cpp/templates-and-name-resolution.md)
166+
## See also
167+
[Name Resolution](../cpp/templates-and-name-resolution.md)

docs/cpp/namespaces-cpp.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ ContosoData::Func(mgr);
4343
using ContosoData::ObjectManager;
4444
ObjectManager mgr;
4545
mgr.DoSomething();
46-
4746
```
4847

4948
Use a using directive to bring everything in the namespace into scope:
@@ -54,7 +53,6 @@ using namespace ContosoData;
5453
ObjectManager mgr;
5554
mgr.DoSomething();
5655
Func(mgr);
57-
5856
```
5957
6058
## <a id="using_directives"></a> using directives
@@ -75,11 +73,10 @@ namespace ContosoDataServer
7573
{
7674
void Foo();
7775
int Bar();
78-
7976
}
8077
```
8178

82-
Function implementations in contosodata.cpp should use the fully qualified name, even if you place a `using` directive at the top of the file:
79+
Function implementations in contosodata.cpp should use the fully qualified name, even if you place a **using** directive at the top of the file:
8380

8481
```cpp
8582
#include "contosodata.h"
@@ -138,7 +135,6 @@ namespace ContosoDataServer
138135

139136
int Bar(){...};
140137
int Baz(int i) { return Details::CountImpl; }
141-
142138
}
143139
```
144140

@@ -195,7 +191,6 @@ namespace Parent
195191
template<>
196192
class C<int> {};
197193
}
198-
199194
```
200195

201196
You can use inline namespaces as a versioning mechanism to manage changes to the public interface of a library. For example, you can create a single parent namespace, and encapsulate each version of the interface in its own namespace nested inside the parent. The namespace that holds the most recent or preferred version is qualified as inline, and is therefore exposed as if it were a direct member of the parent namespace. Client code that invokes the Parent::Class will automatically bind to the new code. Clients that prefer to use the older version can still access it by using the fully qualified path to the nested namespace that has that code.
@@ -236,7 +231,6 @@ namespace Contoso
236231
};
237232
}
238233
}
239-
240234
```
241235
242236
## <a id="namespace_aliases"></a> Namespace aliases
@@ -246,7 +240,6 @@ namespace Contoso
246240
namespace a_very_long_namespace_name { class Foo {}; }
247241
namespace AVLNN = a_very_long_namespace_name;
248242
void Bar(AVLNN::Foo foo){ }
249-
250243
```
251244

252245
## anonymous or unnamed namespaces
@@ -261,5 +254,5 @@ namespace
261254

262255
This is called an unnamed or anonymous namespace and it is useful when you want to make variable declarations invisible to code in other files (i.e. give them internal linkage) without having to create a named namespace. All code in the same file can see the identifiers in an unnamed namespace but the identifiers, along with the namespace itself, are not visible outside that file—or more precisely outside the translation unit.
263256

264-
## See Also
265-
[Declarations and Definitions](declarations-and-definitions-cpp.md)
257+
## See also
258+
[Declarations and Definitions](declarations-and-definitions-cpp.md)

docs/cpp/nested-class-declarations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,5 +197,5 @@ int GetExtendedErrorStatus( char *message )
197197
198198
With the preceding interface, several classes can use the services of this function by passing a memory location where they want the error message copied.
199199
200-
## See Also
200+
## See also
201201
[Classes and Structs](../cpp/classes-and-structs-cpp.md)

docs/cpp/new-and-delete-operators.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ void operator delete( void * );
138138
void operator delete( void *, size_t );
139139
```
140140

141-
Only one of the preceding two forms can be present for a given class. The first form takes a single argument of type **void \***, which contains a pointer to the object to deallocate. The second form—sized deallocation—takes two arguments, the first of which is a pointer to the memory block to deallocate and the second of which is the number of bytes to deallocate. The return type of both forms is **void** (**operator delete** cannot return a value).
141+
Only one of the preceding two forms can be present for a given class. The first form takes a single argument of type `void *`, which contains a pointer to the object to deallocate. The second form—sized deallocation—takes two arguments, the first of which is a pointer to the memory block to deallocate and the second of which is the number of bytes to deallocate. The return type of both forms is **void** (**operator delete** cannot return a value).
142142

143143
The intent of the second form is to speed up searching for the correct size category of the object to be deleted, which is often not stored near the allocation itself and likely uncached; the second form is particularly useful when an **operator delete** function from a base class is used to delete an object of a derived class.
144144

145-
The **operator delete** function is static; therefore, it cannot be virtual. The `operator delete` function obeys access control, as described in [Member-Access Control](../cpp/member-access-control-cpp.md).
145+
The **operator delete** function is static; therefore, it cannot be virtual. The **operator delete** function obeys access control, as described in [Member-Access Control](../cpp/member-access-control-cpp.md).
146146

147147
The following example shows user-defined **operator new** and **operator delete** functions designed to log allocations and deallocations of memory:
148148

@@ -214,5 +214,4 @@ void f() {
214214
X *pX = new X[5];
215215
delete [] pX;
216216
}
217-
```
218-
217+
```

docs/cpp/new-operator-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ T *TObject =::new TObject;
245245

246246
The scope-resolution operator (`::`) forces use of the global **new** operator.
247247

248-
## See Also
248+
## See also
249249
[Expressions with Unary Operators](../cpp/expressions-with-unary-operators.md)
250250
[Keywords](../cpp/keywords-cpp.md)
251251
[new and delete operators](../cpp/new-and-delete-operators.md)

0 commit comments

Comments
 (0)