Skip to content

Commit 601955a

Browse files
rzvncjJenkins-dev
authored andcommitted
Remove unnecessary default constructors
This patch removes explicitly written `= default` constructors for several structs and classes that don't require it, because the compiler will do the same thing automatically. Signed-off-by: Razvan Cojocaru <[email protected]>
1 parent 0a75167 commit 601955a

File tree

8 files changed

+0
-19
lines changed

8 files changed

+0
-19
lines changed

openvpn/addr/pool.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ template <typename ADDR>
2929
class PoolType
3030
{
3131
public:
32-
PoolType() = default;
33-
3432
/**
3533
* @brief Adds range of addresses to pool (pool will own the addresses).
3634
* @param range RangeType of IP Addresses

openvpn/applecrypto/util/rand.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class AppleRandom : public StrongRandomAPI
2828

2929
typedef RCPtr<AppleRandom> Ptr;
3030

31-
AppleRandom() = default;
32-
3331
std::string name() const override
3432
{
3533
return "AppleRandom";

openvpn/client/clicreds.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class ClientCreds : public RC<thread_unsafe_refcount>
3232
public:
3333
typedef RCPtr<ClientCreds> Ptr;
3434

35-
ClientCreds() = default;
36-
3735
void set_username(const std::string &username_arg)
3836
{
3937
username = username_arg;

openvpn/common/options.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,6 @@ class OptionList : public std::vector<Option>, public RCCopyable<thread_unsafe_r
533533
class LexComment : public LexQuoteMixin
534534
{
535535
public:
536-
LexComment() = default;
537-
538536
void put(char c)
539537
{
540538
if (in_comment)

openvpn/crypto/cryptodc.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ class CryptoDCSettingsData
100100
public:
101101
OPENVPN_SIMPLE_EXCEPTION(no_data_channel_factory);
102102

103-
CryptoDCSettingsData() = default;
104-
105103
void set_cipher(CryptoAlgs::Type cipher)
106104
{
107105
cipher_ = cipher;
@@ -195,8 +193,6 @@ class CryptoDCSettings : public CryptoDCSettingsData
195193
public:
196194
OPENVPN_SIMPLE_EXCEPTION(no_data_channel_factory);
197195

198-
CryptoDCSettings() = default;
199-
200196
void set_factory(const CryptoDCFactory::Ptr &factory)
201197
{
202198
factory_ = factory;

openvpn/crypto/packet_id_control.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ class PacketIDControlReceiveType
180180

181181
OPENVPN_SIMPLE_EXCEPTION(packet_id_not_initialized);
182182

183-
// TODO: [OVPN3-933] Consider RAII'ifying this code
184-
PacketIDControlReceiveType() = default;
185-
186183
void init(const char *name_arg,
187184
const int unit_arg,
188185
const SessionStats::Ptr &stats_arg)

openvpn/openssl/util/rand.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class OpenSSLRandom : public StrongRandomAPI
2929

3030
typedef RCPtr<OpenSSLRandom> Ptr;
3131

32-
OpenSSLRandom() = default;
33-
3432
std::string name() const override
3533
{
3634
return "OpenSSLRandom";

openvpn/transport/dco.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ struct DCO : public virtual RC<thread_unsafe_refcount>
5353

5454
struct TunConfig
5555
{
56-
TunConfig() = default;
57-
5856
#if defined(OPENVPN_PLATFORM_WIN)
5957
TunWin::SetupFactory::Ptr setup_factory;
6058

0 commit comments

Comments
 (0)