diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-01-18 10:51:55 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-01-18 10:51:55 +0100 |
commit | 2067f66c7028d125e09cdfcbe9fb33aed5a58692 (patch) | |
tree | 2646378e4a9830010de0d62b44d83ff44a4d6444 | |
parent | 5d3513f7346ef9465df43e3a8151e4643867d37b (diff) | |
download | ATCD-2067f66c7028d125e09cdfcbe9fb33aed5a58692.tar.gz |
Use nullptr/default, docu changes
* TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp:
* TAO/tao/BiDir_GIOP/BiDir_Policy_i.cpp:
* TAO/tao/BiDir_GIOP/BiDir_Policy_i.h:
* TAO/tao/GIOP_Message_Base.cpp:
* TAO/tao/ORB_Core.cpp:
* TAO/tao/PI/PolicyFactory_Loader.cpp:
* TAO/tao/Policy_Validator.cpp:
* TAO/tao/PortableServer/Default_Policy_Validator.cpp:
* TAO/tao/PortableServer/Default_Policy_Validator.h:
* TAO/tao/RTPortableServer/RT_Policy_Validator.cpp:
* TAO/tao/RTPortableServer/RT_Policy_Validator.h:
* TAO/tao/ZIOP/ZIOP_Policy_Validator.h:
* TAO/tests/BiDirectional/README:
* TAO/tests/BiDirectional/client.cpp:
-rw-r--r-- | TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/BiDir_GIOP/BiDir_Policy_i.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/BiDir_GIOP/BiDir_Policy_i.h | 2 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/PI/PolicyFactory_Loader.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Policy_Validator.cpp | 1 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Default_Policy_Validator.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Default_Policy_Validator.h | 4 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_Policy_Validator.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_Policy_Validator.h | 2 | ||||
-rw-r--r-- | TAO/tao/ZIOP/ZIOP_Policy_Validator.h | 1 | ||||
-rw-r--r-- | TAO/tests/BiDirectional/README | 2 | ||||
-rw-r--r-- | TAO/tests/BiDirectional/client.cpp | 2 |
14 files changed, 16 insertions, 32 deletions
diff --git a/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp b/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp index 51fcc54db14..66581bacfd7 100644 --- a/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp +++ b/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp @@ -31,7 +31,7 @@ TAO_BiDir_ORBInitializer::pre_init (PortableInterceptor::ORBInitInfo_ptr info) } // Bind the service context handler for BiDIR GIOP - TAO_BiDIR_Service_Context_Handler* h = 0; + TAO_BiDIR_Service_Context_Handler* h = nullptr; ACE_NEW (h, TAO_BiDIR_Service_Context_Handler()); tao_info->orb_core ()->service_context_registry ().bind (IOP::BI_DIR_IIOP, h); diff --git a/TAO/tao/BiDir_GIOP/BiDir_Policy_i.cpp b/TAO/tao/BiDir_GIOP/BiDir_Policy_i.cpp index 28530309a67..75aacfbc283 100644 --- a/TAO/tao/BiDir_GIOP/BiDir_Policy_i.cpp +++ b/TAO/tao/BiDir_GIOP/BiDir_Policy_i.cpp @@ -28,7 +28,7 @@ TAO_BidirectionalPolicy::TAO_BidirectionalPolicy (const TAO_BidirectionalPolicy } CORBA::PolicyType -TAO_BidirectionalPolicy::policy_type (void) +TAO_BidirectionalPolicy::policy_type () { // Future policy implementors: notice how this minimizes the // footprint of the class. @@ -39,10 +39,10 @@ TAO_BidirectionalPolicy::policy_type (void) TAO_BidirectionalPolicy * TAO_BidirectionalPolicy::clone () const { - TAO_BidirectionalPolicy *copy = 0; + TAO_BidirectionalPolicy *copy = nullptr; ACE_NEW_RETURN (copy, TAO_BidirectionalPolicy (*this), - 0); + nullptr); return copy; } @@ -51,7 +51,7 @@ TAO_BidirectionalPolicy::copy (void) { // Future policy implementors: notice how the following code is // exception safe! - TAO_BidirectionalPolicy* tmp = 0; + TAO_BidirectionalPolicy* tmp = nullptr; ACE_NEW_THROW_EX (tmp, TAO_BidirectionalPolicy (*this), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); @@ -60,12 +60,12 @@ TAO_BidirectionalPolicy::copy (void) } void -TAO_BidirectionalPolicy::destroy (void) +TAO_BidirectionalPolicy::destroy () { } BiDirPolicy::BidirectionalPolicyValue -TAO_BidirectionalPolicy::value (void) +TAO_BidirectionalPolicy::value () { return this->value_; } diff --git a/TAO/tao/BiDir_GIOP/BiDir_Policy_i.h b/TAO/tao/BiDir_GIOP/BiDir_Policy_i.h index 4e43b5fb213..24e47b059c8 100644 --- a/TAO/tao/BiDir_GIOP/BiDir_Policy_i.h +++ b/TAO/tao/BiDir_GIOP/BiDir_Policy_i.h @@ -48,7 +48,7 @@ public: /// Copy constructor. TAO_BidirectionalPolicy (const TAO_BidirectionalPolicy &rhs); - /// Returns a copy of <this>. + /// Returns a copy of this. virtual TAO_BidirectionalPolicy *clone () const; /// = The BiDir::BidirectionalPolicy methods diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 9b42415725f..6ef9356b42f 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -1616,8 +1616,7 @@ TAO_GIOP_Message_Base::is_ready_for_bidirectional (TAO_OutputCDR &msg) const msg.get_version (giop_version); // Get the parser we need to use - TAO_GIOP_Message_Generator_Parser *generator_parser = - this->get_parser (giop_version); + TAO_GIOP_Message_Generator_Parser *generator_parser = this->get_parser (giop_version); // We dont really know.. So ask the generator and parser objects that // we know. diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index a2519a100f3..a68eea0fd57 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -258,7 +258,7 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid, valuetype_adapter_ (nullptr), parser_registry_ (), bidir_adapter_ (nullptr), - bidir_giop_policy_ (0), + bidir_giop_policy_ (false), ziop_adapter_ (nullptr), ziop_enabled_ (false), flushing_strategy_ (nullptr), @@ -333,7 +333,6 @@ TAO_ORB_Core::~TAO_ORB_Core () // This will destroy the service repository for this core (void) TAO::ORB::close_services (this->config_); - } int diff --git a/TAO/tao/PI/PolicyFactory_Loader.cpp b/TAO/tao/PI/PolicyFactory_Loader.cpp index 252e0f9f1cf..38164a13173 100644 --- a/TAO/tao/PI/PolicyFactory_Loader.cpp +++ b/TAO/tao/PI/PolicyFactory_Loader.cpp @@ -19,10 +19,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO::PolicyFactory_Registry_Adapter* TAO_PolicyFactory_Loader::create () { - TAO::PolicyFactory_Registry_Adapter* obj = 0; + TAO::PolicyFactory_Registry_Adapter* obj = nullptr; ACE_NEW_RETURN (obj, TAO_PolicyFactory_Registry, - 0); + nullptr); return obj; } diff --git a/TAO/tao/Policy_Validator.cpp b/TAO/tao/Policy_Validator.cpp index d2580db35b1..f9e7e6ca05a 100644 --- a/TAO/tao/Policy_Validator.cpp +++ b/TAO/tao/Policy_Validator.cpp @@ -55,7 +55,6 @@ TAO_Policy_Validator::add_validator (TAO_Policy_Validator *validator) } } - void TAO_Policy_Validator::validate (TAO_Policy_Set &policies) { diff --git a/TAO/tao/PortableServer/Default_Policy_Validator.cpp b/TAO/tao/PortableServer/Default_Policy_Validator.cpp index 84c6d9f06a2..40f93a288a6 100644 --- a/TAO/tao/PortableServer/Default_Policy_Validator.cpp +++ b/TAO/tao/PortableServer/Default_Policy_Validator.cpp @@ -12,10 +12,6 @@ TAO_POA_Default_Policy_Validator::TAO_POA_Default_Policy_Validator ( { } -TAO_POA_Default_Policy_Validator::~TAO_POA_Default_Policy_Validator () -{ -} - void TAO_POA_Default_Policy_Validator::validate_impl (TAO_Policy_Set &policies) { diff --git a/TAO/tao/PortableServer/Default_Policy_Validator.h b/TAO/tao/PortableServer/Default_Policy_Validator.h index e0f17e71dd4..f185890c747 100644 --- a/TAO/tao/PortableServer/Default_Policy_Validator.h +++ b/TAO/tao/PortableServer/Default_Policy_Validator.h @@ -30,12 +30,11 @@ class TAO_PortableServer_Export TAO_POA_Default_Policy_Validator : public TAO_Policy_Validator { public: - /// Constructor. TAO_POA_Default_Policy_Validator (TAO_ORB_Core &orb_core); /// Destructor. - ~TAO_POA_Default_Policy_Validator (); + ~TAO_POA_Default_Policy_Validator () = default; protected: /** @@ -55,7 +54,6 @@ protected: * validate () routine, and these need to be caught. */ virtual CORBA::Boolean legal_policy_impl (CORBA::PolicyType type); - }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp b/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp index 60d6da68d9b..40e48515c15 100644 --- a/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp +++ b/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp @@ -21,12 +21,6 @@ TAO_POA_RT_Policy_Validator::TAO_POA_RT_Policy_Validator (TAO_ORB_Core &orb_core : TAO_Policy_Validator (orb_core), thread_pool_ (0) { - // No-Op. -} - -TAO_POA_RT_Policy_Validator::~TAO_POA_RT_Policy_Validator (void) -{ - // No-Op. } void diff --git a/TAO/tao/RTPortableServer/RT_Policy_Validator.h b/TAO/tao/RTPortableServer/RT_Policy_Validator.h index 73b4f777b71..aa20a40f0d4 100644 --- a/TAO/tao/RTPortableServer/RT_Policy_Validator.h +++ b/TAO/tao/RTPortableServer/RT_Policy_Validator.h @@ -42,7 +42,7 @@ public: TAO_POA_RT_Policy_Validator (TAO_ORB_Core &orb_core); /// Destructor. - ~TAO_POA_RT_Policy_Validator (void); + ~TAO_POA_RT_Policy_Validator () = default; static RTCORBA::ServerProtocolPolicy_ptr server_protocol_policy_from_thread_pool (TAO_Thread_Pool *thread_pool, TAO_ORB_Core &orb_core); diff --git a/TAO/tao/ZIOP/ZIOP_Policy_Validator.h b/TAO/tao/ZIOP/ZIOP_Policy_Validator.h index 9cfab884e8d..fed6da7cd79 100644 --- a/TAO/tao/ZIOP/ZIOP_Policy_Validator.h +++ b/TAO/tao/ZIOP/ZIOP_Policy_Validator.h @@ -37,7 +37,6 @@ class TAO_ORB_Core; class TAO_ZIOP_Export TAO_ZIOPPolicy_Validator : public TAO_Policy_Validator { public: - TAO_ZIOPPolicy_Validator (TAO_ORB_Core &orb_core); virtual void validate_impl (TAO_Policy_Set &policies); diff --git a/TAO/tests/BiDirectional/README b/TAO/tests/BiDirectional/README index 4470ea72d13..917a2220703 100644 --- a/TAO/tests/BiDirectional/README +++ b/TAO/tests/BiDirectional/README @@ -1,4 +1,4 @@ -This is a test that exercises the birectional GIOP connection +This is a test that exercises the bidirectional GIOP connection implementation in TAO. Start the server like this $ server -o <file.ior> -i <no_iterations> diff --git a/TAO/tests/BiDirectional/client.cpp b/TAO/tests/BiDirectional/client.cpp index d9ea9fbf372..8a333958ed6 100644 --- a/TAO/tests/BiDirectional/client.cpp +++ b/TAO/tests/BiDirectional/client.cpp @@ -115,7 +115,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Send the callback object to the server server->callback_object (callback.in ()); - // A method to kickstart callbacks from the server + // A method to kickstart callbacks from the server CORBA::Long r = server->test_method (1); |