summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-09-28 10:39:39 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-09-28 10:39:39 +0200
commit3e4ebe5de44b75f77ffff3929546d0e9aba94941 (patch)
tree0574bc1f4894e6f12ab8c319adada50c4dd7c581
parentb5c94111662dfcc8dab19dc1c84e716e9cfc7f26 (diff)
downloadATCD-3e4ebe5de44b75f77ffff3929546d0e9aba94941.tar.gz
Use default/delete
* ACE/ace/Hashable.inl: Deleted. * ACE/ace/Configuration.cpp: * ACE/ace/Configuration.h: * ACE/ace/Connection_Recycling_Strategy.cpp: * ACE/ace/Connection_Recycling_Strategy.h: * ACE/ace/Hashable.cpp: * ACE/ace/Hashable.h: * ACE/ace/Lock.cpp: * ACE/ace/Lock.h: * ACE/ace/Notification_Strategy.cpp: * ACE/ace/Notification_Strategy.h: * ACE/ace/Refcountable_T.cpp: * ACE/ace/Refcountable_T.h: * ACE/ace/Registry_Name_Space.cpp: * ACE/ace/Registry_Name_Space.h: * ACE/ace/Remote_Tokens.h: * ACE/ace/Token_Request_Reply.cpp: * ACE/ace/Token_Request_Reply.h: * ACE/ace/UUID.h: * ACE/ace/UUID.inl:
-rw-r--r--ACE/ace/Configuration.cpp18
-rw-r--r--ACE/ace/Configuration.h20
-rw-r--r--ACE/ace/Connection_Recycling_Strategy.cpp4
-rw-r--r--ACE/ace/Connection_Recycling_Strategy.h2
-rw-r--r--ACE/ace/Hashable.cpp8
-rw-r--r--ACE/ace/Hashable.h10
-rw-r--r--ACE/ace/Hashable.inl10
-rw-r--r--ACE/ace/Lock.cpp13
-rw-r--r--ACE/ace/Lock.h8
-rw-r--r--ACE/ace/Notification_Strategy.cpp4
-rw-r--r--ACE/ace/Notification_Strategy.h2
-rw-r--r--ACE/ace/Refcountable_T.cpp9
-rw-r--r--ACE/ace/Refcountable_T.h2
-rw-r--r--ACE/ace/Registry_Name_Space.cpp11
-rw-r--r--ACE/ace/Registry_Name_Space.h5
-rw-r--r--ACE/ace/Remote_Tokens.h4
-rw-r--r--ACE/ace/Token_Request_Reply.cpp7
-rw-r--r--ACE/ace/Token_Request_Reply.h6
-rw-r--r--ACE/ace/UUID.h2
-rw-r--r--ACE/ace/UUID.inl6
20 files changed, 27 insertions, 124 deletions
diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp
index 8a37db1fdd5..70110b42acc 100644
--- a/ACE/ace/Configuration.cpp
+++ b/ACE/ace/Configuration.cpp
@@ -20,15 +20,6 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_Section_Key_Internal::ACE_Section_Key_Internal ()
- : ref_count_ (0)
-{
-}
-
-ACE_Section_Key_Internal::~ACE_Section_Key_Internal ()
-{
-}
-
int
ACE_Section_Key_Internal::add_ref ()
{
@@ -44,11 +35,6 @@ ACE_Section_Key_Internal::dec_ref ()
return 0;
}
-ACE_Configuration_Section_Key::ACE_Configuration_Section_Key ()
- : key_ (0)
-{
-}
-
ACE_Configuration_Section_Key::~ACE_Configuration_Section_Key ()
{
if (key_)
@@ -94,10 +80,6 @@ ACE_Configuration::ACE_Configuration ()
{
}
-ACE_Configuration::~ACE_Configuration ()
-{
-}
-
ACE_Section_Key_Internal*
ACE_Configuration::get_internal_key (const ACE_Configuration_Section_Key& key)
{
diff --git a/ACE/ace/Configuration.h b/ACE/ace/Configuration.h
index 44af82ad93d..175e26cf7b6 100644
--- a/ACE/ace/Configuration.h
+++ b/ACE/ace/Configuration.h
@@ -67,19 +67,19 @@ class ACE_Export ACE_Section_Key_Internal
{
public:
/// Virtual destructor, make sure descendants are virtual!
- virtual ~ACE_Section_Key_Internal (void);
+ virtual ~ACE_Section_Key_Internal () = default;
/// Increment reference count
- virtual int add_ref (void);
+ virtual int add_ref ();
/// Decrement reference count. Will delete this if count gets to 0
- virtual int dec_ref (void);
+ virtual int dec_ref ();
protected:
- ACE_Section_Key_Internal (void);
+ ACE_Section_Key_Internal () = default;
ACE_Section_Key_Internal (const ACE_Section_Key_Internal& rhs);
ACE_Section_Key_Internal& operator= (ACE_Section_Key_Internal& rhs);
- u_int ref_count_;
+ u_int ref_count_ {};
};
/**
@@ -96,7 +96,7 @@ class ACE_Export ACE_Configuration_Section_Key
friend class ACE_Configuration;
public:
/// Default constructor.
- ACE_Configuration_Section_Key (void);
+ ACE_Configuration_Section_Key () = default;
/// Constructor that initializes to a pointer to a concrete internal key.
/**
@@ -112,10 +112,9 @@ public:
/// Assignment operator, increments reference count for this object
/// and decrements it on @a rhs.
- ACE_Configuration_Section_Key &
- operator= (const ACE_Configuration_Section_Key &rhs);
+ ACE_Configuration_Section_Key &operator= (const ACE_Configuration_Section_Key &rhs);
private:
- ACE_Section_Key_Internal *key_;
+ ACE_Section_Key_Internal *key_ {};
};
/**
@@ -144,7 +143,7 @@ public:
};
/// Destructor
- virtual ~ACE_Configuration (void);
+ virtual ~ACE_Configuration () = default;
/// Obtain a reference to the root section of this configuration.
/*
@@ -405,7 +404,6 @@ protected:
ACE_Configuration (const ACE_Configuration& rhs);
ACE_Configuration& operator= (const ACE_Configuration& rhs);
-
ACE_Configuration_Section_Key root_;
};
diff --git a/ACE/ace/Connection_Recycling_Strategy.cpp b/ACE/ace/Connection_Recycling_Strategy.cpp
index 19ea7fa7357..cc15fa0c1de 100644
--- a/ACE/ace/Connection_Recycling_Strategy.cpp
+++ b/ACE/ace/Connection_Recycling_Strategy.cpp
@@ -6,8 +6,4 @@ ACE_Connection_Recycling_Strategy::ACE_Connection_Recycling_Strategy ()
{
}
-ACE_Connection_Recycling_Strategy::~ACE_Connection_Recycling_Strategy ()
-{
-}
-
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Connection_Recycling_Strategy.h b/ACE/ace/Connection_Recycling_Strategy.h
index 4b3f1238be2..816cc4285c8 100644
--- a/ACE/ace/Connection_Recycling_Strategy.h
+++ b/ACE/ace/Connection_Recycling_Strategy.h
@@ -30,7 +30,7 @@ public:
ACE_Connection_Recycling_Strategy ();
/// Virtual Destructor
- virtual ~ACE_Connection_Recycling_Strategy ();
+ virtual ~ACE_Connection_Recycling_Strategy () = default;
/// Remove from cache.
virtual int purge (const void *recycling_act) = 0;
diff --git a/ACE/ace/Hashable.cpp b/ACE/ace/Hashable.cpp
index 00fd0dd9be0..8afdd4c054d 100644
--- a/ACE/ace/Hashable.cpp
+++ b/ACE/ace/Hashable.cpp
@@ -1,15 +1,7 @@
#include "ace/Hashable.h"
-#if !defined (__ACE_INLINE__)
-#include "ace/Hashable.inl"
-#endif /* __ACE_INLINE __ */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_Hashable::~ACE_Hashable ()
-{
-}
-
unsigned long
ACE_Hashable::hash () const
{
diff --git a/ACE/ace/Hashable.h b/ACE/ace/Hashable.h
index d8db181c588..6892650be97 100644
--- a/ACE/ace/Hashable.h
+++ b/ACE/ace/Hashable.h
@@ -30,7 +30,7 @@ class ACE_Export ACE_Hashable
{
public:
/// Destructor.
- virtual ~ACE_Hashable ();
+ virtual ~ACE_Hashable () = default;
/// Computes and returns hash value. This "caches" the hash value to
/// improve performance.
@@ -38,7 +38,7 @@ public:
protected:
/// Protected constructor.
- ACE_Hashable ();
+ ACE_Hashable () = default;
/// This is the method that actually performs the non-cached hash
/// computation.
@@ -46,15 +46,11 @@ protected:
protected:
/// Pre-computed hash-value.
- mutable unsigned long hash_value_;
+ mutable unsigned long hash_value_ {};
};
ACE_END_VERSIONED_NAMESPACE_DECL
-#if defined (__ACE_INLINE__)
-#include "ace/Hashable.inl"
-#endif /* __ACE_INLINE __ */
-
#include /**/ "ace/post.h"
#endif /*ACE_HASHABLE_H*/
diff --git a/ACE/ace/Hashable.inl b/ACE/ace/Hashable.inl
deleted file mode 100644
index 2a6d55f1388..00000000000
--- a/ACE/ace/Hashable.inl
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- C++ -*-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
-ACE_INLINE
-ACE_Hashable::ACE_Hashable ()
- : hash_value_ (0)
-{
-}
-
-ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Lock.cpp b/ACE/ace/Lock.cpp
index 9b89681f1ee..977c4638f67 100644
--- a/ACE/ace/Lock.cpp
+++ b/ACE/ace/Lock.cpp
@@ -6,19 +6,6 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_Lock::~ACE_Lock ()
-{
-}
-
-ACE_Adaptive_Lock::ACE_Adaptive_Lock ()
- : lock_ (0)
-{
-}
-
-ACE_Adaptive_Lock::~ACE_Adaptive_Lock ()
-{
-}
-
int
ACE_Adaptive_Lock::remove ()
{
diff --git a/ACE/ace/Lock.h b/ACE/ace/Lock.h
index c68a156feb1..6a24255df90 100644
--- a/ACE/ace/Lock.h
+++ b/ACE/ace/Lock.h
@@ -43,7 +43,7 @@ public:
ACE_Lock ();
/// Noop virtual destructor
- virtual ~ACE_Lock ();
+ virtual ~ACE_Lock () = default;
/**
* Explicitly destroy the lock. Note that only one thread should
@@ -121,7 +121,7 @@ class ACE_Export ACE_Adaptive_Lock : public ACE_Lock
public:
/// You must also override the destructor function to match with how
/// you construct the underneath @c lock_.
- virtual ~ACE_Adaptive_Lock ();
+ virtual ~ACE_Adaptive_Lock () = default;
// = Lock/unlock operations.
@@ -142,9 +142,9 @@ protected:
* The default constructor simply set the @c lock_ to 0 (null). You
* must overwrite this method for this class to work.
*/
- ACE_Adaptive_Lock ();
+ ACE_Adaptive_Lock () = default;
- ACE_Lock *lock_;
+ ACE_Lock *lock_ {};
};
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Notification_Strategy.cpp b/ACE/ace/Notification_Strategy.cpp
index 5df0b52dadf..688169c23fb 100644
--- a/ACE/ace/Notification_Strategy.cpp
+++ b/ACE/ace/Notification_Strategy.cpp
@@ -13,8 +13,4 @@ ACE_Notification_Strategy::ACE_Notification_Strategy (ACE_Event_Handler *eh,
{
}
-ACE_Notification_Strategy::~ACE_Notification_Strategy ()
-{
-}
-
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Notification_Strategy.h b/ACE/ace/Notification_Strategy.h
index a517babd68a..39453792ded 100644
--- a/ACE/ace/Notification_Strategy.h
+++ b/ACE/ace/Notification_Strategy.h
@@ -38,7 +38,7 @@ public:
ACE_Notification_Strategy (ACE_Event_Handler *eh, ACE_Reactor_Mask mask);
/// Destructor.
- virtual ~ACE_Notification_Strategy ();
+ virtual ~ACE_Notification_Strategy () = default;
virtual int notify () = 0;
virtual int notify (ACE_Event_Handler *, ACE_Reactor_Mask mask) = 0;
diff --git a/ACE/ace/Refcountable_T.cpp b/ACE/ace/Refcountable_T.cpp
index b0d79661193..5d5d1b0f1c4 100644
--- a/ACE/ace/Refcountable_T.cpp
+++ b/ACE/ace/Refcountable_T.cpp
@@ -7,13 +7,4 @@
#include "ace/Refcountable_T.inl"
#endif /* __ACE_INLINE__ */
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
-template <class ACE_LOCK>
-ACE_Refcountable_T<ACE_LOCK>::~ACE_Refcountable_T ()
-{
-}
-
-ACE_END_VERSIONED_NAMESPACE_DECL
-
#endif /* !ACE_REFCOUNTABLE_T_CPP */
diff --git a/ACE/ace/Refcountable_T.h b/ACE/ace/Refcountable_T.h
index 0d7f09829ae..73b6d04021e 100644
--- a/ACE/ace/Refcountable_T.h
+++ b/ACE/ace/Refcountable_T.h
@@ -29,7 +29,7 @@ class ACE_Refcountable_T
{
public:
/// Destructor.
- virtual ~ACE_Refcountable_T ();
+ virtual ~ACE_Refcountable_T () = default;
/// Increment refcount
long increment ();
diff --git a/ACE/ace/Registry_Name_Space.cpp b/ACE/ace/Registry_Name_Space.cpp
index 7b3587c00f3..7422a7db69d 100644
--- a/ACE/ace/Registry_Name_Space.cpp
+++ b/ACE/ace/Registry_Name_Space.cpp
@@ -1,16 +1,10 @@
#include "ace/Registry_Name_Space.h"
-
-
#if (defined (ACE_WIN32) && defined (ACE_USES_WCHAR))
// This only works on Win32 platforms when ACE_USES_WCHAR is turned on
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_Registry_Name_Space::ACE_Registry_Name_Space (void)
-{
-}
-
ACE_Registry_Name_Space::ACE_Registry_Name_Space (ACE_Name_Options *name_options)
{
if (this->open (name_options) != 0)
@@ -19,11 +13,6 @@ ACE_Registry_Name_Space::ACE_Registry_Name_Space (ACE_Name_Options *name_options
}
-ACE_Registry_Name_Space::~ACE_Registry_Name_Space (void)
-{
-}
-
-
int
ACE_Registry_Name_Space::open (ACE_Name_Options *name_options)
{
diff --git a/ACE/ace/Registry_Name_Space.h b/ACE/ace/Registry_Name_Space.h
index caf8461cfe2..ee4ea7418a3 100644
--- a/ACE/ace/Registry_Name_Space.h
+++ b/ACE/ace/Registry_Name_Space.h
@@ -44,15 +44,14 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Export ACE_Registry_Name_Space : public ACE_Name_Space
{
public:
-
/// Constructor
- ACE_Registry_Name_Space (void);
+ ACE_Registry_Name_Space () = default;
/// Contacts and opens the registry on the specified server
ACE_Registry_Name_Space (ACE_Name_Options *name_options);
/// Destructor
- ~ACE_Registry_Name_Space (void);
+ ~ACE_Registry_Name_Space () = default;
/// Contacts and opens the registry on the specified server
int open (ACE_Name_Options *name_options);
diff --git a/ACE/ace/Remote_Tokens.h b/ACE/ace/Remote_Tokens.h
index d38270357d9..e77398412e2 100644
--- a/ACE/ace/Remote_Tokens.h
+++ b/ACE/ace/Remote_Tokens.h
@@ -47,10 +47,10 @@ class ACE_Export ACE_Remote_Token_Proxy : public ACE_Token_Proxy
{
public:
/// Null construction.
- ACE_Remote_Token_Proxy (void);
+ ACE_Remote_Token_Proxy ();
/// Death.
- virtual ~ACE_Remote_Token_Proxy (void);
+ virtual ~ACE_Remote_Token_Proxy ();
/**
* Same as Token_Proxy. @a name is the string uniquely identifying
diff --git a/ACE/ace/Token_Request_Reply.cpp b/ACE/ace/Token_Request_Reply.cpp
index bdbaddedc72..b584ad3b4d1 100644
--- a/ACE/ace/Token_Request_Reply.cpp
+++ b/ACE/ace/Token_Request_Reply.cpp
@@ -8,13 +8,6 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-// Default "do nothing" constructor.
-ACE_Token_Request::ACE_Token_Request (void)
- : token_name_ (0),
- client_id_ (0)
-{
-}
-
// Create a ACE_Token_Request message.
ACE_Token_Request::ACE_Token_Request (int token_type,
diff --git a/ACE/ace/Token_Request_Reply.h b/ACE/ace/Token_Request_Reply.h
index 7452648809c..d1e88edf5a3 100644
--- a/ACE/ace/Token_Request_Reply.h
+++ b/ACE/ace/Token_Request_Reply.h
@@ -58,7 +58,7 @@ public:
};
/// Default constructor.
- ACE_Token_Request ();
+ ACE_Token_Request () = default;
/**
* @param token_type MUTEX, RWLOCK
@@ -183,10 +183,10 @@ private:
} transfer_;
/// Pointer to the beginning of the token name in this->data_.
- ACE_TCHAR *token_name_;
+ ACE_TCHAR *token_name_ {};
/// Pointer to the beginning of the client id in this->data_;
- ACE_TCHAR *client_id_;
+ ACE_TCHAR *client_id_ {};
/// Holds arg, sec, usec, etc.
ACE_Synch_Options options_;
diff --git a/ACE/ace/UUID.h b/ACE/ace/UUID.h
index 38fb413da82..33f5018fcda 100644
--- a/ACE/ace/UUID.h
+++ b/ACE/ace/UUID.h
@@ -96,7 +96,7 @@ namespace ACE_Utils
UUID (const UUID &right);
// Destructor
- ~UUID ();
+ ~UUID () = default;
ACE_UINT32 time_low () const;
void time_low (ACE_UINT32);
diff --git a/ACE/ace/UUID.inl b/ACE/ace/UUID.inl
index 12541cb543a..d8602c384a5 100644
--- a/ACE/ace/UUID.inl
+++ b/ACE/ace/UUID.inl
@@ -30,12 +30,6 @@ namespace ACE_Utils
ACE_OS::memcpy (&this->uuid_, &right.uuid_, BINARY_SIZE);
}
- ACE_INLINE
- UUID::~UUID ()
- {
-
- }
-
ACE_INLINE void
UUID::init ()
{