Skip to content

Commit fe193da

Browse files
authored
Merge pull request #5521 from Rageking8/remove-more-superfluous-semicolons-after-function-definition
Remove more superfluous semicolons after function definition
2 parents 2220aff + 4cea282 commit fe193da

31 files changed

+97
-119
lines changed

docs/atl/codesnippet/CPP/atl-collection-classes_1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MyTraits : public CElementTraits< MyData >
2929
return true;
3030
else
3131
return false;
32-
};
32+
}
3333
};
3434

3535
void DoAtlCustomTraitsList()

docs/c-runtime-library/reference/get-purecall-handler-set-purecall-handler.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: _get_purecall_handler, _set_purecall_handler"
32
title: "_get_purecall_handler, _set_purecall_handler"
4-
ms.date: "1/14/2021"
3+
description: "Learn more about: _get_purecall_handler, _set_purecall_handler"
4+
ms.date: 1/14/2021
55
api_name: ["_set_purecall_handler", "_set_purecall_handler_m", "_get_purecall_handler"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_set_purecall_handler", "_set_purecall_handler_m", "set_purecall_handler_m", "set_purecall_handler", "stdlib/_set_purecall_handler", "stdlib/_get_purecall_handler", "_get_purecall_handler"]
1010
helpviewer_keywords: ["_set_purecall_handler function", "set_purecall_handler function", "purecall_handler", "set_purecall_handler_m function", "_purecall_handler", "_set_purecall_handler_m function", "_get_purecall_handler function"]
11-
ms.assetid: 2759b878-8afa-4129-86e7-72afc2153d9c
1211
---
1312
# `_get_purecall_handler`, `_set_purecall_handler`
1413

@@ -64,7 +63,7 @@ class CDerived;
6463
class CBase
6564
{
6665
public:
67-
CBase(CDerived *derived): m_pDerived(derived) {};
66+
CBase(CDerived *derived): m_pDerived(derived) {}
6867
~CBase();
6968
virtual void function(void) = 0;
7069

@@ -74,8 +73,8 @@ public:
7473
class CDerived : public CBase
7574
{
7675
public:
77-
CDerived() : CBase(this) {}; // C4355
78-
virtual void function(void) {};
76+
CDerived() : CBase(this) {} // C4355
77+
virtual void function(void) {}
7978
};
8079

8180
CBase::~CBase()

docs/code-quality/c28208.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: Warning C28208"
32
title: Warning C28208
3+
description: "Learn more about: Warning C28208"
44
ms.date: 10/03/2022
55
f1_keywords: ["C28208", "FUNCTION_TYPE_REDECLARATION", "__WARNING_FUNCTION_TYPE_REDECLARATION"]
66
helpviewer_keywords: ["C28208"]
7-
ms.assetid: e9a8ce37-3b05-4202-b078-5570ae496d1d
87
---
98
# Warning C28208
109

@@ -30,8 +29,8 @@ typedef void test_type(void*);
3029
#include "c28208_example.h"
3130
test_type my_test1;
3231
test_type my_test2;
33-
void my_test1(int* x){}; // Generates C28208
34-
void my_test2(void* x){}; // Doesn't generate C28208
32+
void my_test1(int* x){} // Generates C28208
33+
void my_test2(void* x){} // Doesn't generate C28208
3534
3635
int main()
3736
{

docs/cpp/class-templates.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
description: "Learn more about: Class Templates"
32
title: "Class Templates"
3+
description: "Learn more about: Class Templates"
44
ms.date: 06/30/2022
55
helpviewer_keywords: ["classes [C++], operating on type", "class templates", "templates, class templates"]
6-
ms.assetid: 633a53c8-24ee-4c23-8c88-e7c3cb0b7ac3
76
---
87
# Class Templates
98

@@ -28,15 +27,15 @@ public:
2827

2928
template< class T, int i > MyStack< T, i >::MyStack( void )
3029
{
31-
};
30+
}
3231

3332
template< class T, int i > void MyStack< T, i >::push( const T item )
3433
{
35-
};
34+
}
3635

3736
template< class T, int i > T& MyStack< T, i >::pop( void )
3837
{
39-
};
38+
}
4039

