Skip to content

Commit 3ce1c94

Browse files
authored
Remove superfluous semicolons after function definition
1 parent 05bdb64 commit 3ce1c94

26 files changed

+50
-50
lines changed

docs/cpp/function-overloading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public:
307307

308308
void Print( int i )
309309
{
310-
};
310+
}
311311

312312
UDC udc;
313313

docs/cpp/overload-resolution-of-function-template-calls.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ template <class T1, class T2>
2626
void f(T1, T2)
2727
{
2828
cout << "void f(T1, T2)" << endl;
29-
};
29+
}
3030

3131
int main()
3232
{
@@ -58,7 +58,7 @@ template <class T1, class T2>
5858
void f(T1, T2)
5959
{
6060
cout << "void f(T1, T2)" << endl;
61-
};
61+
}
6262

6363
int main()
6464
{

docs/dotnet/how-to-access-characters-in-a-system-string.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ size_t getlen(System::String ^ s) {
5353
// make sure it doesn't move during the unmanaged call
5454
pin_ptr<const wchar_t> pinchars = PtrToStringChars(s);
5555
return wcsnlen(pinchars, maxsize);
56-
};
56+
}
5757

5858
int main() {
5959
System::Console::WriteLine(getlen("testing"));

docs/dotnet/how-to-define-and-use-delegates-cpp-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ int main() {
442442
Del^ d = gcnew Del(r1, &R::f);
443443
d += gcnew Del(&R::f);
444444
d(r2);
445-
};
445+
}
446446
```
447447
448448
**Output**

docs/error-messages/compiler-errors-1/compiler-error-c2134.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following sample generates C2134:
1818
// compile with: /c
1919
int A() {
2020
return 42;
21-
};
21+
}
2222

2323
constexpr int B() {
2424
return A(); // Error C2134: 'A': call does not result in a constant expression.
@@ -31,7 +31,7 @@ Possible resolution:
3131
// C2134b.cpp
3232
constexpr int A() { // add constexpr to A, since it meets the requirements of constexpr.
3333
return 42;
34-
};
34+
}
3535

3636
constexpr int B() {
3737
return A(); // No error

docs/error-messages/compiler-errors-2/compiler-error-c2835.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ public:
2222

2323
A() {
2424
v_char = 'A';
25-
};
25+
}
2626
operator char(char a) { // C2835
2727
// try the following line instead
2828
// operator char() {
2929
return v_char + 1;
30-
};
30+
}
3131
};
3232

3333
int main() {

docs/error-messages/compiler-errors-2/compiler-error-c3185.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ int main() {
2525
Base ^pb = pd;
2626
const type_info & t1 = typeid(pb); // C3185
2727
System::Type ^ MyType = Base::typeid; // OK
28-
};
28+
}
2929
```

docs/error-messages/compiler-errors-2/compiler-error-c3536.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int main()
3131
auto* d = &d; //C3536
3232
auto& e = e; //C3536
3333
return 0;
34-
};
34+
}
3535
```
3636

3737
## See also

docs/error-messages/compiler-errors-2/compiler-error-c3672.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ template<typename T>
2222
void f(T* pT) {
2323
&pT->T::~T; // C3672
2424
pT->T::~T(); // OK
25-
};
25+
}
2626

2727
int main() {
2828
int i;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public:
2424

2525
void g() {
2626
const X x1; // C4269
27-
};
27+
}
2828
```
2929
3030
Since this instance of the class is generated on the stack, the initial value of `m_data` can be anything. Also, since it is a **`const`** instance, the value of `m_data` can never be changed.

docs/error-messages/compiler-warnings/compiler-warning-level-3-c4191.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ int main() {
4646

4747
fnptr1 fp3 = (fnptr1) &f2; // C4191
4848
fnptr2 fp4 = (fnptr2) &f1; // C4191
49-
};
49+
}
5050
```

docs/error-messages/compiler-warnings/compiler-warning-level-3-c4243.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following sample generates C4243:
2121
struct B {
2222
int f() {
2323
return 0;
24-
};
24+
}
2525
};
2626

2727
struct D : private B {};

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4205.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ With Microsoft extensions (/Ze), **`static`** functions can be declared inside a
2020
void func1()
2121
{
2222
static int func2(); // C4205
23-
};
23+
}
2424

2525
int main()
2626
{

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4254.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ int main() {
3131
x->a = 4;
3232
x->a = x->b; // OK
3333
x->b = x->a; // C4254
34-
};
34+
}
3535
```

docs/error-messages/tool-errors/linker-tools-error-lnk2020.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ The following sample generates LNK2020.
4747
4848
template <typename T>
4949
ref struct Base {
50-
virtual void f1() {};
50+
virtual void f1() {}
5151
};
5252
5353
template <typename T>
5454
ref struct Base2 {
55-
virtual void f1() {};
55+
virtual void f1() {}
5656
};
5757
5858
int main() {
5959
Base<int>^ p; // LNK2020
6060
Base2<int>^ p2 = gcnew Base2<int>(); // OK
61-
};
61+
}
6262
```

docs/error-messages/tool-errors/linker-tools-error-lnk2033.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ref class B {};
3232
int main() {
3333
A ^ aa = nullptr;
3434
B ^ bb = nullptr; // OK
35-
};
35+
}
3636
```

