diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-02-25 18:05:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 18:05:47 +0100 |
commit | 74d46d603c2f34cbd675287f40ceaff6a21007fa (patch) | |
tree | a551620b289d79b46b4ec05069a2876573fe4e53 /TAO/tao | |
parent | fdf9fe05d6a4499ced8b55b52f179275ce0c90b0 (diff) | |
parent | fd6649bb4aead8313bd1e7f818de34b6bb0c6ca1 (diff) | |
download | ATCD-74d46d603c2f34cbd675287f40ceaff6a21007fa.tar.gz |
Merge pull request #1441 from jwillemsen/jwi-cpp11modernize
Modernize using default/delete/override
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/CORBALOC_Parser.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/CORBALOC_Parser.h | 14 | ||||
-rw-r--r-- | TAO/tao/CORBALOC_Parser.inl | 11 | ||||
-rw-r--r-- | TAO/tao/CORBANAME_Parser.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/CORBANAME_Parser.h | 12 | ||||
-rw-r--r-- | TAO/tao/DLL_Parser.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/DLL_Parser.h | 11 | ||||
-rw-r--r-- | TAO/tao/Default_Stub_Factory.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Default_Stub_Factory.h | 8 | ||||
-rw-r--r-- | TAO/tao/Dynamic_Adapter.h | 3 | ||||
-rw-r--r-- | TAO/tao/Endpoint.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Endpoint.h | 10 | ||||
-rw-r--r-- | TAO/tao/Endpoint.inl | 4 | ||||
-rw-r--r-- | TAO/tao/Endpoint_Selector_Factory.h | 4 | ||||
-rw-r--r-- | TAO/tao/Environment.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Environment.h | 11 | ||||
-rw-r--r-- | TAO/tao/Exception.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/Exception.h | 4 | ||||
-rw-r--r-- | TAO/tao/FILE_Parser.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/FILE_Parser.h | 8 | ||||
-rw-r--r-- | TAO/tao/Fault_Tolerance_Service.h | 4 | ||||
-rw-r--r-- | TAO/tao/Fault_Tolerance_Service.inl | 6 | ||||
-rw-r--r-- | TAO/tao/Flushing_Strategy.h | 2 | ||||
-rw-r--r-- | TAO/tao/HTTP_Parser.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/HTTP_Parser.h | 9 | ||||
-rw-r--r-- | TAO/tao/IOR_Parser.h | 3 |
26 files changed, 51 insertions, 122 deletions
diff --git a/TAO/tao/CORBALOC_Parser.cpp b/TAO/tao/CORBALOC_Parser.cpp index dff01bf48c0..810ef41d818 100644 --- a/TAO/tao/CORBALOC_Parser.cpp +++ b/TAO/tao/CORBALOC_Parser.cpp @@ -31,10 +31,6 @@ static const char iiop_token_len = sizeof iiop_token - 1; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_CORBALOC_Parser::~TAO_CORBALOC_Parser () -{ -} - bool TAO_CORBALOC_Parser::match_prefix (const char *ior_string) const { @@ -344,8 +340,6 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, canonical_endpoint += raw_port; } - - ACE_STATIC_SVC_DEFINE (TAO_CORBALOC_Parser, ACE_TEXT ("CORBALOC_Parser"), ACE_SVC_OBJ_T, diff --git a/TAO/tao/CORBALOC_Parser.h b/TAO/tao/CORBALOC_Parser.h index 9ce93163da0..d0c26d36f0f 100644 --- a/TAO/tao/CORBALOC_Parser.h +++ b/TAO/tao/CORBALOC_Parser.h @@ -45,18 +45,18 @@ class TAO_CORBALOC_Parser : public TAO_IOR_Parser { public: /// Constructor - TAO_CORBALOC_Parser (void); + TAO_CORBALOC_Parser () = default; /// The destructor - virtual ~TAO_CORBALOC_Parser (void); + ~TAO_CORBALOC_Parser () override = default; /// = The IOR_Parser methods, please read the documentation in /// IOR_Parser.h - virtual bool match_prefix (const char *ior_string) const; + bool match_prefix (const char *ior_string) const override; /// Parse the ior-string that is passed. - virtual CORBA::Object_ptr parse_string (const char *ior, - CORBA::ORB_ptr orb); + CORBA::Object_ptr parse_string (const char *ior, + CORBA::ORB_ptr orb) override; private: /** @@ -76,9 +76,9 @@ private: ACE_CString &canonical_endpoint); struct parsed_endpoint { - parsed_endpoint (); + parsed_endpoint () = default; ~parsed_endpoint (); - TAO_Profile *profile_; + TAO_Profile *profile_ {}; char obj_key_sep_; ACE_CString prot_addr_; }; diff --git a/TAO/tao/CORBALOC_Parser.inl b/TAO/tao/CORBALOC_Parser.inl index a81ae2f6ac1..399a02a53bb 100644 --- a/TAO/tao/CORBALOC_Parser.inl +++ b/TAO/tao/CORBALOC_Parser.inl @@ -4,17 +4,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE -TAO_CORBALOC_Parser::TAO_CORBALOC_Parser (void) -{ -} - -ACE_INLINE -TAO_CORBALOC_Parser::parsed_endpoint::parsed_endpoint (void) - : profile_ (0) -{ -} - -ACE_INLINE TAO_CORBALOC_Parser::parsed_endpoint::~parsed_endpoint (void) { if (this->profile_ != 0) diff --git a/TAO/tao/CORBANAME_Parser.cpp b/TAO/tao/CORBANAME_Parser.cpp index 2bd5edee9be..2b934e81b41 100644 --- a/TAO/tao/CORBANAME_Parser.cpp +++ b/TAO/tao/CORBANAME_Parser.cpp @@ -18,10 +18,6 @@ static const char corbaname_prefix[] = "corbaname:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_CORBANAME_Parser::~TAO_CORBANAME_Parser () -{ -} - bool TAO_CORBANAME_Parser::match_prefix (const char *ior_string) const { diff --git a/TAO/tao/CORBANAME_Parser.h b/TAO/tao/CORBANAME_Parser.h index 6937d5b4df8..e218da06434 100644 --- a/TAO/tao/CORBANAME_Parser.h +++ b/TAO/tao/CORBANAME_Parser.h @@ -39,17 +39,17 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_CORBANAME_Parser : public TAO_IOR_Parser { public: - /// The destructor - virtual ~TAO_CORBANAME_Parser (); + TAO_CORBANAME_Parser () = default; + ~TAO_CORBANAME_Parser () override = default; // = The IOR_Parser methods, please read the documentation in // IOR_Parser.h - virtual bool match_prefix (const char *ior_string) const; - virtual CORBA::Object_ptr parse_string (const char *ior, - CORBA::ORB_ptr orb); + bool match_prefix (const char *ior_string) const override; + CORBA::Object_ptr parse_string (const char *ior, + CORBA::ORB_ptr orb) override; private: - virtual CORBA::Object_ptr + CORBA::Object_ptr parse_string_dynamic_request_helper (CORBA::Object_ptr naming_context, ACE_CString &key_string); }; diff --git a/TAO/tao/DLL_Parser.cpp b/TAO/tao/DLL_Parser.cpp index 2575c276fcb..faf6e4e4b23 100644 --- a/TAO/tao/DLL_Parser.cpp +++ b/TAO/tao/DLL_Parser.cpp @@ -16,11 +16,6 @@ static const char dll_prefix[] = "DLL:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_DLL_Parser::~TAO_DLL_Parser () -{ -} - - bool TAO_DLL_Parser::match_prefix (const char *ior_string) const { diff --git a/TAO/tao/DLL_Parser.h b/TAO/tao/DLL_Parser.h index 6185a750b60..19b225980c8 100644 --- a/TAO/tao/DLL_Parser.h +++ b/TAO/tao/DLL_Parser.h @@ -77,15 +77,14 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_DLL_Parser : public TAO_IOR_Parser { public: - - /// The destructor - virtual ~TAO_DLL_Parser (void); + TAO_DLL_Parser () = default; + ~TAO_DLL_Parser () override = default; // = The IOR_Parser methods, please read the documentation in // IOR_Parser.h - virtual bool match_prefix (const char *ior_string) const; - virtual CORBA::Object_ptr parse_string (const char *ior, - CORBA::ORB_ptr orb); + bool match_prefix (const char *ior_string) const override; + CORBA::Object_ptr parse_string (const char *ior, + CORBA::ORB_ptr orb) override; }; ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_DLL_Parser) diff --git a/TAO/tao/Default_Stub_Factory.cpp b/TAO/tao/Default_Stub_Factory.cpp index ed4cd6f6d3c..6facfeae361 100644 --- a/TAO/tao/Default_Stub_Factory.cpp +++ b/TAO/tao/Default_Stub_Factory.cpp @@ -8,10 +8,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Default_Stub_Factory::~TAO_Default_Stub_Factory () -{ -} - TAO_Stub * TAO_Default_Stub_Factory::create_stub (const char *repository_id, const TAO_MProfile &profiles, diff --git a/TAO/tao/Default_Stub_Factory.h b/TAO/tao/Default_Stub_Factory.h index 03a0142070f..496a82b94e5 100644 --- a/TAO/tao/Default_Stub_Factory.h +++ b/TAO/tao/Default_Stub_Factory.h @@ -41,12 +41,12 @@ class TAO_Export TAO_Default_Stub_Factory { public: /// Destructor. - virtual ~TAO_Default_Stub_Factory (void); + ~TAO_Default_Stub_Factory () override = default; /// Creates a Stub Object. - virtual TAO_Stub *create_stub (const char *repository_id, - const TAO_MProfile &profiles, - TAO_ORB_Core *orb_core); + TAO_Stub *create_stub (const char *repository_id, + const TAO_MProfile &profiles, + TAO_ORB_Core *orb_core) override; }; ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_Default_Stub_Factory) diff --git a/TAO/tao/Dynamic_Adapter.h b/TAO/tao/Dynamic_Adapter.h index de8ab07a588..eec6030c769 100644 --- a/TAO/tao/Dynamic_Adapter.h +++ b/TAO/tao/Dynamic_Adapter.h @@ -65,10 +65,9 @@ namespace CORBA class TAO_Export TAO_Dynamic_Adapter : public ACE_Service_Object { public: - virtual ~TAO_Dynamic_Adapter (void); + virtual ~TAO_Dynamic_Adapter (); // CORBA::Object::_create_request and CORBA::Object::_request. - virtual void create_request (CORBA::Object_ptr obj, CORBA::ORB_ptr orb, const char *operation, diff --git a/TAO/tao/Endpoint.cpp b/TAO/tao/Endpoint.cpp index 2fc670189d8..dee4c8616f0 100644 --- a/TAO/tao/Endpoint.cpp +++ b/TAO/tao/Endpoint.cpp @@ -7,10 +7,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Endpoint::~TAO_Endpoint () -{ -} - TAO_Endpoint * TAO_Endpoint::next_filtered (TAO_ORB_Core *, TAO_Endpoint *root) { diff --git a/TAO/tao/Endpoint.h b/TAO/tao/Endpoint.h index f4a943177b9..b5f931e3026 100644 --- a/TAO/tao/Endpoint.h +++ b/TAO/tao/Endpoint.h @@ -50,7 +50,7 @@ public: CORBA::Short priority = TAO_INVALID_PRIORITY); /// Destructor. - virtual ~TAO_Endpoint (void); + virtual ~TAO_Endpoint () = default; /// IOP protocol tag accessor. CORBA::ULong tag (void) const; @@ -108,10 +108,10 @@ public: /// This method returns a deep copy of the corresponding endpoints by /// allocating memory. - virtual TAO_Endpoint *duplicate (void) = 0; + virtual TAO_Endpoint *duplicate () = 0; /// Return a hash value for this object. - virtual CORBA::ULong hash (void) = 0; + virtual CORBA::ULong hash () = 0; protected: /// Lock for the address lookup. @@ -139,8 +139,8 @@ protected: private: /// Endpoints should not be copied. - TAO_Endpoint (const TAO_Endpoint&); - void operator= (const TAO_Endpoint&); + TAO_Endpoint (const TAO_Endpoint&) = delete; + void operator= (const TAO_Endpoint&) = delete; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Endpoint.inl b/TAO/tao/Endpoint.inl index ae8df119331..17025738d69 100644 --- a/TAO/tao/Endpoint.inl +++ b/TAO/tao/Endpoint.inl @@ -17,13 +17,13 @@ TAO_Endpoint::TAO_Endpoint (CORBA::ULong tag, } ACE_INLINE CORBA::ULong -TAO_Endpoint::tag (void) const +TAO_Endpoint::tag () const { return this->tag_; } ACE_INLINE CORBA::Short -TAO_Endpoint::priority (void) const +TAO_Endpoint::priority () const { return this->priority_; } diff --git a/TAO/tao/Endpoint_Selector_Factory.h b/TAO/tao/Endpoint_Selector_Factory.h index d878a1583ef..b16271344db 100644 --- a/TAO/tao/Endpoint_Selector_Factory.h +++ b/TAO/tao/Endpoint_Selector_Factory.h @@ -59,11 +59,11 @@ class TAO_Export TAO_Endpoint_Selector_Factory { public: /// Destructor. - virtual ~TAO_Endpoint_Selector_Factory (void); + virtual ~TAO_Endpoint_Selector_Factory (); /// Get an Invocation's endpoint selection strategy and /// initialize the endpoint selection state instance. - virtual TAO_Invocation_Endpoint_Selector *get_selector (void) = 0; + virtual TAO_Invocation_Endpoint_Selector *get_selector () = 0; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp index 779bea6f483..9d7adebf961 100644 --- a/TAO/tao/Environment.cpp +++ b/TAO/tao/Environment.cpp @@ -11,12 +11,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -CORBA::Environment::Environment () - : exception_ (nullptr) - , previous_ (nullptr) -{ -} - CORBA::Environment::Environment (const CORBA::Environment& rhs) : exception_ (nullptr) , previous_ (nullptr) diff --git a/TAO/tao/Environment.h b/TAO/tao/Environment.h index d381afd7329..ef6a99c4322 100644 --- a/TAO/tao/Environment.h +++ b/TAO/tao/Environment.h @@ -74,13 +74,13 @@ namespace CORBA public: /// The default constructor. The environment will hold no /// exceptions. - Environment (); + Environment () = default; /// Copy constructor. - Environment (const Environment &ACE_TRY_ENV); + Environment (const Environment &rhs); /// Assingment. - Environment &operator=(const Environment &ACE_TRY_ENV); + Environment &operator=(const Environment &rhs); /// Destructor, release the exception. ~Environment (); @@ -135,17 +135,16 @@ namespace CORBA typedef CORBA::Environment_out _out_type; private: - /// Initialize using a well known ORB Core; this is intended for /// the bootstrapping of the ORB_Core, not for general /// consumption. Environment (TAO_ORB_Core *orb_core); /// Pointer to the exception object contained in the environment. - CORBA::Exception *exception_; + CORBA::Exception *exception_ {}; /// The previous environment on the "default environment stack". - Environment *previous_; + Environment *previous_ {}; }; template<> diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp index a0234612fc2..8868601f717 100644 --- a/TAO/tao/Exception.cpp +++ b/TAO/tao/Exception.cpp @@ -45,16 +45,6 @@ CORBA::Exception::Exception (const CORBA::Exception &src) // responsible for releasing any storage owned by the exception. It // can do this because it's got the local name and the id. -CORBA::Exception::Exception () - : id_ (), - name_ () -{ -} - -CORBA::Exception::~Exception () -{ -} - CORBA::Exception & CORBA::Exception::operator= (const CORBA::Exception &src) { diff --git a/TAO/tao/Exception.h b/TAO/tao/Exception.h index cec1728c15d..4c2e9d7cfc7 100644 --- a/TAO/tao/Exception.h +++ b/TAO/tao/Exception.h @@ -110,7 +110,7 @@ namespace CORBA Exception (const Exception &src); /// Destructor. - virtual ~Exception (); + virtual ~Exception () = default; // = To throw the exception (when using the standard mapping). virtual void _raise () const = 0; @@ -181,7 +181,7 @@ namespace CORBA protected: /// Default constructor. - Exception (); + Exception () = default; /// Assignment operator. Exception & operator = (const Exception & src); diff --git a/TAO/tao/FILE_Parser.cpp b/TAO/tao/FILE_Parser.cpp index ea0224d4f79..6c3d1fef490 100644 --- a/TAO/tao/FILE_Parser.cpp +++ b/TAO/tao/FILE_Parser.cpp @@ -15,11 +15,6 @@ static const char file_prefix[] = "file:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_FILE_Parser::~TAO_FILE_Parser () -{ -} - - bool TAO_FILE_Parser::match_prefix (const char *ior_string) const { diff --git a/TAO/tao/FILE_Parser.h b/TAO/tao/FILE_Parser.h index 88f0161a7b3..de7bd0e5d3b 100644 --- a/TAO/tao/FILE_Parser.h +++ b/TAO/tao/FILE_Parser.h @@ -38,14 +38,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_FILE_Parser : public TAO_IOR_Parser { public: - - /// The destructor - virtual ~TAO_FILE_Parser (void); + ~TAO_FILE_Parser () override = default; // = The IOR_Parser methods, please read the documentation in // IOR_Parser.h - virtual bool match_prefix (const char *ior_string) const; - virtual CORBA::Object_ptr parse_string (const char *ior, CORBA::ORB_ptr orb); + bool match_prefix (const char *ior_string) const override; + CORBA::Object_ptr parse_string (const char *ior, CORBA::ORB_ptr orb) override; }; ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_FILE_Parser) diff --git a/TAO/tao/Fault_Tolerance_Service.h b/TAO/tao/Fault_Tolerance_Service.h index e7bd1f7e1af..584bb6adef1 100644 --- a/TAO/tao/Fault_Tolerance_Service.h +++ b/TAO/tao/Fault_Tolerance_Service.h @@ -41,7 +41,7 @@ class TAO_Export TAO_Fault_Tolerance_Service public: /// Ctor - TAO_Fault_Tolerance_Service (); + TAO_Fault_Tolerance_Service () = default; /// Dtor ~TAO_Fault_Tolerance_Service (); @@ -59,7 +59,7 @@ private: private: /// hook to callback on to the service - TAO_Service_Callbacks *ft_service_callback_; + TAO_Service_Callbacks *ft_service_callback_ {}; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Fault_Tolerance_Service.inl b/TAO/tao/Fault_Tolerance_Service.inl index bc2ab62f6c2..ef19160391b 100644 --- a/TAO/tao/Fault_Tolerance_Service.inl +++ b/TAO/tao/Fault_Tolerance_Service.inl @@ -2,12 +2,6 @@ // TAO_BEGIN_VERSIONED_NAMESPACE_DECL -ACE_INLINE -TAO_Fault_Tolerance_Service::TAO_Fault_Tolerance_Service (void) - : ft_service_callback_ (0) -{ -} - ACE_INLINE TAO_Service_Callbacks * TAO_Fault_Tolerance_Service::service_callback (void) { diff --git a/TAO/tao/Flushing_Strategy.h b/TAO/tao/Flushing_Strategy.h index 59f3923b4b1..26d8667dd66 100644 --- a/TAO/tao/Flushing_Strategy.h +++ b/TAO/tao/Flushing_Strategy.h @@ -51,7 +51,7 @@ class TAO_Flushing_Strategy { public: /// Destructor - virtual ~TAO_Flushing_Strategy (void); + virtual ~TAO_Flushing_Strategy (); enum SCHEDULE_OUTPUT_RETURN { MUST_FLUSH = -2 }; diff --git a/TAO/tao/HTTP_Parser.cpp b/TAO/tao/HTTP_Parser.cpp index e4922fb4a7d..6f5cca88d57 100644 --- a/TAO/tao/HTTP_Parser.cpp +++ b/TAO/tao/HTTP_Parser.cpp @@ -18,11 +18,6 @@ static const ACE_TCHAR file_prefix[] = ACE_TEXT ("http:"); TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_HTTP_Parser::~TAO_HTTP_Parser () -{ -} - - bool TAO_HTTP_Parser::match_prefix (const char *nior_string) const { diff --git a/TAO/tao/HTTP_Parser.h b/TAO/tao/HTTP_Parser.h index 53a4bc578ff..3c35c1410bd 100644 --- a/TAO/tao/HTTP_Parser.h +++ b/TAO/tao/HTTP_Parser.h @@ -39,14 +39,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_HTTP_Parser : public TAO_IOR_Parser { public: - - /// The destructor - virtual ~TAO_HTTP_Parser (void); + TAO_HTTP_Parser () = default; + ~TAO_HTTP_Parser () override = default; // = The IOR_Parser methods, please read the documentation in // IOR_Parser.h - virtual bool match_prefix (const char *ior_string) const; - virtual CORBA::Object_ptr parse_string (const char *ior, CORBA::ORB_ptr orb); + bool match_prefix (const char *ior_string) const override; + CORBA::Object_ptr parse_string (const char *ior, CORBA::ORB_ptr orb) override; }; ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_HTTP_Parser) diff --git a/TAO/tao/IOR_Parser.h b/TAO/tao/IOR_Parser.h index 1ab29881e66..ff7a89eb047 100644 --- a/TAO/tao/IOR_Parser.h +++ b/TAO/tao/IOR_Parser.h @@ -47,7 +47,8 @@ class TAO_Export TAO_IOR_Parser : public ACE_Service_Object { public: /// The destructor - virtual ~TAO_IOR_Parser (void); + TAO_IOR_Parser () = default; + virtual ~TAO_IOR_Parser (); /// Return true if @a ior_string starts with a prefix known to this IOR /// parser |