diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-28 11:06:02 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-28 11:06:02 +0200 |
commit | da89a0cbd85364e47d1387a5be0cbb59624ec74d (patch) | |
tree | 64e5865679c264800ec186736b3a87317566cb4d /ACE/ace | |
parent | 3e4ebe5de44b75f77ffff3929546d0e9aba94941 (diff) | |
download | ATCD-da89a0cbd85364e47d1387a5be0cbb59624ec74d.tar.gz |
Use default/uniform initialization
* ACE/ace/Map_Manager.h:
* ACE/ace/Map_Manager.inl:
* ACE/ace/Map_T.cpp:
* ACE/ace/Map_T.h:
* ACE/ace/Map_T.inl:
* ACE/ace/Monitor_Control_Types.cpp:
* ACE/ace/Monitor_Control_Types.h:
* ACE/ace/Monitor_Point_Registry.cpp:
* ACE/ace/Monitor_Point_Registry.h:
* ACE/ace/Node.cpp:
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Map_Manager.h | 14 | ||||
-rw-r--r-- | ACE/ace/Map_Manager.inl | 16 | ||||
-rw-r--r-- | ACE/ace/Map_T.cpp | 22 | ||||
-rw-r--r-- | ACE/ace/Map_T.h | 28 | ||||
-rw-r--r-- | ACE/ace/Map_T.inl | 11 | ||||
-rw-r--r-- | ACE/ace/Monitor_Control_Types.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Monitor_Control_Types.h | 4 | ||||
-rw-r--r-- | ACE/ace/Monitor_Point_Registry.cpp | 11 | ||||
-rw-r--r-- | ACE/ace/Monitor_Point_Registry.h | 4 | ||||
-rw-r--r-- | ACE/ace/Node.cpp | 3 |
10 files changed, 18 insertions, 99 deletions
diff --git a/ACE/ace/Map_Manager.h b/ACE/ace/Map_Manager.h index 80e2a3a62c6..99ef7f94021 100644 --- a/ACE/ace/Map_Manager.h +++ b/ACE/ace/Map_Manager.h @@ -38,17 +38,17 @@ class ACE_Map_Entry { public: /// Initialize member variables. - ACE_Map_Entry (); + ACE_Map_Entry () = default; /// We need this destructor to keep some compilers from complaining. /// It's just a no-op, however. - ~ACE_Map_Entry (); + ~ACE_Map_Entry () = default; /// Key used to look up an entry. - EXT_ID ext_id_; + EXT_ID ext_id_ {}; /// The contents of the entry itself. - INT_ID int_id_; + INT_ID int_id_ {}; /// Dump the state of an object. void dump () const; @@ -72,15 +72,15 @@ public: void prev (ACE_UINT32 p); /// Keeps track of the next entry. - ACE_UINT32 next_; + ACE_UINT32 next_ {}; /// Keeps track of the previous entry. - ACE_UINT32 prev_; + ACE_UINT32 prev_ {}; #if defined (ACE_HAS_LAZY_MAP_MANAGER) /// Is this entry free? - bool free_; + bool free_ {true}; #endif /* ACE_HAS_LAZY_MAP_MANAGER */ }; diff --git a/ACE/ace/Map_Manager.inl b/ACE/ace/Map_Manager.inl index 5ef512b49ed..898dbe9f91f 100644 --- a/ACE/ace/Map_Manager.inl +++ b/ACE/ace/Map_Manager.inl @@ -4,22 +4,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template <class EXT_ID, class INT_ID> ACE_INLINE -ACE_Map_Entry<EXT_ID, INT_ID>::ACE_Map_Entry () - : next_ (0), - prev_ (0) -#if defined (ACE_HAS_LAZY_MAP_MANAGER) - , free_ (1) -#endif /* ACE_HAS_LAZY_MAP_MANAGER */ -{ -} - -template <class EXT_ID, class INT_ID> ACE_INLINE -ACE_Map_Entry<EXT_ID, INT_ID>::~ACE_Map_Entry () -{ - // No-op just to keep some compilers happy... -} - template <class EXT_ID, class INT_ID> ACE_INLINE ACE_UINT32 ACE_Map_Entry<EXT_ID, INT_ID>::next () const { diff --git a/ACE/ace/Map_T.cpp b/ACE/ace/Map_T.cpp index 6ebb44e61dd..064682ca78b 100644 --- a/ACE/ace/Map_T.cpp +++ b/ACE/ace/Map_T.cpp @@ -13,27 +13,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template <class KEY, class VALUE> -ACE_Map<KEY, VALUE>::~ACE_Map () -{ -} - -template <class T> -ACE_Iterator_Impl<T>::~ACE_Iterator_Impl () -{ -} - -template <class T> -ACE_Reverse_Iterator_Impl<T>::~ACE_Reverse_Iterator_Impl () -{ -} - -template <class T, class IMPLEMENTATION, class ENTRY> -ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::~ACE_Map_Impl_Iterator_Adapter () -{ -} - - template <class T, class IMPLEMENTATION, class ENTRY> ACE_Iterator_Impl<T> * ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::clone () const { @@ -88,7 +67,6 @@ ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::clone () const return temp; } - template <class T, class IMPLEMENTATION, class ENTRY> int ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const { diff --git a/ACE/ace/Map_T.h b/ACE/ace/Map_T.h index 876dda9ce03..bfe52db6a4d 100644 --- a/ACE/ace/Map_T.h +++ b/ACE/ace/Map_T.h @@ -54,9 +54,8 @@ template <class T> class ACE_Incremental_Key_Generator { public: - /// Constructor. - ACE_Incremental_Key_Generator (); + ACE_Incremental_Key_Generator () = default; /// Functor method: generates a new key. int operator () (T &t); @@ -65,9 +64,8 @@ public: const T& current_value () const; protected: - /// Current value. - T t_; + T t_ {}; }; /** @@ -81,9 +79,8 @@ template <class T> class ACE_Iterator_Impl { public: - /// Destructor. - virtual ~ACE_Iterator_Impl (); + virtual ~ACE_Iterator_Impl () = default; /// Clone. virtual ACE_Iterator_Impl<T> *clone () const = 0; @@ -112,9 +109,8 @@ template <class T> class ACE_Reverse_Iterator_Impl { public: - /// Destructor. - virtual ~ACE_Reverse_Iterator_Impl (); + virtual ~ACE_Reverse_Iterator_Impl () = default; /// Clone. virtual ACE_Reverse_Iterator_Impl<T> *clone () const = 0; @@ -143,7 +139,6 @@ template <class T> class ACE_Iterator { public: - // = Traits. typedef T value_type; typedef ACE_Iterator_Impl<T> implementation; @@ -183,7 +178,6 @@ public: ACE_Iterator_Impl<T> &impl (); protected: - /// Implementation pointer. ACE_Iterator_Impl<T> *implementation_; }; @@ -199,7 +193,6 @@ template <class T> class ACE_Reverse_Iterator { public: - // = Traits. typedef T value_type; typedef ACE_Reverse_Iterator_Impl<T> implementation; @@ -245,7 +238,6 @@ public: ACE_Reverse_Iterator_Impl<T> &impl (); protected: - /// Implementation pointer. ACE_Reverse_Iterator_Impl<T> *implementation_; }; @@ -261,7 +253,6 @@ template <class KEY, class VALUE> class ACE_Map { public: - // = Traits. typedef KEY key_type; @@ -279,7 +270,7 @@ public: reverse_iterator_implementation; /// Close down and release dynamically allocated resources. - virtual ~ACE_Map (); + virtual ~ACE_Map () = default; /// Initialize a map with size @a length. virtual int open (size_t length = ACE_DEFAULT_MAP_SIZE, @@ -423,9 +414,8 @@ public: reverse_iterator rend (); protected: - // = Protected no-op constructor. - ACE_Map (); + ACE_Map () = default; /// Return forward iterator. virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl () = 0; @@ -452,7 +442,6 @@ template <class T, class IMPLEMENTATION, class ENTRY> class ACE_Map_Impl_Iterator_Adapter : public ACE_Iterator_Impl<T> { public: - // = Traits. typedef IMPLEMENTATION implementation; @@ -461,7 +450,7 @@ public: ACE_Map_Impl_Iterator_Adapter (const IMPLEMENTATION &impl); /// Destructor. - virtual ~ACE_Map_Impl_Iterator_Adapter (); + virtual ~ACE_Map_Impl_Iterator_Adapter () = default; /// Clone. virtual ACE_Iterator_Impl<T> *clone () const; @@ -482,7 +471,6 @@ public: IMPLEMENTATION &impl (); protected: - /// All implementation details are forwarded to this class. IMPLEMENTATION implementation_; }; @@ -498,7 +486,6 @@ template <class T, class IMPLEMENTATION, class ENTRY> class ACE_Map_Impl_Reverse_Iterator_Adapter : public ACE_Reverse_Iterator_Impl<T> { public: - // = Traits. typedef IMPLEMENTATION implementation; @@ -528,7 +515,6 @@ public: IMPLEMENTATION &impl (); protected: - /// All implementation details are forwarded to this class. IMPLEMENTATION implementation_; }; diff --git a/ACE/ace/Map_T.inl b/ACE/ace/Map_T.inl index 076819c4d2c..5400cfdde88 100644 --- a/ACE/ace/Map_T.inl +++ b/ACE/ace/Map_T.inl @@ -7,12 +7,6 @@ ACE_Noop_Key_Generator<T>::operator() (T &) return -1; } -template <class T> ACE_INLINE -ACE_Incremental_Key_Generator<T>::ACE_Incremental_Key_Generator () - : t_ (0) -{ -} - template <class T> ACE_INLINE int ACE_Incremental_Key_Generator<T>::operator() (T &t) { @@ -186,11 +180,6 @@ ACE_Reverse_Iterator<T>::impl () return *this->implementation_; } -template <class KEY, class VALUE> ACE_INLINE -ACE_Map<KEY, VALUE>::ACE_Map () -{ -} - template <class KEY, class VALUE> ACE_INLINE ACE_Iterator<ACE_Reference_Pair<const KEY, VALUE> > ACE_Map<KEY, VALUE>::begin () { diff --git a/ACE/ace/Monitor_Control_Types.cpp b/ACE/ace/Monitor_Control_Types.cpp index f5679829841..6b3227e1e45 100644 --- a/ACE/ace/Monitor_Control_Types.cpp +++ b/ACE/ace/Monitor_Control_Types.cpp @@ -26,10 +26,6 @@ namespace ACE //============================================================= - Monitor_Control_Types::Constraint::Constraint () - : control_action (0) - {} - Monitor_Control_Types::Constraint::Constraint (const Constraint& rhs) : expr (rhs.expr), control_action (rhs.control_action) diff --git a/ACE/ace/Monitor_Control_Types.h b/ACE/ace/Monitor_Control_Types.h index 4c7b66f194b..b8ecfda8101 100644 --- a/ACE/ace/Monitor_Control_Types.h +++ b/ACE/ace/Monitor_Control_Types.h @@ -74,7 +74,7 @@ namespace ACE */ struct ACE_Export Constraint { - Constraint (); + Constraint () = default; ~Constraint (); /// Implemented explicitly so reference counting of control @@ -83,7 +83,7 @@ namespace ACE Constraint& operator= (const Constraint& rhs); ACE_CString expr; - Control_Action* control_action; + Control_Action* control_action {}; }; /** diff --git a/ACE/ace/Monitor_Point_Registry.cpp b/ACE/ace/Monitor_Point_Registry.cpp index 05f13aae1d7..b448ab77e89 100644 --- a/ACE/ace/Monitor_Point_Registry.cpp +++ b/ACE/ace/Monitor_Point_Registry.cpp @@ -18,11 +18,6 @@ namespace ACE ACE_Singleton<Monitor_Point_Registry, ACE_SYNCH_MUTEX>::instance (); } - Monitor_Point_Registry::Monitor_Point_Registry () - : constraint_id_ (0) - { - } - bool Monitor_Point_Registry::add (Monitor_Base* type) { @@ -41,9 +36,6 @@ namespace ACE type->add_ref (); status = this->map_.bind (type->name (), type); - - /// Temporary debugging code. -// ACELIB_DEBUG ((LM_DEBUG, "adding %s\n", type->name ())); } if (status == -1) @@ -74,9 +66,6 @@ namespace ACE ACE_CString name_str (name, 0, false); status = this->map_.unbind (name_str, mp); - - /// Temporary debugging code. -// ACELIB_DEBUG ((LM_DEBUG, "removing %s\n", name_str.c_str ())); } if (status == -1) diff --git a/ACE/ace/Monitor_Point_Registry.h b/ACE/ace/Monitor_Point_Registry.h index e6cf87129f6..921804b8071 100644 --- a/ACE/ace/Monitor_Point_Registry.h +++ b/ACE/ace/Monitor_Point_Registry.h @@ -72,7 +72,7 @@ namespace ACE private: /// Prevent that users can make an instance. - Monitor_Point_Registry (); + Monitor_Point_Registry () = default; /// Underlying container for the registry. typedef ACE_Hash_Map_Manager<ACE_CString, @@ -84,7 +84,7 @@ namespace ACE /// Since we're accessed as a singleton, we can keep track of /// dispensing unique ids for constraints. - long constraint_id_; + long constraint_id_ {}; }; } } diff --git a/ACE/ace/Node.cpp b/ACE/ace/Node.cpp index 0e9e5beaa6e..7b6d08c3aab 100644 --- a/ACE/ace/Node.cpp +++ b/ACE/ace/Node.cpp @@ -20,14 +20,12 @@ ACE_Node<T, C>::ACE_Node (const T &i, ACE_Node<T, C> *n) : next_ (n), item_ (i) { - // ACE_TRACE ("ACE_Node<T, C>::ACE_Node"); } template <class T, class C> ACE_Node<T, C>::ACE_Node (ACE_Node<T, C> *n, int) : next_ (n) { - // ACE_TRACE ("ACE_Node<T, C>::ACE_Node"); } template <class T, class C> @@ -35,7 +33,6 @@ ACE_Node<T, C>::ACE_Node (const ACE_Node<T, C> &s) : next_ (s.next_), item_ (s.item_) { - // ACE_TRACE ("ACE_Node<T, C>::ACE_Node"); } ACE_END_VERSIONED_NAMESPACE_DECL |