mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-19 19:52:15 +02:00
virtual d'tors: use '= default' instead of empty body
Signed-off-by: Heiko Hund <heiko@openvpn.net>
This commit is contained in:
parent
f5db521aa7
commit
3936778c38
@ -452,9 +452,7 @@ struct LogInfo
|
|||||||
struct LogReceiver
|
struct LogReceiver
|
||||||
{
|
{
|
||||||
virtual void log(const LogInfo &) = 0;
|
virtual void log(const LogInfo &) = 0;
|
||||||
virtual ~LogReceiver()
|
virtual ~LogReceiver() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// used to pass stats for an interface
|
// used to pass stats for an interface
|
||||||
|
@ -55,9 +55,7 @@ class CFException : public std::exception
|
|||||||
return errtxt;
|
return errtxt;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~CFException() noexcept
|
virtual ~CFException() noexcept = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void set_errtxt(const std::string &text, const OSStatus status)
|
void set_errtxt(const std::string &text, const OSStatus status)
|
||||||
|
@ -38,9 +38,7 @@ struct ReachabilityInterface
|
|||||||
virtual Status reachable() const = 0;
|
virtual Status reachable() const = 0;
|
||||||
virtual bool reachableVia(const std::string &net_type) const = 0;
|
virtual bool reachableVia(const std::string &net_type) const = 0;
|
||||||
virtual std::string to_string() const = 0;
|
virtual std::string to_string() const = 0;
|
||||||
virtual ~ReachabilityInterface()
|
virtual ~ReachabilityInterface() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
} // namespace openvpn
|
} // namespace openvpn
|
||||||
#endif
|
#endif
|
||||||
|
@ -205,9 +205,7 @@ class ReachabilityBase
|
|||||||
virtual Type vtype() const = 0;
|
virtual Type vtype() const = 0;
|
||||||
virtual Status vstatus(const SCNetworkReachabilityFlags flags) const = 0;
|
virtual Status vstatus(const SCNetworkReachabilityFlags flags) const = 0;
|
||||||
|
|
||||||
virtual ~ReachabilityBase()
|
virtual ~ReachabilityBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CF::NetworkReachability reach;
|
CF::NetworkReachability reach;
|
||||||
};
|
};
|
||||||
|
@ -242,9 +242,7 @@ class REST
|
|||||||
return date.substr(0, 8) + '/' + region + '/' + service + "/aws4_request";
|
return date.substr(0, 8) + '/' + region + '/' + service + "/aws4_request";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~QueryBuilder()
|
virtual ~QueryBuilder() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} // namespace openvpn::AWS
|
} // namespace openvpn::AWS
|
||||||
|
@ -48,9 +48,7 @@ struct Action : public RC<thread_unsafe_refcount>
|
|||||||
throw Exception("Action::to_json() virtual method not implemented");
|
throw Exception("Action::to_json() virtual method not implemented");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
virtual ~Action()
|
virtual ~Action() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ActionList : public std::vector<Action::Ptr>, public DestructorBase
|
class ActionList : public std::vector<Action::Ptr>, public DestructorBase
|
||||||
|
@ -32,9 +32,7 @@ struct DestructorBase : public RC<thread_unsafe_refcount>
|
|||||||
{
|
{
|
||||||
typedef RCPtr<DestructorBase> Ptr;
|
typedef RCPtr<DestructorBase> Ptr;
|
||||||
virtual void destroy(std::ostream &os) = 0;
|
virtual void destroy(std::ostream &os) = 0;
|
||||||
virtual ~DestructorBase()
|
virtual ~DestructorBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace openvpn
|
} // namespace openvpn
|
||||||
|
@ -989,8 +989,8 @@ template <typename RCImpl>
|
|||||||
class RCCopyable
|
class RCCopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~RCCopyable(){};
|
virtual ~RCCopyable() = default;
|
||||||
RCCopyable() noexcept {};
|
RCCopyable() noexcept = default;
|
||||||
RCCopyable(const RCCopyable &) noexcept;
|
RCCopyable(const RCCopyable &) noexcept;
|
||||||
RCCopyable(RCCopyable &&) noexcept;
|
RCCopyable(RCCopyable &&) noexcept;
|
||||||
RCCopyable &operator=(const RCCopyable &) noexcept;
|
RCCopyable &operator=(const RCCopyable &) noexcept;
|
||||||
@ -1318,13 +1318,9 @@ template <typename RCImpl>
|
|||||||
class RCWeak<RCImpl>::NotifyBase
|
class RCWeak<RCImpl>::NotifyBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NotifyBase() noexcept
|
NotifyBase() noexcept = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual void call() noexcept = 0;
|
virtual void call() noexcept = 0;
|
||||||
virtual ~NotifyBase()
|
virtual ~NotifyBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
NotifyBase *next = nullptr;
|
NotifyBase *next = nullptr;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -49,9 +49,7 @@ struct RedirectBase
|
|||||||
OPENVPN_EXCEPTION(redirect_std_err);
|
OPENVPN_EXCEPTION(redirect_std_err);
|
||||||
virtual void redirect() = 0;
|
virtual void redirect() = 0;
|
||||||
virtual void close() = 0;
|
virtual void close() = 0;
|
||||||
virtual ~RedirectBase()
|
virtual ~RedirectBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RedirectStdFD : public RedirectBase
|
struct RedirectStdFD : public RedirectBase
|
||||||
|
@ -76,9 +76,7 @@ class SetUserGroup
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~SetUserGroup()
|
virtual ~SetUserGroup() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string &user() const
|
const std::string &user() const
|
||||||
{
|
{
|
||||||
|
@ -75,9 +75,7 @@ class ExceptionCode : public std::exception
|
|||||||
return code_ != 0;
|
return code_ != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ExceptionCode() noexcept
|
virtual ~ExceptionCode() noexcept = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static unsigned int mkcode(const Error::Type code, const bool fatal)
|
static unsigned int mkcode(const Error::Type code, const bool fatal)
|
||||||
@ -104,9 +102,7 @@ class ErrorCode : public ExceptionCode
|
|||||||
return err_.c_str();
|
return err_.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ErrorCode() noexcept
|
virtual ~ErrorCode() noexcept = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string err_;
|
std::string err_;
|
||||||
|
@ -343,13 +343,9 @@ class MyClientInstance : public WS::Server::Listener::Client
|
|||||||
MyClientInstance(WS::Server::Listener::Client::Initializer &ci)
|
MyClientInstance(WS::Server::Listener::Client::Initializer &ci)
|
||||||
: WS::Server::Listener::Client(ci)
|
: WS::Server::Listener::Client(ci)
|
||||||
{
|
{
|
||||||
// OPENVPN_LOG("INSTANCE START");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~MyClientInstance()
|
virtual ~MyClientInstance() = default;
|
||||||
{
|
|
||||||
// OPENVPN_LOG("INSTANCE DESTRUCT");
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void generate_reply(const Json::Value &jout)
|
void generate_reply(const Json::Value &jout)
|
||||||
|
@ -549,13 +549,9 @@ class MyClientInstance : public WS::Server::Listener::Client
|
|||||||
MyClientInstance(WS::Server::Listener::Client::Initializer &ci)
|
MyClientInstance(WS::Server::Listener::Client::Initializer &ci)
|
||||||
: WS::Server::Listener::Client(ci)
|
: WS::Server::Listener::Client(ci)
|
||||||
{
|
{
|
||||||
// OPENVPN_LOG("INSTANCE START");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~MyClientInstance()
|
virtual ~MyClientInstance() = default;
|
||||||
{
|
|
||||||
// OPENVPN_LOG("INSTANCE DESTRUCT");
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void generate_reply(const Json::Value &jout)
|
void generate_reply(const Json::Value &jout)
|
||||||
|
@ -35,9 +35,7 @@ class ExternalPKIBase
|
|||||||
// Return true on success or false on error.
|
// Return true on success or false on error.
|
||||||
virtual bool sign(const std::string &alias, const std::string &data, std::string &sig, const std::string &algorithm, const std::string &hashalg, const std::string &saltlen) = 0;
|
virtual bool sign(const std::string &alias, const std::string &data, std::string &sig, const std::string &algorithm, const std::string &hashalg, const std::string &saltlen) = 0;
|
||||||
|
|
||||||
virtual ~ExternalPKIBase()
|
virtual ~ExternalPKIBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExternalPKIImpl
|
class ExternalPKIImpl
|
||||||
|
@ -3949,9 +3949,7 @@ class ProtoContext : public logging::LoggingMixin<OPENVPN_DEBUG_PROTO,
|
|||||||
return bool(primary);
|
return bool(primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ProtoContext()
|
virtual ~ProtoContext() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// return the PacketType of an incoming network packet
|
// return the PacketType of an incoming network packet
|
||||||
PacketType packet_type(const Buffer &buf)
|
PacketType packet_type(const Buffer &buf)
|
||||||
|
@ -222,9 +222,7 @@ class TLSSessionTicketBase
|
|||||||
// return string that identifies the app
|
// return string that identifies the app
|
||||||
virtual std::string session_id_context() const = 0;
|
virtual std::string session_id_context() const = 0;
|
||||||
|
|
||||||
virtual ~TLSSessionTicketBase()
|
virtual ~TLSSessionTicketBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void b64_to_key(const std::string &b64, const char *title, unsigned char *out, const size_t outlen)
|
static void b64_to_key(const std::string &b64, const char *title, unsigned char *out, const size_t outlen)
|
||||||
|
@ -47,9 +47,7 @@ class HandlerBase
|
|||||||
SSLConfigAPI::Ptr default_factory) const = 0;
|
SSLConfigAPI::Ptr default_factory) const = 0;
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
virtual ~HandlerBase()
|
virtual ~HandlerBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace openvpn::SNI
|
} // namespace openvpn::SNI
|
||||||
|
4
openvpn/transport/client/extern/fw.hpp
vendored
4
openvpn/transport/client/extern/fw.hpp
vendored
@ -32,9 +32,7 @@ struct Config;
|
|||||||
struct Factory
|
struct Factory
|
||||||
{
|
{
|
||||||
virtual TransportClientFactory *new_transport_factory(const Config &conf) = 0;
|
virtual TransportClientFactory *new_transport_factory(const Config &conf) = 0;
|
||||||
virtual ~Factory()
|
virtual ~Factory() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
struct Factory
|
struct Factory
|
||||||
|
@ -102,9 +102,7 @@ struct TransportClientParent
|
|||||||
unsigned int &keepalive_timeout) = 0;
|
unsigned int &keepalive_timeout) = 0;
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
virtual ~TransportClientParent()
|
virtual ~TransportClientParent() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Factory for client transport object.
|
// Factory for client transport object.
|
||||||
|
@ -75,9 +75,7 @@ struct DelayedQueue : public RC<thread_unsafe_refcount>
|
|||||||
{
|
{
|
||||||
virtual void call() = 0;
|
virtual void call() = 0;
|
||||||
virtual const Time &fire_time() = 0;
|
virtual const Time &fire_time() = 0;
|
||||||
virtual ~EventBase()
|
virtual ~EventBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class F>
|
template <class F>
|
||||||
|
@ -284,9 +284,7 @@ class TunBuilderBase
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~TunBuilderBase()
|
virtual ~TunBuilderBase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENABLE_OVPNDCO
|
#ifdef ENABLE_OVPNDCO
|
||||||
/**
|
/**
|
||||||
|
@ -36,9 +36,7 @@ struct Config
|
|||||||
virtual Json::Value to_json() = 0;
|
virtual Json::Value to_json() = 0;
|
||||||
virtual void from_json(const Json::Value &root, const std::string &title) = 0;
|
virtual void from_json(const Json::Value &root, const std::string &title) = 0;
|
||||||
#endif
|
#endif
|
||||||
virtual ~Config()
|
virtual ~Config() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Base : public DestructorBase
|
struct Base : public DestructorBase
|
||||||
|
4
openvpn/tun/extern/fw.hpp
vendored
4
openvpn/tun/extern/fw.hpp
vendored
@ -34,9 +34,7 @@ struct Config; // defined in config.hpp
|
|||||||
struct Factory
|
struct Factory
|
||||||
{
|
{
|
||||||
virtual TunClientFactory *new_tun_factory(const Config &conf, const OptionList &opt) = 0;
|
virtual TunClientFactory *new_tun_factory(const Config &conf, const OptionList &opt) = 0;
|
||||||
virtual ~Factory()
|
virtual ~Factory() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
} // namespace ExternalTun
|
} // namespace ExternalTun
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user