Skip to content

Commit bb46372

Browse files
authored
Remove more superfluous semicolons after function definition
1 parent 459d9e4 commit bb46372

31 files changed

+48
-48
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CDerived;
6464
class CBase
6565
{
6666
public:
67-
CBase(CDerived *derived): m_pDerived(derived) {};
67+
CBase(CDerived *derived): m_pDerived(derived) {}
6868
~CBase();
6969
virtual void function(void) = 0;
7070

@@ -74,8 +74,8 @@ public:
7474
class CDerived : public CBase
7575
{
7676
public:
77-
CDerived() : CBase(this) {}; // C4355
78-
virtual void function(void) {};
77+
CDerived() : CBase(this) {} // C4355
78+
virtual void function(void) {}
7979
};
8080

8181
CBase::~CBase()

docs/code-quality/c28208.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ typedef void test_type(void*);
3030
#include "c28208_example.h"
3131
test_type my_test1;
3232
test_type my_test2;
33-
void my_test1(int* x){}; // Generates C28208
34-
void my_test2(void* x){}; // Doesn't generate C28208
33+
void my_test1(int* x){} // Generates C28208
34+
void my_test2(void* x){} // Doesn't generate C28208
3535
3636
int main()
3737
{

docs/cpp/class-templates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public:
2828

2929
template< class T, int i > MyStack< T, i >::MyStack( void )
3030
{
31-
};
31+
}
3232

3333
template< class T, int i > void MyStack< T, i >::push( const T item )
3434
{
35-
};
35+
}
3636

3737
template< class T, int i > T& MyStack< T, i >::pop( void )
3838
{
39-
};
39+
}
4040

4141
int main()
4242
{

docs/cpp/decltype-cpp.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This declaration enables you to define a different function for **`double`** var
2121
// explicit_specialization.cpp
2222
template<class T> void f(T t)
2323
{
24-
};
24+
}
2525
2626
// Explicit specialization of f with 'char' with the
2727
// template argument explicitly specified:

docs/cpp/explicitly-defaulted-and-deleted-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int checkBuffers() {
5050
BUFFER cb;
5151
// Use the buffer...
5252
return 0;
53-
};
53+
}
5454
static __declspec(safebuffers)
5555
int noCheckBuffers() {
5656
BUFFER ncb;

docs/cpp/selectany.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern __declspec(selectany) int x5;
5656
// OK: dynamic initialization of global object
5757
class X {
5858
public:
59-
X(int i){i++;};
59+
X(int i){i++;}
6060
int i;
6161
};
6262

0 commit comments

Comments
 (0)