Skip to content

Commit 9072050

Browse files
Merge pull request #5393 from Rageking8/remove-superfluous-semicolons-after-function-definition
Remove superfluous semicolons after function definition
2 parents bae60e9 + 39135ed commit 9072050

26 files changed

+89
-105
lines changed

docs/cpp/function-overloading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn more about: Function Overloading"
32
title: "Function Overloading"
3+
description: "Learn more about: Function Overloading"
44
ms.date: 02/01/2023
55
helpviewer_keywords: ["function overloading [C++], about function overloading", "function overloading", "declaring functions [C++], overloading"]
66
---
@@ -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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
description: "Learn more about: Overload resolution of function template calls"
32
title: "Overload resolution of function template calls"
3+
description: "Learn more about: Overload resolution of function template calls"
44
ms.date: 09/27/2022
55
helpviewer_keywords: ["function templates overload resolution"]
6-
ms.assetid: a2918748-2cbb-4fc6-a176-e256f120bee4
76
---
87
# Overload resolution of function template calls
98

@@ -26,7 +25,7 @@ template <class T1, class T2>
2625
void f(T1, T2)
2726
{
2827
cout << "void f(T1, T2)" << endl;
29-
};
28+
}
3029

3130
int main()
3231
{
@@ -58,7 +57,7 @@ template <class T1, class T2>
5857
void f(T1, T2)
5958
{
6059
cout << "void f(T1, T2)" << endl;
61-
};
60+
}
6261

6362
int main()
6463
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "How to: Access Characters in a System::String"
33
description: "Learn more about: How to: Access Characters in a System::String"
4+
ms.date: 11/04/2016
45
ms.custom: "get-started-article"
5-
ms.date: "11/04/2016"
66
helpviewer_keywords: ["characters [C++], accessing in System::String", "examples [C++], strings", "strings [C++], accessing characters"]
77
---
88
# How to: Access Characters in a System::String
@@ -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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
description: "Learn more about: How to: Define and Use Delegates (C++/CLI)"
32
title: "How to: Define and Use Delegates (C++/CLI)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: How to: Define and Use Delegates (C++/CLI)"
4+
ms.date: 11/04/2016
55
helpviewer_keywords: ["delegates"]
6-
ms.assetid: 1cdf3420-89c1-47c0-b796-aa984020e0f8
76
---
87
# How to: Define and Use Delegates (C++/CLI)
98

@@ -442,7 +441,7 @@ int main() {
442441
Del^ d = gcnew Del(r1, &R::f);
443442
d += gcnew Del(&R::f);
444443
d(r2);
445-
};
444+
}
446445
```
447446
448447
**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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C2835"
32
title: "Compiler Error C2835"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2835"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2835"]
66
helpviewer_keywords: ["C2835"]
7-
ms.assetid: 41c70630-983f-4da2-8342-513cf48b0519
87
---
98
# Compiler Error C2835
109

@@ -22,12 +21,12 @@ public:
2221

2322
A() {
2423
v_char = 'A';
25-
};
24+
}
2625
operator char(char a) { // C2835
2726
// try the following line instead
2827
// operator char() {
2928
return v_char + 1;
30-
};
29+
}
3130
};
3231

3332
int main() {

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C3185"
32
title: "Compiler Error C3185"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3185"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3185"]
66
helpviewer_keywords: ["C3185"]
7-
ms.assetid: 5bf96279-043c-4981-9d02-b4550071b192
87
---
98
# Compiler Error C3185
109

@@ -25,5 +24,5 @@ int main() {
2524
Base ^pb = pd;
2625
const type_info & t1 = typeid(pb); // C3185
2726
System::Type ^ MyType = Base::typeid; // OK
28-
};
27+
}
2928
```

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C3536"
32
title: "Compiler Error C3536"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3536"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3536"]
66
helpviewer_keywords: ["C3536"]
7-
ms.assetid: 8d866075-866b-49eb-9979-ee27b308f7e3
87
---
98
# Compiler Error C3536
109

@@ -31,7 +30,7 @@ int main()
3130
auto* d = &d; //C3536
3231
auto& e = e; //C3536
3332
return 0;
34-
};
33+
}
3534
```
3635

3736
## See also

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C3672"
32
title: "Compiler Error C3672"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3672"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3672"]
66
helpviewer_keywords: ["C3672"]
7-
ms.assetid: da971041-1766-467a-aecf-1d8655c6cb7a
87
---
98
# Compiler Error C3672
109

@@ -22,7 +21,7 @@ template<typename T>
2221
void f(T* pT) {
2322
&pT->T::~T; // C3672
2423
pT->T::~T(); // OK
25-
};
24+
}
2625

2726
int main() {
2827
int i;

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4269"
32
title: "Compiler Warning (level 1) C4269"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4269"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4269"]
66
helpviewer_keywords: ["C4269"]
7-
ms.assetid: 96c97bbc-068a-4b65-8cd8-4ed5dca04c15
87
---
98
# Compiler Warning (level 1) C4269
109

@@ -24,7 +23,7 @@ public:
2423

2524
void g() {
2625
const X x1; // C4269
27-
};
26+
}
2827
```
2928
3029
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 3, off) C4191"
32
title: "Compiler Warning (level 3, off) C4191"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 3, off) C4191"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4191"]
66
helpviewer_keywords: ["C4191"]
77
---
@@ -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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 3) C4243"
32
title: "Compiler Warning (level 3) C4243"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 3) C4243"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4243"]
66
helpviewer_keywords: ["C4243"]
7-
ms.assetid: ca72f9ad-ce0b-43a9-a68c-106e1f8b90ef
87
---
98
# Compiler Warning (level 3) C4243
109

