From ab938af466a77a9992d95da9fc832ff50444255f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 25 Feb 2021 11:45:47 +0100 Subject: Use delete, cleanup * TAO/tao/Acceptor_Registry.h: * TAO/tao/Adapter_Registry.h: * TAO/tao/AnyTypeCode/Fixed_TypeCode.cpp: * TAO/tao/AnyTypeCode/Objref_TypeCode.h: * TAO/tao/AnyTypeCode/Recursive_Type_TypeCode.h: * TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp: * TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp: * TAO/tao/AnyTypeCode/Struct_TypeCode_Static.h: * TAO/tao/AnyTypeCode/TypeCode.inl: * TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.h: * TAO/tao/CORBANAME_Parser.h: * TAO/tao/Cleanup_Func_Registry.h: * TAO/tao/Compression/Compressor_Factory.h: * TAO/tao/Compression/zlib/ZlibCompressor_Factory.h: * TAO/tao/Condition.cpp: * TAO/tao/Condition.h: * TAO/tao/Connect_Strategy.cpp: * TAO/tao/Connect_Strategy.h: * TAO/tao/Connection_Handler.h: * TAO/tao/Connector_Registry.h: * TAO/tao/Connector_Registry.inl: * TAO/tao/DynamicInterface/DII_Reply_Handler.h: * TAO/tao/DynamicInterface/Request.h: * TAO/tao/IIOP_Connector.cpp: * TAO/tao/LocalObject.h: * TAO/tao/Messaging/AMH_Response_Handler.h: * TAO/tao/Object.h: * TAO/tao/ObjectKey_Table.h: * TAO/tao/RTScheduling/Distributable_Thread.cpp: * TAO/tao/RTScheduling/Distributable_Thread.h: * TAO/tao/Transport.h: * TAO/tao/TransportCurrent/Current_ORBInitializer_Base.h: * TAO/tao/Transport_Selection_Guard.h: * TAO/tao/XtResource/XtResource_Factory.cpp: * TAO/tao/default_resource.h: --- TAO/tao/Acceptor_Registry.h | 4 +- TAO/tao/Adapter_Registry.h | 4 +- TAO/tao/AnyTypeCode/Fixed_TypeCode.cpp | 2 - TAO/tao/AnyTypeCode/Objref_TypeCode.h | 2 - TAO/tao/AnyTypeCode/Recursive_Type_TypeCode.h | 2 - TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp | 1 - TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp | 1 - TAO/tao/AnyTypeCode/Struct_TypeCode_Static.h | 2 - TAO/tao/AnyTypeCode/TypeCode.inl | 31 ++++----- TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.h | 1 - TAO/tao/CORBANAME_Parser.h | 2 +- TAO/tao/Cleanup_Func_Registry.h | 4 +- TAO/tao/Compression/Compressor_Factory.h | 7 +- TAO/tao/Compression/zlib/ZlibCompressor_Factory.h | 4 +- TAO/tao/Condition.cpp | 9 +-- TAO/tao/Condition.h | 5 +- TAO/tao/Connect_Strategy.cpp | 5 -- TAO/tao/Connect_Strategy.h | 4 +- TAO/tao/Connection_Handler.h | 4 +- TAO/tao/Connector_Registry.h | 10 +-- TAO/tao/Connector_Registry.inl | 4 +- TAO/tao/DynamicInterface/DII_Reply_Handler.h | 7 +- TAO/tao/DynamicInterface/Request.h | 16 ++--- TAO/tao/IIOP_Connector.cpp | 4 +- TAO/tao/LocalObject.h | 10 +-- TAO/tao/Messaging/AMH_Response_Handler.h | 8 +-- TAO/tao/Object.h | 5 +- TAO/tao/ObjectKey_Table.h | 4 +- TAO/tao/RTScheduling/Distributable_Thread.cpp | 17 ++--- TAO/tao/RTScheduling/Distributable_Thread.h | 13 ++-- TAO/tao/Transport.h | 8 +-- .../TransportCurrent/Current_ORBInitializer_Base.h | 7 +- TAO/tao/Transport_Selection_Guard.h | 2 +- TAO/tao/XtResource/XtResource_Factory.cpp | 10 +-- TAO/tao/default_resource.h | 81 +++++++++++----------- 35 files changed, 122 insertions(+), 178 deletions(-) diff --git a/TAO/tao/Acceptor_Registry.h b/TAO/tao/Acceptor_Registry.h index dc0124ae18a..308d9d12141 100644 --- a/TAO/tao/Acceptor_Registry.h +++ b/TAO/tao/Acceptor_Registry.h @@ -89,8 +89,8 @@ public: TAO_AcceptorSetIterator end (); private: - ACE_UNIMPLEMENTED_FUNC (TAO_Acceptor_Registry (const TAO_Acceptor_Registry &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Acceptor_Registry &operator= (const TAO_Acceptor_Registry &)) + TAO_Acceptor_Registry (const TAO_Acceptor_Registry &) = delete; + TAO_Acceptor_Registry &operator= (const TAO_Acceptor_Registry &) = delete; /// Create a default acceptor for all loaded protocols. int open_default (TAO_ORB_Core *orb_core, diff --git a/TAO/tao/Adapter_Registry.h b/TAO/tao/Adapter_Registry.h index 037f59e23d2..bdca283d9a2 100644 --- a/TAO/tao/Adapter_Registry.h +++ b/TAO/tao/Adapter_Registry.h @@ -91,8 +91,8 @@ public: TAO_Adapter *find_adapter (const char *name) const; private: - ACE_UNIMPLEMENTED_FUNC (TAO_Adapter_Registry (const TAO_Adapter_Registry &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Adapter_Registry &operator= (const TAO_Adapter_Registry &)) + TAO_Adapter_Registry (const TAO_Adapter_Registry &) = delete; + TAO_Adapter_Registry &operator= (const TAO_Adapter_Registry &) = delete; /** * @name A simple array of adapters. diff --git a/TAO/tao/AnyTypeCode/Fixed_TypeCode.cpp b/TAO/tao/AnyTypeCode/Fixed_TypeCode.cpp index 2206bebc75d..f3310d13465 100644 --- a/TAO/tao/AnyTypeCode/Fixed_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Fixed_TypeCode.cpp @@ -70,12 +70,10 @@ TAO::TypeCode::Fixed::get_compact_typecode_i () const // names, meaning that we can simply call _duplicate() on this // TypeCode. - // @@ There is a potential problem here if this TypeCode is a static // and const since it may have been placed in read-only memory by // the compiler. A const_cast<> can return undefined results in // that case. - CORBA::TypeCode_ptr mutable_tc = const_cast *> (this); diff --git a/TAO/tao/AnyTypeCode/Objref_TypeCode.h b/TAO/tao/AnyTypeCode/Objref_TypeCode.h index 5a43981c0f2..c9a287ce992 100644 --- a/TAO/tao/AnyTypeCode/Objref_TypeCode.h +++ b/TAO/tao/AnyTypeCode/Objref_TypeCode.h @@ -52,7 +52,6 @@ namespace TAO private RefCountPolicy { public: - /// Constructor. Objref (CORBA::TCKind kind, char const * id, @@ -93,7 +92,6 @@ namespace TAO protected: /// Base attributes (@c id and @c name). Base_Attributes attributes_; - }; } // End namespace TypeCode diff --git a/TAO/tao/AnyTypeCode/Recursive_Type_TypeCode.h b/TAO/tao/AnyTypeCode/Recursive_Type_TypeCode.h index d8482d33599..c28969137c4 100644 --- a/TAO/tao/AnyTypeCode/Recursive_Type_TypeCode.h +++ b/TAO/tao/AnyTypeCode/Recursive_Type_TypeCode.h @@ -47,7 +47,6 @@ namespace TAO : public TypeCodeBase { public: - /// Recursive @c struct constructor. Recursive_Type (CORBA::TCKind kind, char const * id, @@ -110,7 +109,6 @@ namespace TAO //@} public: - /// Set @c struct @c TypeCode parameters. bool struct_parameters (char const * name, MemberArrayType const & fields, diff --git a/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp b/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp index 96fa61319c1..bd81dd1ea7a 100644 --- a/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp @@ -113,7 +113,6 @@ TAO::TypeCode::Sequence::get_compact_typecode_i (v // and const since it may have been placed in read-only memory by // the compiler. A const_cast<> can return undefined results in // that case. - CORBA::TypeCode_ptr mutable_tc = const_cast *> (this); diff --git a/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp index dbcae29f8fb..ebba0d9ea31 100644 --- a/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp @@ -113,7 +113,6 @@ TAO::TypeCode::Sequence can return undefined results in // that case. - CORBA::TypeCode_ptr mutable_tc = const_cast *> (this); diff --git a/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.h b/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.h index 06bbd178928..e07b1e54e43 100644 --- a/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.h +++ b/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.h @@ -38,7 +38,6 @@ namespace TAO class FieldArrayType, class RefCountPolicy> class Struct; - /** * @class Struct * @@ -58,7 +57,6 @@ namespace TAO private TAO::Null_RefCount_Policy { public: - /// Constructor. Struct (CORBA::TCKind kind, char const * id, diff --git a/TAO/tao/AnyTypeCode/TypeCode.inl b/TAO/tao/AnyTypeCode/TypeCode.inl index cc0d60185b7..66657925c6a 100644 --- a/TAO/tao/AnyTypeCode/TypeCode.inl +++ b/TAO/tao/AnyTypeCode/TypeCode.inl @@ -5,7 +5,7 @@ template<> ACE_INLINE void CORBA::release<> (CORBA::TypeCode_ptr obj) { - if (obj != 0) + if (obj) { obj->tao_release (); } @@ -29,37 +29,37 @@ CORBA::TypeCode::_duplicate (CORBA::TypeCode_ptr tc) } ACE_INLINE CORBA::TypeCode_ptr -CORBA::TypeCode::_nil (nullptr) +CORBA::TypeCode::_nil () { return nullptr; } ACE_INLINE CORBA::TCKind -CORBA::TypeCode::kind (void) const +CORBA::TypeCode::kind () const { return this->kind_; } ACE_INLINE CORBA::TypeCode_ptr -CORBA::TypeCode::get_compact_typecode (void) const +CORBA::TypeCode::get_compact_typecode () const { return this->get_compact_typecode_i (); } ACE_INLINE char const * -CORBA::TypeCode::id (void) const +CORBA::TypeCode::id () const { return this->id_i (); } ACE_INLINE char const * -CORBA::TypeCode::name (void) const +CORBA::TypeCode::name () const { return this->name_i (); } ACE_INLINE CORBA::ULong -CORBA::TypeCode::member_count (void) const +CORBA::TypeCode::member_count () const { return this->member_count_i (); } @@ -83,37 +83,37 @@ CORBA::TypeCode::member_label (ULong index) const } ACE_INLINE CORBA::TypeCode_ptr -CORBA::TypeCode::discriminator_type (void) const +CORBA::TypeCode::discriminator_type () const { return this->discriminator_type_i (); } ACE_INLINE CORBA::Long -CORBA::TypeCode::default_index (void) const +CORBA::TypeCode::default_index () const { return this->default_index_i (); } ACE_INLINE CORBA::ULong -CORBA::TypeCode::length (void) const +CORBA::TypeCode::length () const { return this->length_i (); } ACE_INLINE CORBA::TypeCode_ptr -CORBA::TypeCode::content_type (void) const +CORBA::TypeCode::content_type () const { return this->content_type_i (); } ACE_INLINE CORBA::UShort -CORBA::TypeCode::fixed_digits (void) const +CORBA::TypeCode::fixed_digits () const { return this->fixed_digits_i (); } ACE_INLINE CORBA::UShort -CORBA::TypeCode::fixed_scale (void) const +CORBA::TypeCode::fixed_scale () const { return this->fixed_scale_i (); } @@ -125,13 +125,13 @@ CORBA::TypeCode::member_visibility (ULong index) const } ACE_INLINE CORBA::ValueModifier -CORBA::TypeCode::type_modifier (void) const +CORBA::TypeCode::type_modifier () const { return this->type_modifier_i (); } ACE_INLINE CORBA::TypeCode_ptr -CORBA::TypeCode::concrete_base_type (void) const +CORBA::TypeCode::concrete_base_type () const { return this->concrete_base_type_i (); } @@ -142,5 +142,4 @@ CORBA::TypeCode::_tao_any_destructor (void * x) ::CORBA::release (static_cast (x)); } - TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.h b/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.h index 1e420b17592..ccf178f9ed6 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.h +++ b/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.h @@ -49,7 +49,6 @@ namespace TAO class Case { public: - /// Constructor. /** * Constructor used when creating static @c union @c TypeCodes. diff --git a/TAO/tao/CORBANAME_Parser.h b/TAO/tao/CORBANAME_Parser.h index 11071b6b018..6937d5b4df8 100644 --- a/TAO/tao/CORBANAME_Parser.h +++ b/TAO/tao/CORBANAME_Parser.h @@ -40,7 +40,7 @@ class TAO_CORBANAME_Parser : public TAO_IOR_Parser { public: /// The destructor - virtual ~TAO_CORBANAME_Parser (void); + virtual ~TAO_CORBANAME_Parser (); // = The IOR_Parser methods, please read the documentation in // IOR_Parser.h diff --git a/TAO/tao/Cleanup_Func_Registry.h b/TAO/tao/Cleanup_Func_Registry.h index 0970e3a39cd..0d7e481202f 100644 --- a/TAO/tao/Cleanup_Func_Registry.h +++ b/TAO/tao/Cleanup_Func_Registry.h @@ -58,8 +58,8 @@ protected: void cleanup (ACE_Array_Base &ts_objects); private: - ACE_UNIMPLEMENTED_FUNC (TAO_Cleanup_Func_Registry (const TAO_Cleanup_Func_Registry &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Cleanup_Func_Registry &operator= (const TAO_Cleanup_Func_Registry &)) + TAO_Cleanup_Func_Registry (const TAO_Cleanup_Func_Registry &) = delete; + TAO_Cleanup_Func_Registry &operator= (const TAO_Cleanup_Func_Registry &) = delete; /// Array of registered cleanup functions. The number of /// registered cleanup functions should be the same as the number diff --git a/TAO/tao/Compression/Compressor_Factory.h b/TAO/tao/Compression/Compressor_Factory.h index 95481ddaeab..7204ce20366 100644 --- a/TAO/tao/Compression/Compressor_Factory.h +++ b/TAO/tao/Compression/Compressor_Factory.h @@ -41,11 +41,8 @@ namespace TAO private: ::Compression::CompressorId const compressor_id_; -#if defined (ACE_WIN32_VC14) - // Workaround for connect issue 1577211 - ACE_UNIMPLEMENTED_FUNC (CompressorFactory (const CompressorFactory &)) - ACE_UNIMPLEMENTED_FUNC (CompressorFactory &operator = (const CompressorFactory &)) -#endif + CompressorFactory (const CompressorFactory &) = delete; + CompressorFactory &operator = (const CompressorFactory &) = delete; }; } diff --git a/TAO/tao/Compression/zlib/ZlibCompressor_Factory.h b/TAO/tao/Compression/zlib/ZlibCompressor_Factory.h index 5274e54eb49..1cdd468357b 100644 --- a/TAO/tao/Compression/zlib/ZlibCompressor_Factory.h +++ b/TAO/tao/Compression/zlib/ZlibCompressor_Factory.h @@ -40,8 +40,8 @@ namespace TAO ::Compression::CompressionLevel compression_level); private: - ACE_UNIMPLEMENTED_FUNC (Zlib_CompressorFactory (const Zlib_CompressorFactory &)) - ACE_UNIMPLEMENTED_FUNC (Zlib_CompressorFactory &operator= (const Zlib_CompressorFactory &)) + Zlib_CompressorFactory (const Zlib_CompressorFactory &) = delete; + Zlib_CompressorFactory &operator= (const Zlib_CompressorFactory &) = delete; // Ensure we can lock with imutability (i.e. const) mutable TAO_SYNCH_MUTEX mutex_; diff --git a/TAO/tao/Condition.cpp b/TAO/tao/Condition.cpp index 0197963070c..04fe4aa0fa4 100644 --- a/TAO/tao/Condition.cpp +++ b/TAO/tao/Condition.cpp @@ -7,15 +7,13 @@ # include "tao/Condition.inl" #endif /* __ACE_INLINE__ */ - TAO_BEGIN_VERSIONED_NAMESPACE_DECL template TAO_Condition::TAO_Condition (MUTEX &m) - : mutex_ (&m), delete_lock_ (false), - cond_ (0) + cond_ (nullptr) { // @todo: Need to add the allocatore here.. ACE_NEW (this->cond_, @@ -24,13 +22,12 @@ TAO_Condition::TAO_Condition (MUTEX &m) template TAO_Condition::TAO_Condition (void) - : mutex_ (0), + : mutex_ (nullptr), delete_lock_ (false), - cond_ (0) + cond_ (nullptr) { // @todo: Need to add the allocatore here.. - ACE_NEW (this->mutex_, MUTEX); diff --git a/TAO/tao/Condition.h b/TAO/tao/Condition.h index 0b8c59e41b5..f89649345d6 100644 --- a/TAO/tao/Condition.h +++ b/TAO/tao/Condition.h @@ -41,7 +41,6 @@ template class TAO_Condition { public: - /// Useful typedef typedef MUTEX LOCK; @@ -92,8 +91,8 @@ public: MUTEX *mutex (); private: - ACE_UNIMPLEMENTED_FUNC (TAO_Condition (const TAO_Condition &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Condition &operator= (const TAO_Condition &)) + TAO_Condition (const TAO_Condition &) = delete; + TAO_Condition &operator= (const TAO_Condition &) = delete; /// Reference to mutex lock. MUTEX *mutex_; diff --git a/TAO/tao/Connect_Strategy.cpp b/TAO/tao/Connect_Strategy.cpp index 5f5496f9756..903cb869b87 100644 --- a/TAO/tao/Connect_Strategy.cpp +++ b/TAO/tao/Connect_Strategy.cpp @@ -11,11 +11,6 @@ TAO_Connect_Strategy::TAO_Connect_Strategy (TAO_ORB_Core *orb_core) { } - -TAO_Connect_Strategy::~TAO_Connect_Strategy () -{ -} - int TAO_Connect_Strategy::wait (TAO_Connection_Handler *ch, ACE_Time_Value *max_wait_time) diff --git a/TAO/tao/Connect_Strategy.h b/TAO/tao/Connect_Strategy.h index 763662e4996..214aec39df5 100644 --- a/TAO/tao/Connect_Strategy.h +++ b/TAO/tao/Connect_Strategy.h @@ -53,12 +53,11 @@ class TAO_LF_Event; class TAO_Export TAO_Connect_Strategy { public: - /// Constructor TAO_Connect_Strategy (TAO_ORB_Core *orb); /// Destructor - virtual ~TAO_Connect_Strategy (void); + virtual ~TAO_Connect_Strategy () = default; /// Obtain the synch options that can be passed to ACE_Connector /** @@ -94,7 +93,6 @@ protected: /// Cached copy of the ORB core pointer TAO_ORB_Core * const orb_core_; - }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Connection_Handler.h b/TAO/tao/Connection_Handler.h index 6e7c768030a..4a309a7ec19 100644 --- a/TAO/tao/Connection_Handler.h +++ b/TAO/tao/Connection_Handler.h @@ -180,8 +180,8 @@ protected: //@} private: - ACE_UNIMPLEMENTED_FUNC (TAO_Connection_Handler (const TAO_Connection_Handler &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Connection_Handler &operator= (const TAO_Connection_Handler &)) + TAO_Connection_Handler (const TAO_Connection_Handler &) = delete; + TAO_Connection_Handler &operator= (const TAO_Connection_Handler &) = delete; /// Pointer to the TAO_ORB_Core TAO_ORB_Core * const orb_core_; diff --git a/TAO/tao/Connector_Registry.h b/TAO/tao/Connector_Registry.h index 6a644e300f8..19bd5ea2e1e 100644 --- a/TAO/tao/Connector_Registry.h +++ b/TAO/tao/Connector_Registry.h @@ -51,10 +51,10 @@ class TAO_Export TAO_Connector_Registry { public: /// Default constructor. - TAO_Connector_Registry (void); + TAO_Connector_Registry (); /// Default destructor. - ~TAO_Connector_Registry (void); + ~TAO_Connector_Registry (); /// Return the connector bridges TAO_Connector *get_connector (CORBA::ULong tag) const; @@ -63,7 +63,7 @@ public: int open (TAO_ORB_Core *orb_core); /// Close all open connectors. - int close_all (void); + int close_all (); /// Parse a string containing a URL style IOR and return an /// MProfile. @@ -77,8 +77,8 @@ public: char object_key_delimiter (const char *ior); // = Iterator. - TAO_ConnectorSetIterator begin (void) const; - TAO_ConnectorSetIterator end (void) const; + TAO_ConnectorSetIterator begin () const; + TAO_ConnectorSetIterator end () const; private: TAO_Connector_Registry (const TAO_Connector_Registry&) = delete; diff --git a/TAO/tao/Connector_Registry.inl b/TAO/tao/Connector_Registry.inl index c9c50934295..5a954f00710 100644 --- a/TAO/tao/Connector_Registry.inl +++ b/TAO/tao/Connector_Registry.inl @@ -2,13 +2,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_ConnectorSetIterator -TAO_Connector_Registry::begin (void) const +TAO_Connector_Registry::begin () const { return this->connectors_; } ACE_INLINE TAO_ConnectorSetIterator -TAO_Connector_Registry::end (void) const +TAO_Connector_Registry::end () const { return this->connectors_ + this->size_; } diff --git a/TAO/tao/DynamicInterface/DII_Reply_Handler.h b/TAO/tao/DynamicInterface/DII_Reply_Handler.h index fd8b33bf261..802bddd0b3b 100644 --- a/TAO/tao/DynamicInterface/DII_Reply_Handler.h +++ b/TAO/tao/DynamicInterface/DII_Reply_Handler.h @@ -98,11 +98,8 @@ public: typedef TAO_DII_Reply_Handler_ptr _ptr_type; typedef TAO_DII_Reply_Handler_var _var_type; -#if defined (ACE_WIN32_VC14) - // Workaround for connect issue 1577211 - ACE_UNIMPLEMENTED_FUNC (TAO_DII_Reply_Handler (const TAO_DII_Reply_Handler &)) - ACE_UNIMPLEMENTED_FUNC (TAO_DII_Reply_Handler &operator = (const TAO_DII_Reply_Handler &)) -#endif + TAO_DII_Reply_Handler (const TAO_DII_Reply_Handler &) = delete; + TAO_DII_Reply_Handler &operator = (const TAO_DII_Reply_Handler &) = delete; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/DynamicInterface/Request.h b/TAO/tao/DynamicInterface/Request.h index af1b1f07563..b2431504fbf 100644 --- a/TAO/tao/DynamicInterface/Request.h +++ b/TAO/tao/DynamicInterface/Request.h @@ -99,11 +99,11 @@ namespace CORBA * <<=. */ //@{ - CORBA::Any &add_in_arg (void); + CORBA::Any &add_in_arg (); CORBA::Any &add_in_arg (const char* name); - CORBA::Any &add_inout_arg (void); + CORBA::Any &add_inout_arg (); CORBA::Any &add_inout_arg (const char* name); - CORBA::Any &add_out_arg (void); + CORBA::Any &add_out_arg (); CORBA::Any &add_out_arg (const char* name); //@} @@ -111,7 +111,7 @@ namespace CORBA void set_return_type (CORBA::TypeCode_ptr tc); /// Returns reference to Any for extraction using >>=. - CORBA::Any &return_value (void); + CORBA::Any &return_value (); /// Perform method resolution and invoke an appropriate method. /** @@ -125,7 +125,7 @@ namespace CORBA * recommended as the user may not be able to propagate the * exceptions. */ - void invoke (void); + void invoke (); /// Send a oneway request. /** @@ -133,7 +133,7 @@ namespace CORBA * recommended as the user may not be able to propagate the * exceptions. */ - void send_oneway (void); + void send_oneway (); /** * @name The 'deferred synchronous' methods. @@ -141,8 +141,8 @@ namespace CORBA * The 'deferred synchronous' methods. */ //@{ - void send_deferred (void); - void get_response (void); + void send_deferred (); + void get_response (); CORBA::Boolean poll_response (void); //@} diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index 28ea80707e8..166cdb505a9 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -443,8 +443,8 @@ namespace TAO_IIOP private: TAO_Transport** tlist_; private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const TList_Holder &)) - ACE_UNIMPLEMENTED_FUNC (TList_Holder (const TList_Holder &)) + void operator= (const TList_Holder &) = delete; + TList_Holder (const TList_Holder &) = delete; }; } diff --git a/TAO/tao/LocalObject.h b/TAO/tao/LocalObject.h index bd6732bd654..a8a8d72c103 100644 --- a/TAO/tao/LocalObject.h +++ b/TAO/tao/LocalObject.h @@ -159,14 +159,8 @@ namespace CORBA LocalObject (); private: - /** - * @name Unimplemented methods - */ - //@{ - ACE_UNIMPLEMENTED_FUNC (LocalObject (const LocalObject &)) - ACE_UNIMPLEMENTED_FUNC (LocalObject & operator = (const LocalObject &)) - //@} - + LocalObject (const LocalObject &) = delete; + LocalObject & operator = (const LocalObject &) = delete; }; } // End CORBA namespace diff --git a/TAO/tao/Messaging/AMH_Response_Handler.h b/TAO/tao/Messaging/AMH_Response_Handler.h index a7fbfbcbe69..b10938f4c32 100644 --- a/TAO/tao/Messaging/AMH_Response_Handler.h +++ b/TAO/tao/Messaging/AMH_Response_Handler.h @@ -65,7 +65,6 @@ class TAO_Messaging_Export TAO_AMH_Response_Handler : public virtual ::CORBA::LocalObject { public: - /// Constructor TAO_AMH_Response_Handler (); @@ -117,10 +116,8 @@ protected: GIOP::ReplyStatusType reply_status_; private: - - // Private and undefined, standard C++ idiom to prohibit copying. - TAO_AMH_Response_Handler (const TAO_AMH_Response_Handler&); - TAO_AMH_Response_Handler& operator= (const TAO_AMH_Response_Handler&); + TAO_AMH_Response_Handler (const TAO_AMH_Response_Handler&) = delete; + TAO_AMH_Response_Handler& operator= (const TAO_AMH_Response_Handler&) = delete; /// Pointer to the original message-base TAO_GIOP_Message_Base *mesg_base_; @@ -203,7 +200,6 @@ namespace TAO public: void operator() (TAO_AMH_Response_Handler *arh) throw (); }; - } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h index c7f9752374f..f8d3762ed62 100644 --- a/TAO/tao/Object.h +++ b/TAO/tao/Object.h @@ -342,9 +342,8 @@ namespace CORBA std::atomic refcount_; private: - // = Unimplemented methods - ACE_UNIMPLEMENTED_FUNC (Object (const Object &)) - ACE_UNIMPLEMENTED_FUNC (Object &operator = (const Object &)) + Object (const Object &) = delete; + Object &operator = (const Object &) = delete; private: /// Specify whether this is a local object or not. diff --git a/TAO/tao/ObjectKey_Table.h b/TAO/tao/ObjectKey_Table.h index 55fa8ddcc0c..cda65442d17 100644 --- a/TAO/tao/ObjectKey_Table.h +++ b/TAO/tao/ObjectKey_Table.h @@ -116,8 +116,8 @@ namespace TAO int unbind_i (Refcounted_ObjectKey *&key); private: - ACE_UNIMPLEMENTED_FUNC (ObjectKey_Table (const ObjectKey_Table &)) - ACE_UNIMPLEMENTED_FUNC (ObjectKey_Table &operator= (const ObjectKey_Table &)) + ObjectKey_Table (const ObjectKey_Table &) = delete; + ObjectKey_Table &operator= (const ObjectKey_Table &) = delete; /// Some useful typedefs. typedef ACE_RB_Treestate_ = RTScheduling::DistributableThread::CANCELLED; } RTScheduling::DistributableThread::DT_State -TAO_DistributableThread::state (void) +TAO_DistributableThread::state () { return this->state_; } RTScheduling::DistributableThread_ptr -TAO_DistributableThread_Factory::create_DT (void) +TAO_DistributableThread_Factory::create_DT () { - TAO_DistributableThread* DT = 0; + TAO_DistributableThread* DT = nullptr; ACE_NEW_THROW_EX (DT, TAO_DistributableThread, diff --git a/TAO/tao/RTScheduling/Distributable_Thread.h b/TAO/tao/RTScheduling/Distributable_Thread.h index 3b57102d827..dd4b9ccab81 100644 --- a/TAO/tao/RTScheduling/Distributable_Thread.h +++ b/TAO/tao/RTScheduling/Distributable_Thread.h @@ -13,23 +13,22 @@ class TAO_RTScheduler_Export TAO_DistributableThread: public ::CORBA::LocalObject { public: - TAO_DistributableThread (void); + TAO_DistributableThread () = default; - ~TAO_DistributableThread (void); + ~TAO_DistributableThread () = default; - virtual void cancel (void); + void cancel () override; - virtual RTScheduling::DistributableThread::DT_State state (void); + RTScheduling::DistributableThread::DT_State state () override; private: - RTScheduling::DistributableThread::DT_State state_; + RTScheduling::DistributableThread::DT_State state_ {RTScheduling::DistributableThread::ACTIVE}; }; - class TAO_DistributableThread_Factory { public: - static RTScheduling::DistributableThread_ptr create_DT (void); + static RTScheduling::DistributableThread_ptr create_DT (); }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h index 4b3c84d069d..c673e8f2360 100644 --- a/TAO/tao/Transport.h +++ b/TAO/tao/Transport.h @@ -138,8 +138,8 @@ namespace TAO } private: - ACE_UNIMPLEMENTED_FUNC (Drain_Constraints (const Drain_Constraints &)) - ACE_UNIMPLEMENTED_FUNC (Drain_Constraints &operator= (const Drain_Constraints &)) + Drain_Constraints (const Drain_Constraints &) = delete; + Drain_Constraints &operator= (const Drain_Constraints &) = delete; ACE_Time_Value * timeout_; bool block_on_io_; @@ -1036,8 +1036,8 @@ protected: int notify_reactor_now (); private: - ACE_UNIMPLEMENTED_FUNC (TAO_Transport (const TAO_Transport &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Transport &operator= (const TAO_Transport &)) + TAO_Transport (const TAO_Transport &) = delete; + TAO_Transport &operator= (const TAO_Transport &) = delete; /// Assume the lock is held void send_connection_closed_notifications_i (); diff --git a/TAO/tao/TransportCurrent/Current_ORBInitializer_Base.h b/TAO/tao/TransportCurrent/Current_ORBInitializer_Base.h index bfc363cf8c4..f47317b4790 100644 --- a/TAO/tao/TransportCurrent/Current_ORBInitializer_Base.h +++ b/TAO/tao/TransportCurrent/Current_ORBInitializer_Base.h @@ -48,11 +48,8 @@ namespace TAO make_current_instance (TAO_ORB_Core* core, size_t tss_slot_id) = 0; protected: const ACE_TString id_; -#if defined (ACE_WIN32_VC14) - // Workaround for connect issue 1577211 - ACE_UNIMPLEMENTED_FUNC (Current_ORBInitializer_Base (const Current_ORBInitializer_Base &)) - ACE_UNIMPLEMENTED_FUNC (Current_ORBInitializer_Base &operator = (const Current_ORBInitializer_Base &)) -#endif + Current_ORBInitializer_Base (const Current_ORBInitializer_Base &) = delete; + Current_ORBInitializer_Base &operator = (const Current_ORBInitializer_Base &) = delete; }; } /* namespace Transport */ diff --git a/TAO/tao/Transport_Selection_Guard.h b/TAO/tao/Transport_Selection_Guard.h index fa70136f350..7b64dd1090c 100644 --- a/TAO/tao/Transport_Selection_Guard.h +++ b/TAO/tao/Transport_Selection_Guard.h @@ -103,7 +103,7 @@ namespace TAO } private: - ACE_UNIMPLEMENTED_FUNC (Transport_Selection_Guard (const Transport_Selection_Guard&)) + Transport_Selection_Guard (const Transport_Selection_Guard&) = delete; #if TAO_HAS_TRANSPORT_CURRENT == 1 /// This is pointing to the guard that was active prior to diff --git a/TAO/tao/XtResource/XtResource_Factory.cpp b/TAO/tao/XtResource/XtResource_Factory.cpp index 637a783140a..f97a97b28bb 100644 --- a/TAO/tao/XtResource/XtResource_Factory.cpp +++ b/TAO/tao/XtResource/XtResource_Factory.cpp @@ -8,8 +8,8 @@ namespace TAO { XtResource_Factory::XtResource_Factory (XtAppContext p_context): - reactor_impl_( 0 ), - context_( p_context ) + reactor_impl_(nullptr), + context_(p_context) { } @@ -17,19 +17,19 @@ namespace TAO XtResource_Factory::reactor_impl (void) { // synchronized by external locks - if (this->context_ == 0) + if (!this->context_) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT("TAO (%P|%t) - XtAppContext is undefined.") ACE_TEXT(" Cannot create ACE_XtReactor\n"))); - return 0; + return nullptr; // Private and undefined; } if (!this->reactor_impl_) { ACE_NEW_RETURN (this->reactor_impl_, ACE_XtReactor (this->context_), - 0); + nullptr); if (TAO_debug_level > 0) TAOLIB_DEBUG ((LM_DEBUG, diff --git a/TAO/tao/default_resource.h b/TAO/tao/default_resource.h index e1ff41ce021..9e95c9be4fa 100644 --- a/TAO/tao/default_resource.h +++ b/TAO/tao/default_resource.h @@ -55,11 +55,11 @@ class TAO_RSF_Timer_Queue_Ptr; class TAO_Export TAO_Codeset_Parameters { public: - TAO_Codeset_Parameters (void); - ~TAO_Codeset_Parameters (void); + TAO_Codeset_Parameters (); + ~TAO_Codeset_Parameters (); /// The native codeset (getter) - const ACE_TCHAR* native (void); + const ACE_TCHAR* native (); /// The native codeset (setter) void native (const ACE_TCHAR* n); @@ -70,14 +70,14 @@ public: typedef ACE_Unbounded_Queue_Iterator iterator; /// Iterate through the registered translators - iterator translators (void); + iterator translators (); /// Apply the parameters to the said descriptor void apply_to (TAO_Codeset_Descriptor_Base *csd); private: - ACE_UNIMPLEMENTED_FUNC (TAO_Codeset_Parameters (const TAO_Codeset_Parameters &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Codeset_Parameters &operator= (const TAO_Codeset_Parameters &)) + TAO_Codeset_Parameters (const TAO_Codeset_Parameters &) = delete; + TAO_Codeset_Parameters &operator= (const TAO_Codeset_Parameters &) = delete; ACE_Unbounded_Queue translators_; ACE_TCHAR* native_; @@ -117,12 +117,11 @@ class TAO_Export TAO_Default_Resource_Factory : public TAO_Resource_Factory { public: - /// Constructor. - TAO_Default_Resource_Factory (void); + TAO_Default_Resource_Factory (); /// Destructor. - virtual ~TAO_Default_Resource_Factory (void); + virtual ~TAO_Default_Resource_Factory (); /** * @name Service Configurator Hooks @@ -151,49 +150,48 @@ public: int cdr_allocator_source (void); // = Resource Retrieval - virtual int use_locked_data_blocks (void) const; - virtual ACE_Reactor *get_reactor (void); + virtual int use_locked_data_blocks () const; + virtual ACE_Reactor *get_reactor (); virtual void reclaim_reactor (ACE_Reactor *); - virtual TAO_Acceptor_Registry *get_acceptor_registry (void); - virtual TAO_Connector_Registry *get_connector_registry (void); + virtual TAO_Acceptor_Registry *get_acceptor_registry (); + virtual TAO_Connector_Registry *get_connector_registry (); virtual void use_local_memory_pool (bool); - virtual ACE_Allocator* input_cdr_dblock_allocator (void); - virtual ACE_Allocator* input_cdr_buffer_allocator (void); - virtual ACE_Allocator* input_cdr_msgblock_allocator (void); - virtual int input_cdr_allocator_type_locked (void); - virtual ACE_Allocator* output_cdr_dblock_allocator (void); - virtual ACE_Allocator* output_cdr_buffer_allocator (void); - virtual ACE_Allocator* output_cdr_msgblock_allocator (void); - virtual ACE_Allocator* amh_response_handler_allocator (void); - virtual ACE_Allocator* ami_response_handler_allocator (void); - virtual TAO_ProtocolFactorySet *get_protocol_factories (void); - - virtual int init_protocol_factories (void); - - virtual TAO_Codeset_Manager * codeset_manager (void); - - virtual int cache_maximum (void) const; - virtual int purge_percentage (void) const; - virtual int max_muxed_connections (void) const; - virtual ACE_Lock *create_cached_connection_lock (void); - virtual int locked_transport_cache (void); - virtual TAO_Flushing_Strategy *create_flushing_strategy (void); - virtual TAO_Connection_Purging_Strategy *create_purging_strategy (void); - TAO_Resource_Factory::Resource_Usage resource_usage_strategy (void) const; - virtual TAO_LF_Strategy *create_lf_strategy (void); + virtual ACE_Allocator* input_cdr_dblock_allocator (); + virtual ACE_Allocator* input_cdr_buffer_allocator (); + virtual ACE_Allocator* input_cdr_msgblock_allocator (); + virtual int input_cdr_allocator_type_locked (); + virtual ACE_Allocator* output_cdr_dblock_allocator (); + virtual ACE_Allocator* output_cdr_buffer_allocator (); + virtual ACE_Allocator* output_cdr_msgblock_allocator (); + virtual ACE_Allocator* amh_response_handler_allocator (); + virtual ACE_Allocator* ami_response_handler_allocator (); + virtual TAO_ProtocolFactorySet *get_protocol_factories (); + + virtual int init_protocol_factories (); + + virtual TAO_Codeset_Manager * codeset_manager (); + + virtual int cache_maximum () const; + virtual int purge_percentage () const; + virtual int max_muxed_connections () const; + virtual ACE_Lock *create_cached_connection_lock (); + virtual int locked_transport_cache (); + virtual TAO_Flushing_Strategy *create_flushing_strategy (); + virtual TAO_Connection_Purging_Strategy *create_purging_strategy (); + TAO_Resource_Factory::Resource_Usage resource_usage_strategy () const; + virtual TAO_LF_Strategy *create_lf_strategy (); virtual TAO_GIOP_Fragmentation_Strategy* create_fragmentation_strategy (TAO_Transport * transport, CORBA::ULong max_message_size) const; - virtual void disable_factory (void); - virtual bool drop_replies_during_shutdown (void) const; + virtual void disable_factory (); + virtual bool drop_replies_during_shutdown () const; //@} protected: - friend class TAO_RSF_Timer_Queue_Ptr; #if (TAO_HAS_TIME_POLICY == 1) - TAO_Time_Policy_Manager* time_policy_manager (void) const; + TAO_Time_Policy_Manager* time_policy_manager () const; #endif ACE_Timer_Queue * create_timer_queue (void) const; @@ -210,7 +208,6 @@ protected: const ACE_TCHAR* option_value); protected: - /// The type of data blocks that the ORB should use int use_locked_data_blocks_; -- cgit v1.2.1