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.

0 commit comments

Comments
 (0)