4140
int main()
4241
{

docs/cpp/decltype-cpp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn more about: decltype (C++)"
32
title: "decltype (C++)"
3+
description: "Learn more about: decltype (C++)"
44
ms.date: 09/14/2023
55
f1_keywords: ["decltype_cpp"]
66
helpviewer_keywords: ["operators [C++], decltype", "decltype operator", "operators [C++], type of an expression", "operators [C++], deduce expression type"]
@@ -60,7 +60,7 @@ In C++11, you can use the **`decltype`** type specifier on a trailing return typ
6060
6161
```cpp
6262
template<typename T, typename U>
63-
UNKNOWN func(T&& t, U&& u){ return t + u; };
63+
UNKNOWN func(T&& t, U&& u){ return t + u; }
6464
```
6565

6666
The introduction of the **`decltype`** type specifier enables a developer to obtain the type of the expression that the function template returns. Use the *alternative function declaration syntax* that is shown later, the **`auto`** keyword, and the **`decltype`** type specifier to declare a *late-specified* return type. The late-specified return type is determined when the declaration is compiled, instead of when it's coded.
@@ -75,12 +75,12 @@ In the following code example, the late-specified return type of the `myFunc` fu
7575
//C++11
7676
template<typename T, typename U>
7777
auto myFunc(T&& t, U&& u) -> decltype (forward<T>(t) + forward<U>(u))
78-
{ return forward<T>(t) + forward<U>(u); };
78+
{ return forward<T>(t) + forward<U>(u); }
7979

8080
//C++14
8181
template<typename T, typename U>
8282
decltype(auto) myFunc(T&& t, U&& u)
83-
{ return forward<T>(t) + forward<U>(u); };
83+
{ return forward<T>(t) + forward<U>(u); }
8484
```
8585
8686
## `decltype` and forwarding functions (C++11)

docs/cpp/explicit-specialization-of-function-templates.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: Explicit Specialization of Function Templates"
32
title: "Explicit Specialization of Function Templates"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Explicit Specialization of Function Templates"
4+
ms.date: 11/04/2016
55
helpviewer_keywords: ["overriding, functions", "function templates, specialization", "explicit specialization of function templates", "declaring functions [C++], specialization of function template", "specialization of function templates"]
6-
ms.assetid: eb0fcb73-eaed-42a1-9b83-14b055a34bf8
76
---
87
# Explicit Specialization of Function Templates
98

@@ -21,7 +20,7 @@ This declaration enables you to define a different function for **`double`** var
2120
// explicit_specialization.cpp
2221
template<class T> void f(T t)
2322
{
24-
};
23+
}
2524
2625
// Explicit specialization of f with 'char' with the
2726
// template argument explicitly specified:

docs/cpp/explicitly-defaulted-and-deleted-functions.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: Explicitly Defaulted and Deleted Functions"
32
title: "Explicitly Defaulted and Deleted Functions"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Explicitly Defaulted and Deleted Functions"
4+
ms.date: 11/04/2016
55
---
66
# Explicitly Defaulted and Deleted Functions
77

@@ -44,7 +44,7 @@ These rules can complicate the implementation of what should be straight-forward
4444
```cpp
4545
struct noncopyable
4646
{
47-
noncopyable() {};
47+
noncopyable() {}
4848

4949
private:
5050
noncopyable(const noncopyable&);

docs/cpp/initializers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Initializers"
3-
ms.date: "07/29/2019"
43
description: "How to initialize classes, structs, arrays and fundamental types in C++."
4+
ms.date: 07/29/2019
55
helpviewer_keywords: ["arrays [C++], array-element initializers", "aggregate initializers [C++]"]
66
---
77
# Initializers
@@ -51,8 +51,8 @@ Initializers may take these forms:
5151
};
5252
class PointConsumer{
5353
public:
54-
void set_point(Point p){};
55-
void set_points(initializer_list<Point> my_list){};
54+
void set_point(Point p){}
55+
void set_points(initializer_list<Point> my_list){}
5656
};
5757
int main() {
5858
PointConsumer pc{};

docs/cpp/safebuffers.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: safebuffers"
32
title: "safebuffers"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: safebuffers"
4+
ms.date: 11/04/2016
55
f1_keywords: ["safebuffers_cpp"]
66
helpviewer_keywords: ["__declspec keyword (C++), safebuffers", "safebuffers __declspec keyword"]
7-
ms.assetid: 0b0dce14-4523-44d2-8070-5dd0fdabc618
87
---
98
# safebuffers
109

@@ -50,7 +49,7 @@ static int checkBuffers() {
5049
BUFFER cb;
5150
// Use the buffer...
5251
return 0;
53-
};
52+
}
5453
static __declspec(safebuffers)
5554
int noCheckBuffers() {
5655
BUFFER ncb;

docs/cpp/selectany.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: `selectany`"
32
title: "selectany"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: `selectany`"
4+
ms.date: 11/04/2016
55
f1_keywords: ["selectany_cpp"]
66
helpviewer_keywords: ["__declspec keyword [C++], selectany", "selectany __declspec keyword"]
7-
ms.assetid: 9c353017-5a42-4f50-b741-bd13da1ce84d
87
---
98
# `selectany`
109

@@ -56,7 +55,7 @@ extern __declspec(selectany) int x5;
5655
// OK: dynamic initialization of global object
5756
class X {
5857
public:
59-
X(int i){i++;};
58+
X(int i){i++;}
6059
int i;
6160
};
6261

0 commit comments

Comments
 (0)