@@ -21,7 +20,7 @@ The following sample generates C4243:
2120
struct B {
2221
int f() {
2322
return 0;
24-
};
23+
}
2524
};
2625

2726
struct D : private B {};

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 4) C4205"
32
title: "Compiler Warning (level 4) C4205"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 4) C4205"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4205"]
66
helpviewer_keywords: ["C4205"]
7-
ms.assetid: 39b5108c-7230-41b4-b2fe-2293eb6aae28
87
---
98
# Compiler Warning (level 4) C4205
109

@@ -20,7 +19,7 @@ With Microsoft extensions (/Ze), **`static`** functions can be declared inside a
2019
void func1()
2120
{
2221
static int func2(); // C4205
23-
};
22+
}
2423

2524
int main()
2625
{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 4, off) C4254"
32
title: "Compiler Warning (level 4, off) C4254"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 4, off) C4254"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4254"]
66
helpviewer_keywords: ["C4254"]
77
---
@@ -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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Linker Tools Error LNK2020"
32
title: "Linker Tools Error LNK2020"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Linker Tools Error LNK2020"
4+
ms.date: 11/04/2016
55
f1_keywords: ["LNK2020"]
66
helpviewer_keywords: ["LNK2020"]
7-
ms.assetid: 4dd017d0-5e83-471b-ac8a-538ac1ed6870
87
---
98
# Linker Tools Error LNK2020
109

@@ -47,16 +46,16 @@ The following sample generates LNK2020.
4746
4847
template <typename T>
4948
ref struct Base {
50-
virtual void f1() {};
49+
virtual void f1() {}
5150
};
5251
5352
template <typename T>
5453
ref struct Base2 {
55-
virtual void f1() {};
54+
virtual void f1() {}
5655
};
5756
5857
int main() {
5958
Base<int>^ p; // LNK2020
6059
Base2<int>^ p2 = gcnew Base2<int>(); // OK
61-
};
60+
}
6261
```

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Linker Tools Error LNK2033"
32
title: "Linker Tools Error LNK2033"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Linker Tools Error LNK2033"
4+
ms.date: 11/04/2016
55
f1_keywords: ["LNK2033"]
66
helpviewer_keywords: ["LNK2033"]
7-
ms.assetid: d61db467-9328-4788-bf54-e2a20537f13f
87
---
98
# Linker Tools Error LNK2033
109

@@ -32,5 +31,5 @@ ref class B {};
3231
int main() {
3332
A ^ aa = nullptr;
3433
B ^ bb = nullptr; // OK
35-
};
34+
}
3635
```

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: How to: Declare Interior Pointers with the const Keyword (C++/CLI)"
32
title: "How to: Declare Interior Pointers with the const Keyword (C++/CLI)"
4-
ms.date: "10/12/2018"
3+
description: "Learn more about: How to: Declare Interior Pointers with the const Keyword (C++/CLI)"
4+
ms.date: 10/12/2018
55
ms.topic: "reference"
66
helpviewer_keywords: ["pointers, interior"]
7-
ms.assetid: 64e08b0e-9396-4046-ab51-8f6588f32330
87
---
98
# How to: Declare Interior Pointers with the const Keyword (C++/CLI)
109

@@ -69,7 +68,7 @@ int main() {
6968
G ^ const h_G2 = gcnew G; // interior pointers to this object cannot be dereferenced and changed
7069
h_G2->msg = "test";
7170
interior_ptr<String^ const> int_ptr_G2 = &(h_G->msg);
72-
};
71+
}
7372
```
7473
7574
## See also

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI)"
32
title: "How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI)"
4-
ms.date: "10/12/2018"
3+
description: "Learn more about: How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI)"
4+
ms.date: 10/12/2018
55
ms.topic: "reference"
66
helpviewer_keywords: ["Functions with interior and native pointers, overloading"]
7-
ms.assetid: d70df625-4aad-457c-84f5-70a0a290cc1f
87
---
98
# How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI)
109

@@ -49,7 +48,7 @@ int main() {
4948
G ^pG = gcnew G; // common language runtime heap
5049
f( &pS->i );
5150
f( &pG->i );
52-
};
51+
}
5352
```
5453
5554
```Output

0 commit comments

Comments
 (0)