diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-10-23 13:49:13 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-10-23 13:49:13 +0200 |
commit | aa58d652d4a4bb66cb15c6688c11cc4fc33fd743 (patch) | |
tree | 4769ee63fa06991a5615056da1fd65399e57e48e /ACE | |
parent | f63fd23cdbaafd7a8c17095198193421476ee9f2 (diff) | |
download | ATCD-aa58d652d4a4bb66cb15c6688c11cc4fc33fd743.tar.gz |
Minor cleanup
* ACE/ace/Configuration.cpp:
* ACE/ace/Configuration.h:
* ACE/ace/POSIX_CB_Proactor.cpp:
* ACE/ace/POSIX_CB_Proactor.h:
* ACE/ace/Process.cpp:
* ACE/ace/Sig_Adapter.cpp:
* ACE/ace/Sig_Adapter.h:
* ACE/ace/Sig_Handler.h:
* ACE/ace/Signal.h:
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ace/Configuration.cpp | 13 | ||||
-rw-r--r-- | ACE/ace/Configuration.h | 13 | ||||
-rw-r--r-- | ACE/ace/POSIX_CB_Proactor.cpp | 5 | ||||
-rw-r--r-- | ACE/ace/POSIX_CB_Proactor.h | 11 | ||||
-rw-r--r-- | ACE/ace/Process.cpp | 3 | ||||
-rw-r--r-- | ACE/ace/Sig_Adapter.cpp | 3 | ||||
-rw-r--r-- | ACE/ace/Sig_Adapter.h | 6 | ||||
-rw-r--r-- | ACE/ace/Sig_Handler.h | 5 | ||||
-rw-r--r-- | ACE/ace/Signal.h | 2 |
9 files changed, 20 insertions, 41 deletions
diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp index 70110b42acc..bb5b9e3432b 100644 --- a/ACE/ace/Configuration.cpp +++ b/ACE/ace/Configuration.cpp @@ -114,7 +114,6 @@ ACE_Configuration::expand_path (const ACE_Configuration_Section_Key& key, } return 0; - } int @@ -1098,11 +1097,6 @@ ACE_Configuration_Value_IntId::free (ACE_Allocator *alloc) // Do nothing in other cases... } -ACE_Configuration_ExtId::ACE_Configuration_ExtId () - : name_ (0) -{ -} - ACE_Configuration_ExtId::ACE_Configuration_ExtId (const ACE_TCHAR* name) : name_ (name) { @@ -1113,10 +1107,6 @@ ACE_Configuration_ExtId::ACE_Configuration_ExtId (const ACE_Configuration_ExtId& { } -ACE_Configuration_ExtId::~ACE_Configuration_ExtId () -{ -} - ACE_Configuration_ExtId& ACE_Configuration_ExtId::operator= (const ACE_Configuration_ExtId& rhs) { if (this != &rhs) @@ -1521,8 +1511,7 @@ ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base, ) { ACE_TString simple_section (sub_section, separator - sub_section); - int ret_val = - open_simple_section (result, simple_section.c_str (), create, result); + int const ret_val = open_simple_section (result, simple_section.c_str (), create, result); if (ret_val) return ret_val; sub_section = separator + 1; diff --git a/ACE/ace/Configuration.h b/ACE/ace/Configuration.h index 175e26cf7b6..76ef66f2cd7 100644 --- a/ACE/ace/Configuration.h +++ b/ACE/ace/Configuration.h @@ -426,7 +426,7 @@ public: protected: /// Destructor - invokes <RegCloseKey> - virtual ~ACE_Section_Key_Win32 (void); + virtual ~ACE_Section_Key_Win32 (); // Not used ACE_Section_Key_Win32 (const ACE_Section_Key_Win32& rhs); @@ -454,7 +454,7 @@ public: u_long security_access = KEY_ALL_ACCESS); /// Destructor - virtual ~ACE_Configuration_Win32Registry (void); + virtual ~ACE_Configuration_Win32Registry (); virtual int open_section (const ACE_Configuration_Section_Key& base, const ACE_TCHAR* sub_section, @@ -557,7 +557,7 @@ class ACE_Export ACE_Configuration_ExtId { public: /// Defeault ctor - ACE_Configuration_ExtId (void); + ACE_Configuration_ExtId () = default; /// Named constructor explicit ACE_Configuration_ExtId (const ACE_TCHAR* name); @@ -566,7 +566,7 @@ public: ACE_Configuration_ExtId (const ACE_Configuration_ExtId& rhs); /// destructor - ~ACE_Configuration_ExtId (void); + ~ACE_Configuration_ExtId () = default; /// Assignment operator ACE_Configuration_ExtId& operator= (const ACE_Configuration_ExtId& rhs); @@ -586,11 +586,10 @@ public: u_long hash () const; // = Data members. - - const ACE_TCHAR * name_; + const ACE_TCHAR * name_ {}; // Accessors - const ACE_TCHAR *name (void); + const ACE_TCHAR *name (); }; typedef ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, int> diff --git a/ACE/ace/POSIX_CB_Proactor.cpp b/ACE/ace/POSIX_CB_Proactor.cpp index 77b2e406268..ef58e76d5ae 100644 --- a/ACE/ace/POSIX_CB_Proactor.cpp +++ b/ACE/ace/POSIX_CB_Proactor.cpp @@ -73,7 +73,7 @@ ACE_POSIX_CB_Proactor::notify_completion (int sig_num) ssize_t ACE_POSIX_CB_Proactor::allocate_aio_slot (ACE_POSIX_Asynch_Result *result) { - ssize_t slot = ACE_POSIX_AIOCB_Proactor::allocate_aio_slot (result); + ssize_t const slot = ACE_POSIX_AIOCB_Proactor::allocate_aio_slot (result); if (slot == -1) return -1; @@ -83,8 +83,7 @@ ACE_POSIX_CB_Proactor::allocate_aio_slot (ACE_POSIX_Asynch_Result *result) // the proactor, but the aiocb as well. result->aio_sigevent.sigev_notify = SIGEV_THREAD; # if defined (ACE_HAS_SIG_C_FUNC) - result->aio_sigevent.sigev_notify_function = - ACE_POSIX_CB_Proactor_aio_completion; + result->aio_sigevent.sigev_notify_function = ACE_POSIX_CB_Proactor_aio_completion; # else result->aio_sigevent.sigev_notify_function = aio_completion_func; # endif /* ACE_HAS_SIG_C_FUNC */ diff --git a/ACE/ace/POSIX_CB_Proactor.h b/ACE/ace/POSIX_CB_Proactor.h index e38360f5f9f..9aa8221c43b 100644 --- a/ACE/ace/POSIX_CB_Proactor.h +++ b/ACE/ace/POSIX_CB_Proactor.h @@ -22,26 +22,22 @@ #include "ace/Synch_Traits.h" #include "ace/Thread_Semaphore.h" #include "ace/Null_Semaphore.h" - #include "ace/POSIX_Proactor.h" - ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_POSIX_CB_Proactor * * @brief Implementation of Callback-based Proactor - * }; */ class ACE_Export ACE_POSIX_CB_Proactor : public ACE_POSIX_AIOCB_Proactor { - public: - virtual Proactor_Type get_impl_type (void); + virtual Proactor_Type get_impl_type (); /// Destructor. - virtual ~ACE_POSIX_CB_Proactor (void); + virtual ~ACE_POSIX_CB_Proactor (); /// Constructor defines max number asynchronous operations that can /// be started at the same time. @@ -52,7 +48,6 @@ public: static void aio_completion_func (sigval cb_data); protected: - /** * Dispatch a single set of events. If @a wait_time elapses before * any events occur, return 0. Return 1 on success i.e., when a @@ -68,7 +63,7 @@ protected: * completion is dispatched, non-zero (-1) on errors and errno is * set accordingly. */ - virtual int handle_events (void); + virtual int handle_events (); /// Find free slot to store result and aiocb pointer virtual ssize_t allocate_aio_slot (ACE_POSIX_Asynch_Result *result); diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index cc3a25d2636..d75e5458815 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -32,8 +32,7 @@ // to do anything with the signal - it's just needed to interrupt a sleep. // See wait() for more info. #if !defined (ACE_WIN32) && !defined(ACE_LACKS_UNIX_SIGNALS) -static void -sigchld_nop (int, siginfo_t *, ucontext_t *) +static void sigchld_nop (int, siginfo_t *, ucontext_t *) { return; } diff --git a/ACE/ace/Sig_Adapter.cpp b/ACE/ace/Sig_Adapter.cpp index 2010f8a3e0a..b303397256e 100644 --- a/ACE/ace/Sig_Adapter.cpp +++ b/ACE/ace/Sig_Adapter.cpp @@ -20,8 +20,7 @@ ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Event_Handler *eh, // ACE_TRACE ("ACE_Sig_Adapter::ACE_Sig_Adapter"); } -ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Handler_Ex sig_func, - int sigkey) +ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Handler_Ex sig_func, int sigkey) : sigkey_ (sigkey), type_ (C_FUNCTION), eh_ (0), diff --git a/ACE/ace/Sig_Adapter.h b/ACE/ace/Sig_Adapter.h index bb0f791a07c..16a0f9af960 100644 --- a/ACE/ace/Sig_Adapter.h +++ b/ACE/ace/Sig_Adapter.h @@ -40,16 +40,16 @@ public: /// Returns this signal key that's used to remove this from the /// ACE_Reactor's internal table. - int sigkey (void); + int sigkey (); - /// Called by the <Reactor> to dispatch the signal handler. + /// Called by the ACE_Reactor to dispatch the signal handler. virtual int handle_signal (int, siginfo_t *, ucontext_t *); ACE_ALLOC_HOOK_DECLARE; private: /// Key for this signal handler (used to remove it). - int sigkey_; + int const sigkey_; /// Is this an external handler or an ACE handler? enum diff --git a/ACE/ace/Sig_Handler.h b/ACE/ace/Sig_Handler.h index 3a9e08be45b..337f6a63521 100644 --- a/ACE/ace/Sig_Handler.h +++ b/ACE/ace/Sig_Handler.h @@ -94,8 +94,7 @@ public: * <handle_signal> method of the appropriate pre-registered * ACE_Event_Handler. */ - static void dispatch (int, siginfo_t *, - ucontext_t *); + static void dispatch (int, siginfo_t *, ucontext_t *); /// Dump the state of an object. void dump () const; @@ -149,7 +148,7 @@ private: /** * @class ACE_Sig_Handlers * - * @brief This is an alternative signal handling dispatcher for ACE. It + * @brief This is an alternative signal handling dispatcher for ACE. It * allows a list of signal handlers to be registered for each * signal. It also makes SA_RESTART the default mode. * diff --git a/ACE/ace/Signal.h b/ACE/ace/Signal.h index c4299437c51..99f49445b21 100644 --- a/ACE/ace/Signal.h +++ b/ACE/ace/Signal.h @@ -164,7 +164,7 @@ public: /// Register @c this as the current disposition and store old /// disposition into @a oaction if it is non-NULL. int register_action (int signum, - ACE_Sig_Action *oaction = 0); + ACE_Sig_Action *oaction = nullptr); /// Assign the value of @a oaction to @c this and make it become the /// new signal disposition. |