diff options
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Asynch_IO.h | 1 | ||||
-rw-r--r-- | ACE/ace/Auto_Ptr.h | 4 | ||||
-rw-r--r-- | ACE/ace/Based_Pointer_T.cpp | 22 | ||||
-rw-r--r-- | ACE/ace/Based_Pointer_T.h | 49 | ||||
-rw-r--r-- | ACE/ace/Based_Pointer_T.inl | 50 | ||||
-rw-r--r-- | ACE/ace/Configuration.cpp | 6 | ||||
-rw-r--r-- | ACE/ace/Dev_Poll_Reactor.h | 2 | ||||
-rw-r--r-- | ACE/ace/Event_Handler_Handle_Timeout_Upcall.h | 1 | ||||
-rw-r--r-- | ACE/ace/Future.h | 5 | ||||
-rw-r--r-- | ACE/ace/Get_Opt.h | 2 | ||||
-rw-r--r-- | ACE/ace/Hash_Map_Manager_T.h | 1 | ||||
-rw-r--r-- | ACE/ace/Local_Tokens.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Local_Tokens.h | 7 | ||||
-rw-r--r-- | ACE/ace/MEM_Addr.cpp | 20 | ||||
-rw-r--r-- | ACE/ace/MEM_Addr.h | 5 | ||||
-rw-r--r-- | ACE/ace/Malloc_T.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Process.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Process_Manager.cpp | 3 | ||||
-rw-r--r-- | ACE/ace/SOCK_Dgram_Mcast.h | 1 | ||||
-rw-r--r-- | ACE/ace/SPIPE_Addr.h | 3 | ||||
-rw-r--r-- | ACE/ace/Select_Reactor_Base.h | 2 | ||||
-rw-r--r-- | ACE/ace/Sig_Adapter.cpp | 3 | ||||
-rw-r--r-- | ACE/ace/Sig_Handler.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/UNIX_Addr.h | 3 | ||||
-rw-r--r-- | ACE/ace/UNIX_Addr.inl | 1 | ||||
-rw-r--r-- | ACE/ace/config-win32-msvc-142.h | 8 |
26 files changed, 95 insertions, 120 deletions
diff --git a/ACE/ace/Asynch_IO.h b/ACE/ace/Asynch_IO.h index 819eed30e7c..6584abfc4e8 100644 --- a/ACE/ace/Asynch_IO.h +++ b/ACE/ace/Asynch_IO.h @@ -1556,7 +1556,6 @@ private: ACE_Asynch_Write_Dgram (const ACE_Asynch_Write_Dgram &) = delete; }; - /** * @class ACE_Handler * diff --git a/ACE/ace/Auto_Ptr.h b/ACE/ace/Auto_Ptr.h index 9c10c1fde61..01236ce8198 100644 --- a/ACE/ace/Auto_Ptr.h +++ b/ACE/ace/Auto_Ptr.h @@ -73,6 +73,8 @@ ACE_END_VERSIONED_NAMESPACE_DECL using std::auto_ptr; #else /* !ACE_LACKS_AUTO_PTR */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class auto_ptr * @@ -90,6 +92,8 @@ public: X *operator-> () const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_AUTO_PTR */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Based_Pointer_T.cpp b/ACE/ace/Based_Pointer_T.cpp index e3504108156..9a1b64bd756 100644 --- a/ACE/ace/Based_Pointer_T.cpp +++ b/ACE/ace/Based_Pointer_T.cpp @@ -16,7 +16,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE_Tc(ACE_Based_Pointer_Basic) template <class CONCRETE> -ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (void) +ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer () { ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer"); } @@ -44,14 +44,14 @@ ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (CONCRETE *initial) } template <class CONCRETE> -ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (const void* base_addr, int) +ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (const void *base_addr, int) : ACE_Based_Pointer_Basic<CONCRETE> (base_addr, 0) { ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); } template <class CONCRETE> -ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (void) +ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic () : target_ (0), base_offset_ (0) { @@ -100,22 +100,6 @@ ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (CONCRETE *rhs) } } -template <class CONCRETE> -ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic<CONCRETE> &) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic"); - - ACE_ASSERT (0); // not implemented. -} - -template <class CONCRETE> -ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (const ACE_Based_Pointer<CONCRETE> &rhs) - : ACE_Based_Pointer_Basic<CONCRETE> (rhs) -{ - ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer"); - ACE_ASSERT (0); // not implemented. -} - ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_BASED_POINTER_T_CPP */ diff --git a/ACE/ace/Based_Pointer_T.h b/ACE/ace/Based_Pointer_T.h index 33085713804..902e90f2a36 100644 --- a/ACE/ace/Based_Pointer_T.h +++ b/ACE/ace/Based_Pointer_T.h @@ -59,7 +59,7 @@ public: * based-pointer uses its address as an offset to it's base * address 0. */ - ACE_Based_Pointer_Basic (void); + ACE_Based_Pointer_Basic (); /** * Initialize this object using the @a initial pointer. This @@ -84,48 +84,37 @@ public: */ ACE_Based_Pointer_Basic (CONCRETE *initial); - /// Copy constructor. - ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic<CONCRETE> &); + ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic &) = delete; + ACE_Based_Pointer_Basic (ACE_Based_Pointer_Basic &&) = delete; /// Constructor for know base address. @a o is only used to /// resolve overload ambiguity. ACE_Based_Pointer_Basic (const void *base_addr, int o); - /// Pseudo-assignment operator. - void operator = (CONCRETE *from); + void operator= (CONCRETE *from); - /// Pseudo-assignment operator. - void operator = (const ACE_Based_Pointer_Basic<CONCRETE> &); + void operator= (const ACE_Based_Pointer_Basic &); - /// Dereference operator. CONCRETE operator * () const; - /// Less than operator. - bool operator < (const ACE_Based_Pointer_Basic<CONCRETE> &) const; + bool operator< (const ACE_Based_Pointer_Basic &) const; - /// Less than or equal operator. - bool operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &) const; + bool operator<= (const ACE_Based_Pointer_Basic &) const; - /// Greater than operator. - bool operator > (const ACE_Based_Pointer_Basic<CONCRETE> &) const; + bool operator> (const ACE_Based_Pointer_Basic &) const; - /// Greater than or equal operator. - bool operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &) const; + bool operator>= (const ACE_Based_Pointer_Basic &) const; - /// Equality operator. - bool operator == (const ACE_Based_Pointer_Basic<CONCRETE> &) const; + bool operator== (const ACE_Based_Pointer_Basic &) const; - /// Inequality operator. - bool operator != (const ACE_Based_Pointer_Basic<CONCRETE> &) const; + bool operator!= (const ACE_Based_Pointer_Basic &) const; - /// Subscript operator. - CONCRETE operator [](int index) const; + CONCRETE operator[] (int index) const; - /// Increment operator. void operator+= (int index); /// Returns the underlying memory address of the smart pointer. - operator CONCRETE *() const; + operator CONCRETE * () const; /// Returns the underlying memory address of the smart pointer. CONCRETE *addr () const; @@ -159,7 +148,7 @@ class ACE_Based_Pointer : public ACE_Based_Pointer_Basic<CONCRETE> public: /// Constructor. See constructor for ACE_Based_Pointer_Basic for /// details. - ACE_Based_Pointer (void); + ACE_Based_Pointer (); /// Initialize this object using the <initial> pointer. See /// constructor for ACE_Based_Pointer_Basic for details. @@ -170,17 +159,15 @@ public: /// otherwise ignored. ACE_Based_Pointer (const void *base_addr, int dummy); - /// Copy constructor (not implemented yet). - ACE_Based_Pointer (const ACE_Based_Pointer<CONCRETE> &); + ACE_Based_Pointer (const ACE_Based_Pointer &) = delete; + ACE_Based_Pointer (ACE_Based_Pointer &&) = delete; - /// Assignment operator. - void operator = (const ACE_Based_Pointer<CONCRETE> &); + void operator= (const ACE_Based_Pointer &); /// Pseudo-assignment operator. void operator = (CONCRETE *from); - /// The C++ "delegation operator". - CONCRETE *operator-> (void); + CONCRETE *operator-> (); }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Based_Pointer_T.inl b/ACE/ace/Based_Pointer_T.inl index c9b00d5c703..2b2ff60ee34 100644 --- a/ACE/ace/Based_Pointer_T.inl +++ b/ACE/ace/Based_Pointer_T.inl @@ -5,16 +5,16 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class CONCRETE> ACE_INLINE CONCRETE * -ACE_Based_Pointer<CONCRETE>::operator->(void) +ACE_Based_Pointer<CONCRETE>::operator-> () { ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator->"); return reinterpret_cast<CONCRETE *> (ACE_COMPUTE_BASED_POINTER (this)); } template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer_Basic<CONCRETE>::operator = (CONCRETE *rhs) +ACE_Based_Pointer_Basic<CONCRETE>::operator= (CONCRETE *rhs) { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator ="); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator="); if (rhs == 0) // Store a value of <target_> that indicate "NULL" pointer. this->target_ = -1; @@ -24,9 +24,9 @@ ACE_Based_Pointer_Basic<CONCRETE>::operator = (CONCRETE *rhs) } template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer<CONCRETE>::operator = (CONCRETE *rhs) +ACE_Based_Pointer<CONCRETE>::operator= (CONCRETE *rhs) { - ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator ="); + ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator="); if (rhs == 0) // Store a value of <target_> that indicate "NULL" pointer. this->target_ = -1; @@ -36,7 +36,7 @@ ACE_Based_Pointer<CONCRETE>::operator = (CONCRETE *rhs) } template <class CONCRETE> ACE_INLINE CONCRETE -ACE_Based_Pointer_Basic<CONCRETE>::operator *() const +ACE_Based_Pointer_Basic<CONCRETE>::operator * () const { ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator *"); return *reinterpret_cast<CONCRETE *> (ACE_COMPUTE_BASED_POINTER (this)); @@ -54,7 +54,7 @@ ACE_Based_Pointer_Basic<CONCRETE>::addr () const } template <class CONCRETE> ACE_INLINE -ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *() const +ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE * () const { ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *()"); @@ -62,72 +62,72 @@ ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *() const } template <class CONCRETE> ACE_INLINE CONCRETE -ACE_Based_Pointer_Basic<CONCRETE>::operator [] (int index) const +ACE_Based_Pointer_Basic<CONCRETE>::operator[] (int index) const { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator []"); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator[]"); CONCRETE *c = reinterpret_cast<CONCRETE *> (ACE_COMPUTE_BASED_POINTER (this)); return c[index]; } template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer_Basic<CONCRETE>::operator += (int index) +ACE_Based_Pointer_Basic<CONCRETE>::operator+= (int index) { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator +="); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator+="); this->base_offset_ += (index * sizeof (CONCRETE)); } template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator == (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const +ACE_Based_Pointer_Basic<CONCRETE>::operator== (const ACE_Based_Pointer_Basic &rhs) const { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator =="); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator=="); return ACE_COMPUTE_BASED_POINTER (this) == ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator != (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const +ACE_Based_Pointer_Basic<CONCRETE>::operator!= (const ACE_Based_Pointer_Basic &rhs) const { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator !="); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator!="); return !(*this == rhs); } template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator < (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const +ACE_Based_Pointer_Basic<CONCRETE>::operator< (const ACE_Based_Pointer_Basic &rhs) const { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator <"); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator<"); return ACE_COMPUTE_BASED_POINTER (this) < ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const +ACE_Based_Pointer_Basic<CONCRETE>::operator<= (const ACE_Based_Pointer_Basic &rhs) const { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator <="); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator<="); return ACE_COMPUTE_BASED_POINTER (this) <= ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator > (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const +ACE_Based_Pointer_Basic<CONCRETE>::operator> (const ACE_Based_Pointer_Basic &rhs) const { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator >"); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator>"); return ACE_COMPUTE_BASED_POINTER (this) > ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const +ACE_Based_Pointer_Basic<CONCRETE>::operator>= (const ACE_Based_Pointer_Basic &rhs) const { - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator >="); + ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator>="); return ACE_COMPUTE_BASED_POINTER (this) >= ACE_COMPUTE_BASED_POINTER (&rhs); } template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer_Basic<CONCRETE>::operator= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) +ACE_Based_Pointer_Basic<CONCRETE>::operator= (const ACE_Based_Pointer_Basic &rhs) { ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator="); *this = rhs.addr (); } template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer<CONCRETE>::operator= (const ACE_Based_Pointer<CONCRETE> &rhs) +ACE_Based_Pointer<CONCRETE>::operator= (const ACE_Based_Pointer &rhs) { ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator="); *this = rhs.addr (); diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp index 6aeccdfea9b..880ed6e8d41 100644 --- a/ACE/ace/Configuration.cpp +++ b/ACE/ace/Configuration.cpp @@ -1508,7 +1508,11 @@ ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base, (separator = ACE_OS::strchr (sub_section, ACE_TEXT ('\\'))) != nullptr; ) { - ACE_TString const simple_section (sub_section, separator - sub_section); + // Create a substring from the current location until the new found separator + // Because ACE_TString works with the character length we need to keep in mind + // the size of a single character + ACE_TString tsub_section (sub_section); + ACE_TString const simple_section = tsub_section.substring(0, (separator - sub_section) / sizeof (ACE_TCHAR)); int const ret_val = open_simple_section (result, simple_section.c_str(), create, result); if (ret_val) return ret_val; diff --git a/ACE/ace/Dev_Poll_Reactor.h b/ACE/ace/Dev_Poll_Reactor.h index 88d30409c2e..c75cbc8cba0 100644 --- a/ACE/ace/Dev_Poll_Reactor.h +++ b/ACE/ace/Dev_Poll_Reactor.h @@ -1126,7 +1126,7 @@ protected: int acquire (ACE_Time_Value *max_wait = 0); private: - Token_Guard (void); + Token_Guard (); private: /// The Reactor token. diff --git a/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h b/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h index 715cacb2c27..02133ad52ea 100644 --- a/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h +++ b/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h @@ -87,7 +87,6 @@ public: ACE_ALLOC_HOOK_DECLARE; private: - /// Flag indicating that reference counting is required for this /// event handler upcall. int requires_reference_counting_; diff --git a/ACE/ace/Future.h b/ACE/ace/Future.h index e928370f1e6..f63695202fa 100644 --- a/ACE/ace/Future.h +++ b/ACE/ace/Future.h @@ -214,10 +214,10 @@ private: mutable ACE_SYNCH_RECURSIVE_CONDITION value_ready_; private: - ACE_Future_Rep (void); + ACE_Future_Rep (); protected: - ~ACE_Future_Rep (void); + ~ACE_Future_Rep (); }; /** @@ -354,7 +354,6 @@ public: ACE_ALLOC_HOOK_DECLARE; private: - /// The ACE_Future_Rep /// Protect operations on the <Future>. typedef ACE_Future_Rep<T> FUTURE_REP; diff --git a/ACE/ace/Get_Opt.h b/ACE/ace/Get_Opt.h index 040df2b8cb2..96e06c30b69 100644 --- a/ACE/ace/Get_Opt.h +++ b/ACE/ace/Get_Opt.h @@ -434,7 +434,6 @@ private: ACE_Get_Opt &operator= (ACE_Get_Opt &&) = delete; private: - /// Holds the option string. ACE_TString *optstring_; @@ -481,7 +480,6 @@ private: /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; - }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Hash_Map_Manager_T.h b/ACE/ace/Hash_Map_Manager_T.h index 70f20f9e9ed..6960498bfe7 100644 --- a/ACE/ace/Hash_Map_Manager_T.h +++ b/ACE/ace/Hash_Map_Manager_T.h @@ -1119,7 +1119,6 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK> class ACE_Hash_Map_Manager : public ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> { public: - /** * Initialize a @c Hash_Map_Manager with default size elements. * @param table_alloc is a pointer to a memory allocator used for diff --git a/ACE/ace/Local_Tokens.cpp b/ACE/ace/Local_Tokens.cpp index 2aedeb0b94c..68cd3d36df3 100644 --- a/ACE/ace/Local_Tokens.cpp +++ b/ACE/ace/Local_Tokens.cpp @@ -160,10 +160,6 @@ ACE_TPQ_Entry::client_id (const ACE_TCHAR *id) ACE_MAXCLIENTIDLEN); } -ACE_TSS_TPQ_Entry::~ACE_TSS_TPQ_Entry (void) -{ -} - void ACE_TSS_TPQ_Entry::dump () const { diff --git a/ACE/ace/Local_Tokens.h b/ACE/ace/Local_Tokens.h index e52695aff37..6b137152143 100644 --- a/ACE/ace/Local_Tokens.h +++ b/ACE/ace/Local_Tokens.h @@ -216,7 +216,7 @@ public: const ACE_TCHAR *client_id); /// Destructor. - virtual ~ACE_TSS_TPQ_Entry (void); + virtual ~ACE_TSS_TPQ_Entry () = default; /// Allows us to pass args to the construction of the TSS object. virtual ACE_TPQ_Entry *make_TSS_TYPE () const; @@ -235,9 +235,8 @@ public: #endif /* ACE_NO_TSS_TOKENS */ private: - /// Private: should not be used - ACE_TSS_TPQ_Entry (const ACE_TSS_TPQ_Entry &); - void operator= (const ACE_TSS_TPQ_Entry &); + ACE_TSS_TPQ_Entry (const ACE_TSS_TPQ_Entry &) = delete; + void operator= (const ACE_TSS_TPQ_Entry &) = delete; // = These are passed to the constructor of ACE_TPQ_Entry in // make_TSS_TYPE diff --git a/ACE/ace/MEM_Addr.cpp b/ACE/ace/MEM_Addr.cpp index 4ee10c5b663..1e021a27deb 100644 --- a/ACE/ace/MEM_Addr.cpp +++ b/ACE/ace/MEM_Addr.cpp @@ -20,8 +20,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Addr) -// Transform the current address into string format. - +/// Transform the current address into string format. ACE_MEM_Addr::ACE_MEM_Addr () : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr)) { @@ -41,9 +40,7 @@ ACE_MEM_Addr::ACE_MEM_Addr (const ACE_TCHAR port_number[]) : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr)) { ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr"); - u_short pn = static_cast<u_short> (ACE_OS::strtoul (port_number, - 0, - 10)); + u_short const pn = static_cast<u_short> (ACE_OS::strtoul (port_number, 0, 10)); this->initialize_local (pn); } @@ -91,20 +88,16 @@ ACE_MEM_Addr::addr_to_string (ACE_TCHAR s[], } // Transform the string into the current addressing format. - int ACE_MEM_Addr::string_to_addr (const ACE_TCHAR s[]) { ACE_TRACE ("ACE_MEM_Addr::string_to_addr"); - u_short pn = static_cast<u_short> (ACE_OS::strtoul (s, - 0, - 10)); + u_short pn = static_cast<u_short> (ACE_OS::strtoul (s, 0, 10)); return this->set (pn); } -// Return the address. - +/// Return the address. void * ACE_MEM_Addr::get_addr () const { @@ -112,7 +105,7 @@ ACE_MEM_Addr::get_addr () const return this->external_.get_addr (); } -// Set a pointer to the address. +/// Set a pointer to the address. void ACE_MEM_Addr::set_addr (const void *addr, int len) { @@ -130,8 +123,7 @@ ACE_MEM_Addr::get_host_name (ACE_TCHAR hostname[], return this->external_.get_host_name (hostname, len); } -// Return the character representation of the hostname. - +/// Return the character representation of the hostname. const char * ACE_MEM_Addr::get_host_name () const { diff --git a/ACE/ace/MEM_Addr.h b/ACE/ace/MEM_Addr.h index 017756f0335..60306b5af85 100644 --- a/ACE/ace/MEM_Addr.h +++ b/ACE/ace/MEM_Addr.h @@ -35,11 +35,14 @@ class ACE_Export ACE_MEM_Addr : public ACE_Addr { public: /// Default constructor. - ACE_MEM_Addr (void); + ACE_MEM_Addr (); /// Copy constructor. ACE_MEM_Addr (const ACE_MEM_Addr &); + /// Assignment operator + ACE_MEM_Addr& operator= (const ACE_MEM_Addr&) = default; + /// Creates an ACE_MEM_Addr from a @a port_number ACE_MEM_Addr (u_short port_number); diff --git a/ACE/ace/Malloc_T.cpp b/ACE/ace/Malloc_T.cpp index ff8d6563db0..3d6a11a61cc 100644 --- a/ACE/ace/Malloc_T.cpp +++ b/ACE/ace/Malloc_T.cpp @@ -682,7 +682,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_malloc (size_t nbytes) // Skip over the MALLOC_HEADER when returning pointer. return currp + 1; } - else if (currp == this->cb_ptr_->freep_) + else if (currp == static_cast<MALLOC_HEADER *> (this->cb_ptr_->freep_)) { // We've wrapped around freelist without finding a // block. Therefore, we need to ask the memory pool for @@ -808,7 +808,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_free (void *ap) } // Join to upper neighbor. - if ((blockp + blockp->size_) == currp->next_block_) + if (blockp + blockp->size_ == static_cast<MALLOC_HEADER *> (currp->next_block_)) { ACE_MALLOC_STATS (--this->cb_ptr_->malloc_stats_.nblocks_); blockp->size_ += currp->next_block_->size_; diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index d75e5458815..6d36c2a7be7 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -38,7 +38,6 @@ static void sigchld_nop (int, siginfo_t *, ucontext_t *) } #endif /* ACE_WIN32 */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Process::ACE_Process () @@ -695,7 +694,8 @@ ACE_Process::wait (const ACE_Time_Value &tv, // open(), and there's already a SIGCHLD action set, so no // action is needed here. ACE_Sig_Action old_action; - ACE_Sig_Action do_sigchld ((ACE_SignalHandler)sigchld_nop); + ACE_Sig_Handler_Ex sigchld_nop_ptr = sigchld_nop; + ACE_Sig_Action do_sigchld (reinterpret_cast<ACE_SignalHandler> (reinterpret_cast<void*> (sigchld_nop_ptr))); do_sigchld.register_action (SIGCHLD, &old_action); pid_t pid; diff --git a/ACE/ace/Process_Manager.cpp b/ACE/ace/Process_Manager.cpp index fa2e5cefec5..4fb0c5a1034 100644 --- a/ACE/ace/Process_Manager.cpp +++ b/ACE/ace/Process_Manager.cpp @@ -886,7 +886,8 @@ ACE_Process_Manager::wait (pid_t pid, ACE_Sig_Action old_action; if (this->reactor () == 0) { - ACE_Sig_Action do_sigchld ((ACE_SignalHandler)sigchld_nop); + ACE_Sig_Handler_Ex sigchld_nop_ptr = sigchld_nop; + ACE_Sig_Action do_sigchld (reinterpret_cast<ACE_SignalHandler> (reinterpret_cast<void*> (sigchld_nop_ptr))); do_sigchld.register_action (SIGCHLD, &old_action); } diff --git a/ACE/ace/SOCK_Dgram_Mcast.h b/ACE/ace/SOCK_Dgram_Mcast.h index 12a885b7ac1..1fc3ab2430c 100644 --- a/ACE/ace/SOCK_Dgram_Mcast.h +++ b/ACE/ace/SOCK_Dgram_Mcast.h @@ -344,7 +344,6 @@ public: int opts () const; private: - /// Subscribe to a multicast address on one or more network interface(s). /// (No QoS support.) int subscribe_ifs (const ACE_INET_Addr &mcast_addr, diff --git a/ACE/ace/SPIPE_Addr.h b/ACE/ace/SPIPE_Addr.h index 455acd9acbb..bcb2eb510e5 100644 --- a/ACE/ace/SPIPE_Addr.h +++ b/ACE/ace/SPIPE_Addr.h @@ -39,6 +39,9 @@ public: /// Copy constructor. ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa); + /// Assignment operator + ACE_SPIPE_Addr& operator= (const ACE_SPIPE_Addr&) = default; + /// Create a ACE_SPIPE_Addr from a rendezvous point in the file /// system. ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0); diff --git a/ACE/ace/Select_Reactor_Base.h b/ACE/ace/Select_Reactor_Base.h index f076a2bffeb..edac5a28aa9 100644 --- a/ACE/ace/Select_Reactor_Base.h +++ b/ACE/ace/Select_Reactor_Base.h @@ -375,7 +375,6 @@ public: ACE_ALLOC_HOOK_DECLARE; private: - /// Remove the binding of @a handle corresponding to position @a pos /// in accordance with the @a mask. int unbind (ACE_HANDLE handle, @@ -437,7 +436,6 @@ public: ACE_ALLOC_HOOK_DECLARE; private: - /// Reference to the Handler_Repository we are iterating over. ACE_Select_Reactor_Handler_Repository const * const rep_; diff --git a/ACE/ace/Sig_Adapter.cpp b/ACE/ace/Sig_Adapter.cpp index c6722b21a7c..53754975bf7 100644 --- a/ACE/ace/Sig_Adapter.cpp +++ b/ACE/ace/Sig_Adapter.cpp @@ -49,7 +49,8 @@ ACE_Sig_Adapter::handle_signal (int signum, siginfo_t *siginfo, ucontext_t *ucon // expecting... this->sa_.register_action (signum, &old_disp); - ACE_Sig_Handler_Ex sig_func = ACE_Sig_Handler_Ex (this->sa_.handler ()); + ACE_SignalHandler sig_handler = this->sa_.handler (); + ACE_Sig_Handler_Ex sig_func = reinterpret_cast<ACE_Sig_Handler_Ex> (reinterpret_cast<void*> (sig_handler)); (*sig_func) (signum, siginfo, ucontext); // Restore the original disposition. diff --git a/ACE/ace/Sig_Handler.cpp b/ACE/ace/Sig_Handler.cpp index 3fb63c52ffc..6dbdcb55a6c 100644 --- a/ACE/ace/Sig_Handler.cpp +++ b/ACE/ace/Sig_Handler.cpp @@ -31,9 +31,9 @@ ace_sig_handlers_dispatch (int signum, siginfo_t *info, ucontext_t *context) #define ace_signal_handlers_dispatcher ACE_SignalHandler(ace_sig_handlers_dispatch) #else -#define ace_signal_handler_dispatcher ACE_SignalHandler(ACE_Sig_Handler::dispatch) +#define ace_signal_handler_dispatcher reinterpret_cast<ACE_SignalHandler> (reinterpret_cast<void*> ((ACE_Sig_Handler_Ex)ACE_Sig_Handler::dispatch)) -#define ace_signal_handlers_dispatcher ACE_SignalHandler(ACE_Sig_Handlers::dispatch) +#define ace_signal_handlers_dispatcher reinterpret_cast<ACE_SignalHandler> (reinterpret_cast<void*> ((ACE_Sig_Handler_Ex)ACE_Sig_Handlers::dispatch)) #endif /* ACE_HAS_SIG_C_FUNC */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/UNIX_Addr.h b/ACE/ace/UNIX_Addr.h index fed5df7fab6..944207d5977 100644 --- a/ACE/ace/UNIX_Addr.h +++ b/ACE/ace/UNIX_Addr.h @@ -43,6 +43,9 @@ public: /// Copy constructor. ACE_UNIX_Addr (const ACE_UNIX_Addr &sa); + /// Assignment operator + ACE_UNIX_Addr& operator= (const ACE_UNIX_Addr&) = default; + /// Creates an ACE_UNIX_Addr from a string. ACE_UNIX_Addr (const char rendezvous_point[]); diff --git a/ACE/ace/UNIX_Addr.inl b/ACE/ace/UNIX_Addr.inl index 125ead75e32..40a57922386 100644 --- a/ACE/ace/UNIX_Addr.inl +++ b/ACE/ace/UNIX_Addr.inl @@ -2,7 +2,6 @@ #include "ace/OS_NS_string.h" - #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/config-win32-msvc-142.h b/ACE/ace/config-win32-msvc-142.h index af47ad9f722..daed3972259 100644 --- a/ACE/ace/config-win32-msvc-142.h +++ b/ACE/ace/config-win32-msvc-142.h @@ -25,5 +25,13 @@ #include "ace/config-win32-msvc-141.h" +#if _MSVC_LANG >= 202002L +# define ACE_HAS_CPP20 +#endif /* _MSVC_LANG >= 202002L */ + +#ifdef ACE_HAS_CPP17 +# define ACE_LACKS_AUTO_PTR +#endif + #include /**/ "ace/post.h" #endif /* ACE_CONFIG_WIN32_MSVC_142_H */ |