docs/extensions/how-to-declare-interior-pointers-with-the-const-keyword-cpp-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int main() {
6969
G ^ const h_G2 = gcnew G; // interior pointers to this object cannot be dereferenced and changed
7070
h_G2->msg = "test";
7171
interior_ptr<String^ const> int_ptr_G2 = &(h_G->msg);
72-
};
72+
}
7373
```
7474
7575
## See also

docs/extensions/how-to-overload-functions-with-interior-pointers-and-native-pointers-cpp-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int main() {
4949
G ^pG = gcnew G; // common language runtime heap
5050
f( &pS->i );
5151
f( &pG->i );
52-
};
52+
}
5353
```
5454
5555
```Output

docs/extensions/pin-ptr-cpp-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ int main() {
164164

165165
k = l; // ok
166166
Console::WriteLine(*k);
167-
};
167+
}
168168
```
169169
170170
```Output

docs/extensions/string-cpp-component-extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ The following sample shows that the compiler distinguishes between native string
210210
using namespace System;
211211
int func() {
212212
throw "simple string"; // const char *
213-
};
213+
}
214214

215215
int func2() {
216216
throw "string" + "string"; // returns System::String
217-
};
217+
}
218218

219219
template<typename T>
220220
void func3(T t) {

docs/overview/cpp-conformance-improvements-2019.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,14 +1934,14 @@ C++20 doesn't support coroutines with a return type that includes a placeholder
19341934
auto my_generator() {
19351935
...
19361936
co_yield next;
1937-
};
1937+
}
19381938
19391939
// /std:c++latest
19401940
#include <experimental/generator>
19411941
std::experimental::generator<int> my_generator() {
19421942
...
19431943
co_yield next;
1944-
};
1944+
}
19451945
```
19461946

19471947
#### Return type of `return_value`

docs/standard-library/auto-ptr-class.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@ public:
134134
cout << "Constructing " << ( void* )this << endl;
135135
x = i;
136136
bIsConstructed = true;
137-
};
137+
}
138138
~Int( )
139139
{
140140
cout << "Destructing " << ( void* )this << endl;
141141
bIsConstructed = false;
142-
};
142+
}
143143
Int &operator++( )
144144
{
145145
x++;
146146
return *this;
147-
};
147+
}
148148
int x;
149149
private:
150150
bool bIsConstructed;
@@ -211,11 +211,11 @@ public:
211211
{
212212
x = i;
213213
cout << "Constructing " << ( void* )this << " Value: " << x << endl;
214-
};
214+
}
215215
~Int( )
216216
{
217217
cout << "Destructing " << ( void* )this << " Value: " << x << endl;
218-
};
218+
}
219219

220220
int x;
221221

@@ -377,7 +377,7 @@ public:
377377
int m_i;
378378
};
379379
void f(auto_ptr<C> arg) {
380-
};
380+
}
381381
int main()
382382
{
383383
const auto_ptr<C> ciap(new C(1));
@@ -433,10 +433,10 @@ public:
433433
{
434434
x = i;
435435
cout << "Constructing " << (void*)this << " Value: " << x << endl;
436-
};
436+
}
437437
~Int() {
438438
cout << "Destructing " << (void*)this << " Value: " << x << endl;
439-
};
439+
}
440440

441441
int x;
442442

@@ -493,11 +493,11 @@ public:
493493
{
494494
x = i;
495495
cout << "Constructing " << (void*)this << " Value: " << x << endl;
496-
};
496+
}
497497
~Int()
498498
{
499499
cout << "Destructing " << (void*)this << " Value: " << x << endl;
500-
};
500+
}
501501
502502
int x;
503503
};

docs/standard-library/money-get-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ int main( )
241241
else
242242
cout << "money_get(" << psz2.str( ) << ", intl = 0) = "
243243
<< fVal/100.0 << endl;
244-
};
244+
}
245245
```
246246
247247
## <a name="iter_type"></a> money_get::iter_type

docs/standard-library/moneypunct-class.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ int main( )
119119

120120
const moneypunct < char, false> &mpunct2 = use_facet < moneypunct < char, false> >(loc);
121121
cout << loc.name( ) << " domestic currency symbol "<< mpunct2.curr_symbol( ) << endl;
122-
};
122+
}
123123
```
124124
125125
## <a name="decimal_point"></a> moneypunct::decimal_point
@@ -593,7 +593,7 @@ int main( )
593593
use_facet <moneypunct <char, false> >(loc2);
594594
cout << loc2.name( ) << " domestic negative sign: "
595595
<< mpunct4.negative_sign( ) << endl;
596-
};
596+
}
597597
```
598598
599599
```Output
@@ -703,7 +703,7 @@ int main( )
703703
use_facet <moneypunct <char, false> >(loc2);
704704
cout << loc2.name( ) << " domestic positive sign:"
705705
<< mpunct4.positive_sign( ) << endl;
706-
};
706+
}
707707
```
708708
709709
```Output

docs/standard-library/numpunct-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ int main( )
107107
npunct.decimal_point( ) << endl;
108108
cout << loc.name( ) << " thousands separator "
109109
<< npunct.thousands_sep( ) << endl;
110-
};
110+
}
111111
```
112112
113113
```Output
@@ -378,7 +378,7 @@ int main( )
378378
npunct.decimal_point( ) << endl;
379379
cout << loc.name( ) << " thousands separator "
380380
<< npunct.thousands_sep( ) << endl;
381-
};
381+
}
382382
```
383383
384384
```Output

0 commit comments

Comments
 (0)