clang-tidy: modernize-use-equals-default

This commit is contained in:
Peter Johnson
2020-12-28 00:37:33 -08:00
parent b124f9101b
commit 67e03e625d
30 changed files with 51 additions and 51 deletions

View File

@@ -38,7 +38,7 @@ class Message {
};
typedef std::function<NT_Type(unsigned int id)> GetEntryTypeFunc;
Message() {}
Message() = default;
Message(MsgType type, const private_init&) : m_type(type) {}
MsgType type() const { return m_type; }

View File

@@ -10,7 +10,7 @@ namespace nt {
/* A sequence number per RFC 1982 */
class SequenceNumber {
public:
SequenceNumber() {}
SequenceNumber() = default;
explicit SequenceNumber(unsigned int value) : m_value(value) {}
unsigned int value() const { return m_value; }

View File

@@ -23,7 +23,7 @@ class RpcCall final {
/**
* Construct invalid instance.
*/
RpcCall() {}
RpcCall() = default;
/**
* Construct from native handles.

View File

@@ -130,7 +130,7 @@ struct RpcDefinition {
/** NetworkTables Remote Procedure Call (Server Side) */
class RpcAnswer {
public:
RpcAnswer() {}
RpcAnswer() = default;
RpcAnswer(NT_Entry entry_, NT_RpcCall call_, StringRef name_,
StringRef params_, const ConnectionInfo& conn_)
: entry(entry_), call(call_), name(name_), params(params_), conn(conn_) {}
@@ -176,7 +176,7 @@ class RpcAnswer {
/** NetworkTables Entry Notification */
class EntryNotification {
public:
EntryNotification() {}
EntryNotification() = default;
EntryNotification(NT_EntryListener listener_, NT_Entry entry_,
StringRef name_, std::shared_ptr<Value> value_,
unsigned int flags_)
@@ -217,7 +217,7 @@ class EntryNotification {
/** NetworkTables Connection Notification */
class ConnectionNotification {
public:
ConnectionNotification() {}
ConnectionNotification() = default;
ConnectionNotification(NT_ConnectionListener listener_, bool connected_,
const ConnectionInfo& conn_)
: listener(listener_), connected(connected_), conn(conn_) {}
@@ -243,7 +243,7 @@ class ConnectionNotification {
/** NetworkTables log message. */
class LogMessage {
public:
LogMessage() {}
LogMessage() = default;
LogMessage(NT_Logger logger_, unsigned int level_, const char* filename_,
unsigned int line_, StringRef message_)
: logger(logger_),