From b1f2dd61d51460a962da3749e3c3272c0fe9e01b Mon Sep 17 00:00:00 2001 From: Like Ma Date: Sun, 14 Jul 2024 13:13:37 +0800 Subject: [PATCH] Remove empty Log_Msg_* ctors --- ACE/ace/Log_Msg_Android_Logcat.h | 1 - ACE/ace/Log_Msg_Backend.cpp | 8 -------- ACE/ace/Log_Msg_Backend.h | 2 +- ACE/ace/Log_Msg_Callback.cpp | 8 -------- ACE/ace/Log_Msg_Callback.h | 5 +---- ACE/ace/Log_Msg_IPC.h | 3 --- ACE/ace/Log_Msg_NT_Event_Log.h | 3 --- ACE/ace/Log_Msg_UNIX_Syslog.h | 13 +++++-------- 8 files changed, 7 insertions(+), 36 deletions(-) diff --git a/ACE/ace/Log_Msg_Android_Logcat.h b/ACE/ace/Log_Msg_Android_Logcat.h index 21ed5cfb7d784..edd6530aac181 100644 --- a/ACE/ace/Log_Msg_Android_Logcat.h +++ b/ACE/ace/Log_Msg_Android_Logcat.h @@ -35,7 +35,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Log_Msg_Android_Logcat : public ACE_Log_Msg_Backend { public: - ACE_Log_Msg_Android_Logcat () = default; ~ACE_Log_Msg_Android_Logcat () override; /// Initialize the event logging facility. NOP in this class. diff --git a/ACE/ace/Log_Msg_Backend.cpp b/ACE/ace/Log_Msg_Backend.cpp index 0cdad7eb6d31a..224cfbcfa48cf 100644 --- a/ACE/ace/Log_Msg_Backend.cpp +++ b/ACE/ace/Log_Msg_Backend.cpp @@ -1,9 +1 @@ #include "ace/Log_Msg_Backend.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Log_Msg_Backend::~ACE_Log_Msg_Backend () -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Log_Msg_Backend.h b/ACE/ace/Log_Msg_Backend.h index a003f70cb6227..e5bad0c7fd714 100644 --- a/ACE/ace/Log_Msg_Backend.h +++ b/ACE/ace/Log_Msg_Backend.h @@ -40,7 +40,7 @@ class ACE_Export ACE_Log_Msg_Backend { public: /// No-op virtual destructor. - virtual ~ACE_Log_Msg_Backend (); + virtual ~ACE_Log_Msg_Backend () = default; /** * Open the back end object. Perform any actions needed to prepare diff --git a/ACE/ace/Log_Msg_Callback.cpp b/ACE/ace/Log_Msg_Callback.cpp index d86575567a8d4..fad746ba7abfc 100644 --- a/ACE/ace/Log_Msg_Callback.cpp +++ b/ACE/ace/Log_Msg_Callback.cpp @@ -1,9 +1 @@ #include "ace/Log_Msg_Callback.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Log_Msg_Callback::~ACE_Log_Msg_Callback () -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Log_Msg_Callback.h b/ACE/ace/Log_Msg_Callback.h index 812c2c7ecda7d..68a474c82e7e7 100644 --- a/ACE/ace/Log_Msg_Callback.h +++ b/ACE/ace/Log_Msg_Callback.h @@ -52,11 +52,8 @@ class ACE_Log_Record; class ACE_Export ACE_Log_Msg_Callback { public: - /// Default constructor - ACE_Log_Msg_Callback () = default; - /// No-op virtual destructor. - virtual ~ACE_Log_Msg_Callback (); + virtual ~ACE_Log_Msg_Callback () = default; /// Callback routine. This is called when we want to log a message. /// Since this routine is pure virtual, it must be overwritten by the diff --git a/ACE/ace/Log_Msg_IPC.h b/ACE/ace/Log_Msg_IPC.h index b38d010aa8bac..f30e08d356dad 100644 --- a/ACE/ace/Log_Msg_IPC.h +++ b/ACE/ace/Log_Msg_IPC.h @@ -49,9 +49,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Log_Msg_IPC : public ACE_Log_Msg_Backend { public: - /// Constructor - ACE_Log_Msg_IPC () = default; - /// Destructor ~ACE_Log_Msg_IPC () override; diff --git a/ACE/ace/Log_Msg_NT_Event_Log.h b/ACE/ace/Log_Msg_NT_Event_Log.h index f5e972c9248e6..a7f9925167b64 100644 --- a/ACE/ace/Log_Msg_NT_Event_Log.h +++ b/ACE/ace/Log_Msg_NT_Event_Log.h @@ -33,9 +33,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Log_Msg_NT_Event_Log : public ACE_Log_Msg_Backend { public: - /// Constructor - ACE_Log_Msg_NT_Event_Log () = default; - /// Destructor ~ACE_Log_Msg_NT_Event_Log () override; diff --git a/ACE/ace/Log_Msg_UNIX_Syslog.h b/ACE/ace/Log_Msg_UNIX_Syslog.h index e5be52428bd71..bfb9b734cbbc8 100644 --- a/ACE/ace/Log_Msg_UNIX_Syslog.h +++ b/ACE/ace/Log_Msg_UNIX_Syslog.h @@ -34,11 +34,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Log_Msg_UNIX_Syslog : public ACE_Log_Msg_Backend { public: - /// Constructor - ACE_Log_Msg_UNIX_Syslog () = default; - /// Destructor - virtual ~ACE_Log_Msg_UNIX_Syslog (); + ~ACE_Log_Msg_UNIX_Syslog () override; /// Open a new event log. /** @@ -48,16 +45,16 @@ class ACE_Export ACE_Log_Msg_UNIX_Syslog : public ACE_Log_Msg_Backend * it is 0 (no name), the application name as * returned from ACE_Log_Msg::program_name() is used. */ - virtual int open (const ACE_TCHAR *logger_key); + int open (const ACE_TCHAR *logger_key) override; /// Reset the backend. - virtual int reset (); + int reset () override; /// Close the backend completely. - virtual int close (); + int close () override; /// This is called when we want to log a message. - virtual ssize_t log (ACE_Log_Record &log_record); + ssize_t log (ACE_Log_Record &log_record) override; private: /// Convert an ACE_Log_Priority value to the corresponding syslog priority.