diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-17 13:17:31 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-17 13:17:31 +0100 |
commit | a466e4133b6de32437a27c2694edaeedf5a6d90c (patch) | |
tree | 314454b0bd1cbdf20980a804127e86df7524ff25 | |
parent | 0cc148c86d67af7cc179e44f4c67a12dae60ac5b (diff) | |
download | ATCD-a466e4133b6de32437a27c2694edaeedf5a6d90c.tar.gz |
Replace auto_ptr with std::unique_ptr and remove redundant void
* ACE/Kokyu/Default_Dispatcher_Impl.cpp:
* ACE/Kokyu/Default_Dispatcher_Impl.h:
* ACE/Kokyu/Dispatcher_Task.cpp:
* ACE/Kokyu/Dispatcher_Task.h:
* ACE/Kokyu/Kokyu.cpp:
* ACE/Kokyu/Kokyu.h:
* ACE/Kokyu/Kokyu_defs.cpp:
* ACE/Kokyu/Kokyu_defs.h:
* ACE/Kokyu/Kokyu_dsrt.cpp:
* ACE/Kokyu/Kokyu_dsrt.h:
* ACE/Kokyu/tests/EDF/test.cpp:
* ACE/Kokyu/tests/FIFO/README:
* ACE/Kokyu/tests/FIFO/test.cpp:
* ACE/ace/Get_Opt.h:
* ACE/ace/Get_Opt.inl:
* ACE/ace/Malloc_T.cpp:
* ACE/ace/Malloc_T.h:
* ACE/ace/Malloc_T.inl:
* ACE/ace/Sched_Params.h:
* ACE/ace/Sched_Params.inl:
-rw-r--r-- | ACE/Kokyu/Default_Dispatcher_Impl.cpp | 6 | ||||
-rw-r--r-- | ACE/Kokyu/Default_Dispatcher_Impl.h | 2 | ||||
-rw-r--r-- | ACE/Kokyu/Dispatcher_Task.cpp | 2 | ||||
-rw-r--r-- | ACE/Kokyu/Dispatcher_Task.h | 2 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu.cpp | 6 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu.h | 5 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu_defs.cpp | 2 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu_defs.h | 4 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu_dsrt.cpp | 4 | ||||
-rw-r--r-- | ACE/Kokyu/Kokyu_dsrt.h | 4 | ||||
-rw-r--r-- | ACE/Kokyu/tests/EDF/test.cpp | 5 | ||||
-rw-r--r-- | ACE/Kokyu/tests/FIFO/README | 2 | ||||
-rw-r--r-- | ACE/Kokyu/tests/FIFO/test.cpp | 5 | ||||
-rw-r--r-- | ACE/ace/Get_Opt.h | 34 | ||||
-rw-r--r-- | ACE/ace/Get_Opt.inl | 10 | ||||
-rw-r--r-- | ACE/ace/Malloc_T.cpp | 38 | ||||
-rw-r--r-- | ACE/ace/Malloc_T.h | 58 | ||||
-rw-r--r-- | ACE/ace/Malloc_T.inl | 18 | ||||
-rw-r--r-- | ACE/ace/Sched_Params.h | 22 | ||||
-rw-r--r-- | ACE/ace/Sched_Params.inl | 22 |
20 files changed, 126 insertions, 125 deletions
diff --git a/ACE/Kokyu/Default_Dispatcher_Impl.cpp b/ACE/Kokyu/Default_Dispatcher_Impl.cpp index 29d6ef1a9be..30709efe3f0 100644 --- a/ACE/Kokyu/Default_Dispatcher_Impl.cpp +++ b/ACE/Kokyu/Default_Dispatcher_Impl.cpp @@ -1,5 +1,7 @@ #include "Default_Dispatcher_Impl.h" + #include "ace/Sched_Params.h" +#include <utility> #if ! defined (__ACE_INLINE__) #include "Default_Dispatcher_Impl.inl" @@ -50,8 +52,8 @@ Default_Dispatcher_Impl::init_i (const Dispatcher_Attributes& attrs) Dispatcher_Task (*config, ACE_Thread_Manager::instance()), -1); - auto_ptr<Dispatcher_Task> tmp_task_auto_ptr (task); - tasks_[i++] = tmp_task_auto_ptr; + std::unique_ptr<Dispatcher_Task> tmp_task_auto_ptr (task); + tasks_[i++] = std::move(tmp_task_auto_ptr); //I couldn't use reset because MSVC6 auto_ptr does not have reset method. //So in configurations where the auto_ptr maps to the std::auto_ptr instead //of ACE auto_ptr, this would be a problem. diff --git a/ACE/Kokyu/Default_Dispatcher_Impl.h b/ACE/Kokyu/Default_Dispatcher_Impl.h index 9d9c4c3f6bf..32a790e0d65 100644 --- a/ACE/Kokyu/Default_Dispatcher_Impl.h +++ b/ACE/Kokyu/Default_Dispatcher_Impl.h @@ -48,7 +48,7 @@ namespace Kokyu Dispatcher_Task* find_task_with_preemption_prio (Priority_t); private: - typedef auto_ptr<Dispatcher_Task> Dispatcher_Task_Auto_Ptr; + typedef std::unique_ptr<Dispatcher_Task> Dispatcher_Task_Auto_Ptr; ACE_Auto_Array_Ptr<Dispatcher_Task_Auto_Ptr> tasks_; int ntasks_; ConfigInfoSet curr_config_info_; diff --git a/ACE/Kokyu/Dispatcher_Task.cpp b/ACE/Kokyu/Dispatcher_Task.cpp index 07857091e60..b128dcab6bf 100644 --- a/ACE/Kokyu/Dispatcher_Task.cpp +++ b/ACE/Kokyu/Dispatcher_Task.cpp @@ -66,7 +66,7 @@ Dispatcher_Task::initialize () } int -Dispatcher_Task::svc (void) +Dispatcher_Task::svc () { int done = 0; diff --git a/ACE/Kokyu/Dispatcher_Task.h b/ACE/Kokyu/Dispatcher_Task.h index d565be94f5d..ca602ca2be7 100644 --- a/ACE/Kokyu/Dispatcher_Task.h +++ b/ACE/Kokyu/Dispatcher_Task.h @@ -69,7 +69,7 @@ public: const QoSDescriptor& qos_info); /// Process the events in the queue. - int svc (void); + int svc (); const ConfigInfo& get_curr_config_info() const; Priority_t preemption_priority() const; diff --git a/ACE/Kokyu/Kokyu.cpp b/ACE/Kokyu/Kokyu.cpp index 5c1f4fe9d17..1f89b5f712b 100644 --- a/ACE/Kokyu/Kokyu.cpp +++ b/ACE/Kokyu/Kokyu.cpp @@ -1,5 +1,7 @@ #include "Kokyu.h" +#include <utility> + #include "Default_Dispatcher_Impl.h" #if ! defined (__ACE_INLINE__) @@ -26,8 +28,8 @@ int Dispatcher::activate () void Dispatcher::implementation (Dispatcher_Impl* impl) { - auto_ptr<Dispatcher_Impl> tmp_impl (impl); - dispatcher_impl_ = tmp_impl; + std::unique_ptr<Dispatcher_Impl> tmp_impl (impl); + dispatcher_impl_ = std::move(tmp_impl); //I couldn't use reset because MSVC++ auto_ptr does not have reset method. //So in configurations where the auto_ptr maps to the std::auto_ptr instead diff --git a/ACE/Kokyu/Kokyu.h b/ACE/Kokyu/Kokyu.h index 086f95eb67b..119d9827195 100644 --- a/ACE/Kokyu/Kokyu.h +++ b/ACE/Kokyu/Kokyu.h @@ -17,6 +17,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#include <utility> #include "kokyu_export.h" #include "Kokyu_defs.h" @@ -74,10 +75,10 @@ namespace Kokyu private: /// Auto ptr to the implementation. Implementation will be created on the /// heap and deleted automatically when the dispatcher object is destructed. - auto_ptr<Dispatcher_Impl> dispatcher_impl_; + std::unique_ptr<Dispatcher_Impl> dispatcher_impl_; }; - typedef auto_ptr<Dispatcher> Dispatcher_Auto_Ptr; + typedef std::unique_ptr<Dispatcher> Dispatcher_Auto_Ptr; /** * @class Dispatcher_Factory diff --git a/ACE/Kokyu/Kokyu_defs.cpp b/ACE/Kokyu/Kokyu_defs.cpp index afda89b8016..e474da88d0b 100644 --- a/ACE/Kokyu/Kokyu_defs.cpp +++ b/ACE/Kokyu/Kokyu_defs.cpp @@ -6,7 +6,7 @@ namespace Kokyu { - Dispatch_Command::~Dispatch_Command (void) + Dispatch_Command::~Dispatch_Command () { } diff --git a/ACE/Kokyu/Kokyu_defs.h b/ACE/Kokyu/Kokyu_defs.h index e0942a97845..409991c9670 100644 --- a/ACE/Kokyu/Kokyu_defs.h +++ b/ACE/Kokyu/Kokyu_defs.h @@ -134,12 +134,12 @@ namespace Kokyu int can_be_deleted () const; - void destroy (void); + void destroy (); protected: /// Destructor // only inheritance is possible and object should be on heap, // since object could be handed over to a different thread. - virtual ~Dispatch_Command (void); + virtual ~Dispatch_Command (); private: int dont_delete_; diff --git a/ACE/Kokyu/Kokyu_dsrt.cpp b/ACE/Kokyu/Kokyu_dsrt.cpp index 604e3c57d48..5832b22dd03 100644 --- a/ACE/Kokyu/Kokyu_dsrt.cpp +++ b/ACE/Kokyu/Kokyu_dsrt.cpp @@ -15,8 +15,8 @@ template <class DSRT_Scheduler_Traits> void DSRT_Dispatcher<DSRT_Scheduler_Traits>::implementation (DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>* impl) { - auto_ptr<DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits> > tmp_impl (impl); - dispatcher_impl_ = tmp_impl; + std::unique_ptr<DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits> > tmp_impl (impl); + dispatcher_impl_ = std::move(tmp_impl); } template <class DSRT_Scheduler_Traits> diff --git a/ACE/Kokyu/Kokyu_dsrt.h b/ACE/Kokyu/Kokyu_dsrt.h index 0c00c1f346c..6cba50c3d68 100644 --- a/ACE/Kokyu/Kokyu_dsrt.h +++ b/ACE/Kokyu/Kokyu_dsrt.h @@ -67,7 +67,7 @@ namespace Kokyu private: /// Auto ptr to the implementation. Implementation will be created on the /// heap and deleted automatically when the dispatcher object is destructed. - auto_ptr<DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits> > dispatcher_impl_; + std::unique_ptr<DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits> > dispatcher_impl_; }; @@ -85,7 +85,7 @@ namespace Kokyu class DSRT_Dispatcher_Factory : private ACE_Copy_Disabled { public: - typedef auto_ptr<DSRT_Dispatcher<DSRT_Scheduler_Traits> > DSRT_Dispatcher_Auto_Ptr; + typedef std::unique_ptr<DSRT_Dispatcher<DSRT_Scheduler_Traits> > DSRT_Dispatcher_Auto_Ptr; /** * Create a dispatcher for dynamic dispatching of threads. diff --git a/ACE/Kokyu/tests/EDF/test.cpp b/ACE/Kokyu/tests/EDF/test.cpp index 32a0860ee36..ed90eafaf87 100644 --- a/ACE/Kokyu/tests/EDF/test.cpp +++ b/ACE/Kokyu/tests/EDF/test.cpp @@ -1,5 +1,3 @@ -#include "ace/Auto_Ptr.h" - #include "Kokyu.h" #include "ace/Task.h" #include "ace/Sched_Params.h" @@ -7,6 +5,7 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_strings.h" #include "ace/OS_NS_sys_time.h" +#include <utility> ACE_CString sched_policy_str = "fifo"; @@ -88,7 +87,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR** argv) ACE_DEBUG ((LM_DEBUG, "before create_dispatcher\n" )); attrs.config_info_set_ = config_info; - auto_ptr<Kokyu::Dispatcher> + std::unique_ptr<Kokyu::Dispatcher> disp (Kokyu::Dispatcher_Factory::create_dispatcher (attrs)); ACE_ASSERT (disp.get() != 0); diff --git a/ACE/Kokyu/tests/FIFO/README b/ACE/Kokyu/tests/FIFO/README index c3d271caaf8..55438c99683 100644 --- a/ACE/Kokyu/tests/FIFO/README +++ b/ACE/Kokyu/tests/FIFO/README @@ -1,5 +1,3 @@ - - This example is a very simple example, showing how to use the Kokyu dispatcher to dispatch command objects in a FIFO manner. The test configures the Kokyu dispatcher with 3 FIFO lanes, each having a diff --git a/ACE/Kokyu/tests/FIFO/test.cpp b/ACE/Kokyu/tests/FIFO/test.cpp index d9a86aeb225..e7cd1071cb9 100644 --- a/ACE/Kokyu/tests/FIFO/test.cpp +++ b/ACE/Kokyu/tests/FIFO/test.cpp @@ -1,10 +1,9 @@ -#include "ace/Auto_Ptr.h" - #include "Kokyu.h" #include "ace/Task.h" #include "ace/SString.h" #include "ace/Get_Opt.h" #include "ace/OS_NS_strings.h" +#include <utility> ACE_CString sched_policy_str = "fifo"; @@ -98,7 +97,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR** argv) attrs.config_info_set_ = config_info; ACE_DEBUG ((LM_DEBUG, "before create_dispatcher\n" )); - auto_ptr<Kokyu::Dispatcher> + std::unique_ptr<Kokyu::Dispatcher> disp (Kokyu::Dispatcher_Factory::create_dispatcher (attrs)); ACE_ASSERT (disp.get() != 0); diff --git a/ACE/ace/Get_Opt.h b/ACE/ace/Get_Opt.h index e25fb23487c..040df2b8cb2 100644 --- a/ACE/ace/Get_Opt.h +++ b/ACE/ace/Get_Opt.h @@ -195,7 +195,7 @@ public: int long_only = 0); #endif /// Default dtor. - ~ACE_Get_Opt (void); + ~ACE_Get_Opt (); /** * Scan elements of @a argv (whose length is @a argc) for short option @@ -233,14 +233,14 @@ public: * @a optstring up unto the first short option character for '+', '-', * and ':' in order to determine ordering and missing argument behavior. */ - int operator () (void); + int operator () (); /** * For communication from @c operator() to the caller. When * @c operator() finds an option that takes an argument, the argument * value is returned from this method, otherwise it returns 0. */ - ACE_TCHAR *opt_arg (void) const; + ACE_TCHAR *opt_arg () const; /** * Returns the most recently matched option character. Especially @@ -248,7 +248,7 @@ public: * that's required, since this allows the caller to learn what option * was specified without its required argument. */ - int opt_opt (void); + int opt_opt (); /** * Index in @a argv of the next element to be scanned. This is used @@ -262,7 +262,7 @@ public: * Otherwise, @c opt_ind() communicates from one call to the next how * much of @a argv has been scanned so far. */ - int &opt_ind (void); + int &opt_ind (); /// Adds a long option with no corresponding short option. /** @@ -298,26 +298,26 @@ public: /// Returns the name of the long option found on the last call to /// @c operator() or 0 if none was found. - const ACE_TCHAR *long_option (void) const; + const ACE_TCHAR *long_option () const; /// The number of arguments in the internal @c argv_. - int argc (void) const; + int argc () const; /// Accessor for the internal @c argv_ pointer. - ACE_TCHAR **argv (void) const; + ACE_TCHAR **argv () const; /// Accessor for the @c last_option that was processed. This allows /// applications to know if the found option was a short or long /// option, and is especially useful in cases where it was invalid /// and the caller wants to print out the invalid value. - const ACE_TCHAR *last_option (void) const; + const ACE_TCHAR *last_option () const; /// Dump the state of an object. - void dump (void) const; + void dump () const; /// Return the @a optstring. This is handy to verify that calls to /// long_option added short options as expected. - const ACE_TCHAR *optstring (void) const; + const ACE_TCHAR *optstring () const; public: /* @@ -387,7 +387,7 @@ private: int val = 0); /// Dtor. - ~ACE_Get_Opt_Long_Option (void); + ~ACE_Get_Opt_Long_Option (); bool operator < (const ACE_Get_Opt_Long_Option &rhs); @@ -409,21 +409,21 @@ private: }; /// Updates nextchar_. - int nextchar_i (void); + int nextchar_i (); /// Handles long options. - int long_option_i (void); + int long_option_i (); /// Handles short options. - int short_option_i (void); + int short_option_i (); /// If permuting args, this functions manages the nonopt_start_ and /// nonopt_end_ indexes and makes calls to permute to actually /// reorder the <argv>-elements. - void permute_args (void); + void permute_args (); /// Handles reordering <argv>-elements. - int permute (void); + int permute (); /// Set last_option. void last_option (const ACE_TString &s); diff --git a/ACE/ace/Get_Opt.inl b/ACE/ace/Get_Opt.inl index 32de1d85c18..950d707ec98 100644 --- a/ACE/ace/Get_Opt.inl +++ b/ACE/ace/Get_Opt.inl @@ -8,31 +8,31 @@ ACE_Get_Opt::ACE_Get_Opt_Long_Option::operator < (const ACE_Get_Opt_Long_Option } ACE_INLINE int -ACE_Get_Opt::argc (void) const +ACE_Get_Opt::argc () const { return this->argc_; } ACE_INLINE ACE_TCHAR ** -ACE_Get_Opt::argv (void) const +ACE_Get_Opt::argv () const { return this->argv_; } ACE_INLINE ACE_TCHAR* -ACE_Get_Opt::opt_arg (void) const +ACE_Get_Opt::opt_arg () const { return this->optarg; } ACE_INLINE int -ACE_Get_Opt::opt_opt (void) +ACE_Get_Opt::opt_opt () { return this->optopt_; } ACE_INLINE int & -ACE_Get_Opt::opt_ind (void) +ACE_Get_Opt::opt_ind () { return this->optind; } diff --git a/ACE/ace/Malloc_T.cpp b/ACE/ace/Malloc_T.cpp index 0f966f99c8f..b2d117f045c 100644 --- a/ACE/ace/Malloc_T.cpp +++ b/ACE/ace/Malloc_T.cpp @@ -55,7 +55,7 @@ ACE_Cached_Allocator<T, ACE_LOCK>::ACE_Cached_Allocator (size_t n_chunks) } template <class T, class ACE_LOCK> -ACE_Cached_Allocator<T, ACE_LOCK>::~ACE_Cached_Allocator (void) +ACE_Cached_Allocator<T, ACE_LOCK>::~ACE_Cached_Allocator () { #if defined (ACE_HAS_ALLOC_HOOKS) ACE_Allocator::instance()->free (this->pool_); @@ -131,7 +131,7 @@ ACE_Dynamic_Cached_Allocator<ACE_LOCK>::ACE_Dynamic_Cached_Allocator } template <class ACE_LOCK> -ACE_Dynamic_Cached_Allocator<ACE_LOCK>::~ACE_Dynamic_Cached_Allocator (void) +ACE_Dynamic_Cached_Allocator<ACE_LOCK>::~ACE_Dynamic_Cached_Allocator () { delete [] this->pool_; this->pool_ = 0; @@ -204,7 +204,7 @@ ACE_Allocator_Adapter<MALLOC>::calloc (size_t n_elem, } template <class MALLOC> MALLOC & -ACE_Allocator_Adapter<MALLOC>::alloc (void) +ACE_Allocator_Adapter<MALLOC>::alloc () { ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::allocator"); return this->allocator_; @@ -218,7 +218,7 @@ ACE_Allocator_Adapter<MALLOC>::free (void *ptr) } template <class MALLOC> int -ACE_Allocator_Adapter<MALLOC>::remove (void) +ACE_Allocator_Adapter<MALLOC>::remove () { ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::remove"); return this->allocator_.remove (); @@ -339,7 +339,7 @@ ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter ( #endif /* ACE_HAS_WCHAR */ template <class MALLOC> -ACE_Allocator_Adapter<MALLOC>::~ACE_Allocator_Adapter (void) +ACE_Allocator_Adapter<MALLOC>::~ACE_Allocator_Adapter () { ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::~ACE_Allocator_Adapter"); } @@ -354,7 +354,7 @@ ACE_Allocator_Adapter<MALLOC>::print_stats (void) const #endif /* ACE_HAS_MALLOC_STATS */ template <class MALLOC> void -ACE_Allocator_Adapter<MALLOC>::dump (void) const +ACE_Allocator_Adapter<MALLOC>::dump () const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::dump"); @@ -365,7 +365,7 @@ ACE_Allocator_Adapter<MALLOC>::dump (void) const ACE_ALLOC_HOOK_DEFINE_Tt(ACE_Allocator_Adapter) template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump () const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump"); @@ -430,7 +430,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::free (void *ptr) // initialize the control block pointer. template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open () { ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open"); ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); @@ -577,7 +577,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_T (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_T () { ACE_TRACE ("ACE_Malloc_T<MEM_POOL>::~ACE_Malloc_T<MEM_POOL>"); if (this->delete_lock_) @@ -590,7 +590,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_T (void) // Clean up the resources allocated by ACE_Malloc_T. template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::remove (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::remove () { ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::remove"); // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) destroying ACE_Malloc_T\n"))); @@ -1053,7 +1053,7 @@ ACE_Malloc_Lock_Adapter_T<ACE_LOCK>::operator () (const ACE_TCHAR *name) /*****************************************************************************/ template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void -ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const +ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump () const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump"); @@ -1085,7 +1085,7 @@ ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_LIFO_It } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> -ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_LIFO_Iterator_T (void) +ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_LIFO_Iterator_T () { ACE_OS::free ((void *) this->name_); } @@ -1121,7 +1121,7 @@ ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next (void *&next_ } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int -ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done (void) const +ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done () const { ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done"); @@ -1129,7 +1129,7 @@ ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done (void) const } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int -ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance (void) +ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance () { ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance"); @@ -1147,7 +1147,7 @@ ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance (void) } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void -ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const +ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump () const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump"); @@ -1181,7 +1181,7 @@ ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_FIFO_It } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> -ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_FIFO_Iterator_T (void) +ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_FIFO_Iterator_T () { ACE_OS::free ((void *) this->name_); } @@ -1217,7 +1217,7 @@ ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next (void *&next_ } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int -ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done (void) const +ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done () const { ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done"); @@ -1225,7 +1225,7 @@ ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done (void) const } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int -ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance (void) +ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance () { ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance"); @@ -1243,7 +1243,7 @@ ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance (void) } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int -ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::start (void) +ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::start () { this->curr_ = this->curr_->next_; NAME_NODE *prev = 0; diff --git a/ACE/ace/Malloc_T.h b/ACE/ace/Malloc_T.h index 0b622ec3df2..25998a9fb96 100644 --- a/ACE/ace/Malloc_T.h +++ b/ACE/ace/Malloc_T.h @@ -43,10 +43,10 @@ class ACE_Cached_Mem_Pool_Node { public: /// Return the address of free memory. - T *addr (void); + T *addr (); /// Get the next ACE_Cached_Mem_Pool_Node in a list. - ACE_Cached_Mem_Pool_Node<T> *get_next (void); + ACE_Cached_Mem_Pool_Node<T> *get_next (); /// Set the next ACE_Cached_Mem_Pool_Node. void set_next (ACE_Cached_Mem_Pool_Node<T> *ptr); @@ -90,7 +90,7 @@ public: ACE_Cached_Allocator (size_t n_chunks); /// Clear things up. - ~ACE_Cached_Allocator (void); + ~ACE_Cached_Allocator (); /** * Get a chunk of memory from free list cache. Note that @a nbytes is @@ -119,7 +119,7 @@ public: void free (void *); /// Return the number of chunks available in the cache. - size_t pool_depth (void); + size_t pool_depth (); ACE_ALLOC_HOOK_DECLARE; @@ -157,7 +157,7 @@ public: ACE_Dynamic_Cached_Allocator (size_t n_chunks, size_t chunk_size); /// Clear things up. - ~ACE_Dynamic_Cached_Allocator (void); + ~ACE_Dynamic_Cached_Allocator (); /** * Get a chunk of memory from free list cache. Note that @a nbytes is @@ -186,7 +186,7 @@ public: void free (void *); /// Return the number of chunks available in the cache. - size_t pool_depth (void); + size_t pool_depth (); private: /// Remember how we allocate the memory in the first place so @@ -251,7 +251,7 @@ public: #endif /* ACE_HAS_WCHAR */ /// Destructor. - virtual ~ACE_Allocator_Adapter (void); + virtual ~ACE_Allocator_Adapter (); // = Memory Management @@ -271,7 +271,7 @@ public: virtual void free (void *ptr); /// Remove any resources associated with this memory manager. - virtual int remove (void); + virtual int remove (); // = Map manager like functions @@ -338,7 +338,7 @@ public: virtual int protect (void *addr, size_t len, int prot = PROT_RDWR); /// Returns the underlying allocator. - ALLOCATOR &alloc (void); + ALLOCATOR &alloc (); #if defined (ACE_HAS_MALLOC_STATS) /// Dump statistics of how malloc is behaving. @@ -346,7 +346,7 @@ public: #endif /* ACE_HAS_MALLOC_STATS */ /// Dump the state of the object. - virtual void dump (void) const; + virtual void dump () const; ACE_ALLOC_HOOK_DECLARE; @@ -370,7 +370,7 @@ template <size_t POOL_SIZE> class ACE_Static_Allocator : public ACE_Static_Allocator_Base { public: - ACE_Static_Allocator (void) + ACE_Static_Allocator () : ACE_Static_Allocator_Base (pool_, POOL_SIZE) { // This function <{must}> be inlined!!! @@ -480,16 +480,16 @@ public: ACE_LOCK *lock); /// Destructor - ~ACE_Malloc_T (void); + ~ACE_Malloc_T (); /// Get Reference counter. - int ref_counter (void); + int ref_counter (); /// Release ref counter. int release (int close = 0); /// Releases resources allocated by this object. - int remove (void); + int remove (); // = Memory management @@ -510,7 +510,7 @@ public: void free (void *ptr); /// Returns a reference to the underlying memory pool. - MEMORY_POOL &memory_pool (void); + MEMORY_POOL &memory_pool (); // = Map manager like functions @@ -602,16 +602,16 @@ public: /// Returns a pointer to the lock used to provide mutual exclusion to /// an ACE_Malloc allocator. - ACE_LOCK &mutex (void); + ACE_LOCK &mutex (); /// Dump the state of an object. - void dump (void) const; + void dump () const; /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; /// Return cb_ptr value. - void *base_addr (void); + void *base_addr (); /** * Bad flag. This operation should be called immediately after the @@ -621,11 +621,11 @@ public: * @retval 0 if all is fine. non-zero if this malloc object is * unuable. */ - int bad (void); + int bad (); private: /// Initialize the Malloc pool. - int open (void); + int open (); /// Associate @a name with @a pointer. Assumes that locks are held by /// callers. @@ -703,12 +703,12 @@ public: const char *name = 0); /// Destructor. - ~ACE_Malloc_LIFO_Iterator_T (void); + ~ACE_Malloc_LIFO_Iterator_T (); // = Iteration methods. /// Returns 1 when all items have been seen, else 0. - int done (void) const; + int done () const; /// Pass back the next entry in the set that hasn't yet been /// visited. Returns 0 when all items have been seen, else 1. @@ -723,10 +723,10 @@ public: /// Move forward by one element in the set. Returns 0 when all the /// items in the set have been seen, else 1. - int advance (void); + int advance (); /// Dump the state of an object. - void dump (void) const; + void dump () const; /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; @@ -771,12 +771,12 @@ public: const char *name = 0); /// Destructor. - ~ACE_Malloc_FIFO_Iterator_T (void); + ~ACE_Malloc_FIFO_Iterator_T (); // = Iteration methods. /// Returns 1 when all items have been seen, else 0. - int done (void) const; + int done () const; /// Pass back the next entry in the set that hasn't yet been /// visited. Returns 0 when all items have been seen, else 1. @@ -791,14 +791,14 @@ public: /// Move forward by one element in the set. Returns 0 when all the /// items in the set have been seen, else 1. - int advance (void); + int advance (); /// Go to the starting element that was inserted first. Returns 0 /// when there is no item in the set, else 1. - int start (void); + int start (); /// Dump the state of an object. - void dump (void) const; + void dump () const; /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; diff --git a/ACE/ace/Malloc_T.inl b/ACE/ace/Malloc_T.inl index 42321a18a4e..8a8d939c972 100644 --- a/ACE/ace/Malloc_T.inl +++ b/ACE/ace/Malloc_T.inl @@ -4,7 +4,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class T> ACE_INLINE T * -ACE_Cached_Mem_Pool_Node<T>::addr (void) +ACE_Cached_Mem_Pool_Node<T>::addr () { // This should be done using a single reinterpret_cast, but Sun/CC // (4.2) gets awfully confused when T is a char[20] (and maybe other @@ -13,7 +13,7 @@ ACE_Cached_Mem_Pool_Node<T>::addr (void) } template <class T> ACE_INLINE ACE_Cached_Mem_Pool_Node<T> * -ACE_Cached_Mem_Pool_Node<T>::get_next (void) +ACE_Cached_Mem_Pool_Node<T>::get_next () { return this->next_; } @@ -27,19 +27,19 @@ ACE_Cached_Mem_Pool_Node<T>::set_next (ACE_Cached_Mem_Pool_Node<T> *ptr) ACE_ALLOC_HOOK_DEFINE_Tc(ACE_Cached_Mem_Pool_Node) template <class T, class ACE_LOCK> ACE_INLINE size_t -ACE_Cached_Allocator<T, ACE_LOCK>::pool_depth (void) +ACE_Cached_Allocator<T, ACE_LOCK>::pool_depth () { return this->free_list_.size (); } template <class ACE_LOCK> ACE_INLINE size_t -ACE_Dynamic_Cached_Allocator<ACE_LOCK>::pool_depth (void) +ACE_Dynamic_Cached_Allocator<ACE_LOCK>::pool_depth () { return this->free_list_.size (); } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ref_counter (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ref_counter () { ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); if (this->cb_ptr_ != 0) @@ -49,7 +49,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ref_counter (void) } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::bad (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::bad () { return this->bad_flag_; } @@ -77,7 +77,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::release (int close) } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE ACE_MEM_POOL & -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::memory_pool (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::memory_pool () { ACE_TRACE ("ACE_Malloc_T<MEMORY_POOL, ACE_LOCK, ACE_CB>::memory_pool"); return this->memory_pool_; @@ -118,13 +118,13 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::protect (void *addr, } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE ACE_LOCK & -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::mutex (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::mutex () { return *this->lock_; } template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE void * -ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::base_addr (void) +ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::base_addr () { return this->cb_ptr_; } diff --git a/ACE/ace/Sched_Params.h b/ACE/ace/Sched_Params.h index ba496741269..7ca200bbf46 100644 --- a/ACE/ace/Sched_Params.h +++ b/ACE/ace/Sched_Params.h @@ -78,24 +78,24 @@ public: const ACE_Time_Value &quantum = ACE_Time_Value::zero); /// Termination. - ~ACE_Sched_Params (void); + ~ACE_Sched_Params (); // = Get/Set methods: // = Get/Set policy - Policy policy (void) const; + Policy policy () const; void policy (const Policy); // = Get/Set priority. - ACE_Sched_Priority priority (void) const; + ACE_Sched_Priority priority () const; void priority (const ACE_Sched_Priority); // = Get/Set scope. - int scope (void) const; + int scope () const; void scope(const int); // = Get/Set quantum. - const ACE_Time_Value &quantum (void) const; + const ACE_Time_Value &quantum () const; void quantum (const ACE_Time_Value &); // = Accessors for OS-specific priorities. @@ -184,23 +184,23 @@ public: int scope = ACE_SCOPE_THREAD); /// Default dtor. - ~ACE_Sched_Priority_Iterator (void); + ~ACE_Sched_Priority_Iterator (); /// Check if there are more priorities. - int more (void) const; + int more () const; /// Return the current priority. - int priority (void) const; + int priority () const; /// Move to the next priority. /// The iteration is from lowest to highest importance. - void next (void); + void next (); /// Accessor for the scheduling policy over which we are iterating. - const ACE_Sched_Params::Policy &policy (void) const; + const ACE_Sched_Params::Policy &policy () const; /// Accessor for the scheduling - int scope (void) const; + int scope () const; private: /// The Scheduling policy (FIFO, RR, etc.) and scheduling scope diff --git a/ACE/ace/Sched_Params.inl b/ACE/ace/Sched_Params.inl index 5392611ac08..1aef3ec8466 100644 --- a/ACE/ace/Sched_Params.inl +++ b/ACE/ace/Sched_Params.inl @@ -24,12 +24,12 @@ ACE_Sched_Params::ACE_Sched_Params ( { } -ACE_INLINE ACE_Sched_Params::~ACE_Sched_Params (void) +ACE_INLINE ACE_Sched_Params::~ACE_Sched_Params () { } ACE_INLINE ACE_Sched_Params::Policy -ACE_Sched_Params::policy (void) const +ACE_Sched_Params::policy () const { return this->policy_; } @@ -41,7 +41,7 @@ ACE_Sched_Params::policy (const ACE_Sched_Params::Policy policy) } ACE_INLINE ACE_Sched_Priority -ACE_Sched_Params::priority (void) const +ACE_Sched_Params::priority () const { return this->priority_; } @@ -53,7 +53,7 @@ ACE_Sched_Params::priority (const ACE_Sched_Priority priority) } ACE_INLINE int -ACE_Sched_Params::scope (void) const +ACE_Sched_Params::scope () const { return this->scope_; } @@ -65,7 +65,7 @@ ACE_Sched_Params::scope (const int scope) } ACE_INLINE const ACE_Time_Value & -ACE_Sched_Params::quantum (void) const +ACE_Sched_Params::quantum () const { return this->quantum_; } @@ -77,13 +77,13 @@ ACE_Sched_Params::quantum (const ACE_Time_Value &quant) } ACE_INLINE const ACE_Sched_Params::Policy & -ACE_Sched_Priority_Iterator::policy (void) const +ACE_Sched_Priority_Iterator::policy () const { return this->policy_; } ACE_INLINE int -ACE_Sched_Priority_Iterator::scope (void) const +ACE_Sched_Priority_Iterator::scope () const { return this->scope_; } @@ -100,24 +100,24 @@ ACE_Sched_Priority_Iterator::ACE_Sched_Priority_Iterator (const ACE_Sched_Params } ACE_INLINE -ACE_Sched_Priority_Iterator::~ACE_Sched_Priority_Iterator (void) +ACE_Sched_Priority_Iterator::~ACE_Sched_Priority_Iterator () { } ACE_INLINE int -ACE_Sched_Priority_Iterator::more (void) const +ACE_Sched_Priority_Iterator::more () const { return !this->done_; } ACE_INLINE int -ACE_Sched_Priority_Iterator::priority (void) const +ACE_Sched_Priority_Iterator::priority () const { return this->priority_; } ACE_INLINE void -ACE_Sched_Priority_Iterator::next (void) +ACE_Sched_Priority_Iterator::next () { if (this->done_) return; |