diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-07 16:47:37 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-07 16:47:37 +0100 |
commit | 7d210e952de2ccfd2ac758dbacd7b752da8769e9 (patch) | |
tree | 0e970def70c96a3c19d5f0d37cd17d678f70c9a0 | |
parent | 884dcea8b196f72cb995de9f46d61a6ee6521222 (diff) | |
download | ATCD-7d210e952de2ccfd2ac758dbacd7b752da8769e9.tar.gz |
Removed redundant void, use nullptr/override in the TAO core
185 files changed, 1948 insertions, 1948 deletions
diff --git a/TAO/tao/Abstract_Servant_Base.cpp b/TAO/tao/Abstract_Servant_Base.cpp index a1605345254..fc917331b46 100644 --- a/TAO/tao/Abstract_Servant_Base.cpp +++ b/TAO/tao/Abstract_Servant_Base.cpp @@ -7,7 +7,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Abstract_ServantBase::~TAO_Abstract_ServantBase (void) +TAO_Abstract_ServantBase::~TAO_Abstract_ServantBase () { } diff --git a/TAO/tao/Acceptor_Filter.cpp b/TAO/tao/Acceptor_Filter.cpp index 26a7f1d33d9..6c1fe0bad53 100644 --- a/TAO/tao/Acceptor_Filter.cpp +++ b/TAO/tao/Acceptor_Filter.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Acceptor_Filter::~TAO_Acceptor_Filter (void) +TAO_Acceptor_Filter::~TAO_Acceptor_Filter () { } diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp index 9adc59e4f45..f502fe89c0d 100644 --- a/TAO/tao/Acceptor_Registry.cpp +++ b/TAO/tao/Acceptor_Registry.cpp @@ -24,13 +24,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Acceptor_Registry::TAO_Acceptor_Registry (void) - : acceptors_ (0), +TAO_Acceptor_Registry::TAO_Acceptor_Registry () + : acceptors_ (nullptr), size_ (0) { } -TAO_Acceptor_Registry::~TAO_Acceptor_Registry (void) +TAO_Acceptor_Registry::~TAO_Acceptor_Registry () { this->close_all (); @@ -38,7 +38,7 @@ TAO_Acceptor_Registry::~TAO_Acceptor_Registry (void) } size_t -TAO_Acceptor_Registry::endpoint_count (void) +TAO_Acceptor_Registry::endpoint_count () { size_t count = 0; const TAO_AcceptorSetIterator end = this->end (); @@ -77,7 +77,7 @@ TAO_Acceptor_Registry::is_collocated (const TAO_MProfile &mprofile) // operation if the below is_collocated() call // also executes a loop. for (TAO_Endpoint *endp = pf->endpoint (); - endp != 0; + endp != nullptr; endp = endp->next ()) { if ((*i)->is_collocated (endp)) @@ -106,7 +106,7 @@ TAO_Acceptor_Registry::get_acceptor (CORBA::ULong tag) } } - return 0; + return nullptr; } int @@ -121,7 +121,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, // All TAO pluggable protocols are expected to have the ability // to create a default endpoint. - && this->open_default (orb_core, reactor, 0) == -1) + && this->open_default (orb_core, reactor, nullptr) == -1) { throw ::CORBA::INTERNAL ( CORBA::SystemException::_tao_minor_code ( @@ -135,7 +135,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, size_t acceptor_count = 0; TAO_EndpointSetIterator endpts (endpoint_set); - for (ACE_CString *ep = 0; + for (ACE_CString *ep = nullptr; endpts.next (ep) != 0; endpts.advance ()) { @@ -199,7 +199,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, ep->c_str () + ACE_OS::strlen (ep->c_str ()); for (const char *e = ACE_OS::strchr (ep->c_str (), ','); - e != 0 && e != ep_end; + e != nullptr && e != ep_end; e = ACE_OS::strchr (e, ',')) { ++acceptor_count; @@ -209,7 +209,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, // The array containing the TAO_Acceptors will never contain more // than the number of endpoints stored in TAO_ORB_Parameters. - if (this->acceptors_ == 0) + if (this->acceptors_ == nullptr) { ACE_NEW_THROW_EX (this->acceptors_, TAO_Acceptor *[acceptor_count], @@ -222,7 +222,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, TAO_EndpointSetIterator endpoints (endpoint_set); - for (ACE_CString *endpoint = 0; + for (ACE_CString *endpoint = nullptr; endpoints.next (endpoint) != 0; endpoints.advance ()) { @@ -482,7 +482,7 @@ int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core, // endpoints were specified by the user, meaning that the number of // acceptors will never be more than the number of loaded protocols // in the ORB core. - if (this->acceptors_ == 0) + if (this->acceptors_ == nullptr) { ACE_NEW_RETURN (this->acceptors_, TAO_Acceptor *[pfs->size ()], @@ -552,7 +552,7 @@ TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core, // Make an acceptor TAO_Acceptor *acceptor = (*factory)->factory ()->make_acceptor (); - if (acceptor == 0) + if (acceptor == nullptr) { if (TAO_debug_level > 0) { @@ -611,13 +611,13 @@ TAO_Acceptor_Registry::open_default_i (TAO_ORB_Core *orb_core, } int -TAO_Acceptor_Registry::close_all (void) +TAO_Acceptor_Registry::close_all () { const TAO_AcceptorSetIterator end = this->end (); for (TAO_AcceptorSetIterator i = this->begin (); i != end; ++i) { - if (*i != 0) + if (*i != nullptr) { (*i)->close (); delete *i; @@ -679,14 +679,14 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core, ACE_CString options_tmp; this->extract_endpoint_options (addrs, options_tmp, (*factory)->factory ()); - const char *options = 0; + const char *options = nullptr; if (options_tmp.length () > 0) { options = options_tmp.c_str (); } - char *last_addr = 0; + char *last_addr = nullptr; ACE_Auto_Basic_Array_Ptr<char> addr_str (addrs.rep ()); const char *astr = ACE_OS::strtok_r (addr_str.get (), ",", &last_addr); @@ -699,11 +699,11 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core, // possible for astr to be 0. This indicates that // the user is requesting the default endpoint for // the specified protocol. - ACE_CString address (astr == 0 ? "" : astr); + ACE_CString address (astr == nullptr ? "" : astr); TAO_Acceptor *acceptor = (*factory)->factory ()->make_acceptor (); - if (acceptor != 0) + if (acceptor != nullptr) { // Extract the desired endpoint/protocol version if one // exists. @@ -878,7 +878,7 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core, CORBA::COMPLETED_NO); } } - while (astr != 0 && (astr = ACE_OS::strtok_r (0, ",", &last_addr)) != 0); + while (astr != nullptr && (astr = ACE_OS::strtok_r (nullptr, ",", &last_addr)) != nullptr); return 0; } diff --git a/TAO/tao/Adapter.cpp b/TAO/tao/Adapter.cpp index b77750e0b27..bc5ff33898d 100644 --- a/TAO/tao/Adapter.cpp +++ b/TAO/tao/Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Adapter::~TAO_Adapter (void) +TAO_Adapter::~TAO_Adapter () { } diff --git a/TAO/tao/Adapter_Factory.cpp b/TAO/tao/Adapter_Factory.cpp index 20a5f497a1a..3485f9913da 100644 --- a/TAO/tao/Adapter_Factory.cpp +++ b/TAO/tao/Adapter_Factory.cpp @@ -4,7 +4,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Adapter_Factory::~TAO_Adapter_Factory (void) +TAO_Adapter_Factory::~TAO_Adapter_Factory () { } diff --git a/TAO/tao/Adapter_Registry.cpp b/TAO/tao/Adapter_Registry.cpp index e6c04ff658d..df2ab410265 100644 --- a/TAO/tao/Adapter_Registry.cpp +++ b/TAO/tao/Adapter_Registry.cpp @@ -15,13 +15,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Adapter_Registry::TAO_Adapter_Registry (TAO_ORB_Core *) : adapters_capacity_ (16), // @@ Make it configurable adapters_count_ (0), - adapters_ (0) + adapters_ (nullptr) { ACE_NEW (this->adapters_, TAO_Adapter*[this->adapters_capacity_]); } -TAO_Adapter_Registry::~TAO_Adapter_Registry (void) +TAO_Adapter_Registry::~TAO_Adapter_Registry () { for (size_t i = 0; i != this->adapters_count_; ++i) delete this->adapters_[i]; @@ -67,7 +67,7 @@ TAO_Adapter_Registry::insert (TAO_Adapter *adapter) if (this->adapters_capacity_ == this->adapters_count_) { this->adapters_capacity_ *= 2; - TAO_Adapter **tmp = 0; + TAO_Adapter **tmp = nullptr; ACE_NEW_THROW_EX (tmp, TAO_Adapter*[this->adapters_capacity_], CORBA::NO_MEMORY ()); @@ -126,7 +126,7 @@ TAO_Adapter_Registry::create_collocated_object (TAO_Stub *stub, { CORBA::Object_ptr x = this->adapters_[i]->create_collocated_object (stub, mprofile); - if (x != 0) + if (x != nullptr) { if (!stub->collocated_servant ()) { @@ -145,7 +145,7 @@ TAO_Adapter_Registry::create_collocated_object (TAO_Stub *stub, return x; } } - return 0; + return nullptr; } CORBA::Long @@ -174,7 +174,7 @@ TAO_Adapter_Registry::find_adapter (const char *name) const if (ACE_OS::strcmp ((*i)->name (), name) == 0) return *i; - return 0; + return nullptr; } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/AnyTypeCode_Adapter.cpp b/TAO/tao/AnyTypeCode_Adapter.cpp index 325f0fd6a1c..e06af880abb 100644 --- a/TAO/tao/AnyTypeCode_Adapter.cpp +++ b/TAO/tao/AnyTypeCode_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_AnyTypeCode_Adapter::~TAO_AnyTypeCode_Adapter (void) +TAO_AnyTypeCode_Adapter::~TAO_AnyTypeCode_Adapter () { } diff --git a/TAO/tao/Argument.cpp b/TAO/tao/Argument.cpp index 0125be2ffea..fab7b1d7514 100644 --- a/TAO/tao/Argument.cpp +++ b/TAO/tao/Argument.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::Argument::~Argument (void) +TAO::Argument::~Argument () { } @@ -22,7 +22,7 @@ TAO::Argument::demarshal (TAO_InputCDR &) TAO::Argument * TAO::Argument::clone () { - return 0; + return nullptr; } #if TAO_HAS_INTERCEPTORS == 1 @@ -33,25 +33,25 @@ TAO::Argument::interceptor_value (CORBA::Any *) const } CORBA::ParameterMode -TAO::InArgument::mode (void) const +TAO::InArgument::mode () const { return CORBA::PARAM_IN; } CORBA::ParameterMode -TAO::InoutArgument::mode (void) const +TAO::InoutArgument::mode () const { return CORBA::PARAM_INOUT; } CORBA::ParameterMode -TAO::OutArgument::mode (void) const +TAO::OutArgument::mode () const { return CORBA::PARAM_OUT; } CORBA::ParameterMode -TAO::RetArgument::mode (void) const +TAO::RetArgument::mode () const { return CORBA::PARAM_OUT; } @@ -59,12 +59,12 @@ TAO::RetArgument::mode (void) const #endif /* TAO_HAS_INTERCEPTORS */ TAO::Argument * -TAO::Void_Return_Argument::clone (void) +TAO::Void_Return_Argument::clone () { - TAO::Argument *clone_arg = 0; + TAO::Argument *clone_arg = nullptr; ACE_NEW_RETURN (clone_arg, Void_Return_Argument (), - 0); + nullptr); return clone_arg; } diff --git a/TAO/tao/Asynch_Queued_Message.cpp b/TAO/tao/Asynch_Queued_Message.cpp index f79242ceac2..e2952ff3569 100644 --- a/TAO/tao/Asynch_Queued_Message.cpp +++ b/TAO/tao/Asynch_Queued_Message.cpp @@ -24,7 +24,7 @@ TAO_Asynch_Queued_Message::TAO_Asynch_Queued_Message ( , offset_ (0) , abs_timeout_ (ACE_Time_Value::zero) { - if (timeout != 0)// && *timeout != ACE_Time_Value::zero) + if (timeout != nullptr)// && *timeout != ACE_Time_Value::zero) { this->abs_timeout_ = ACE_High_Res_Timer::gettimeofday_hr () + *timeout; } @@ -33,7 +33,7 @@ TAO_Asynch_Queued_Message::TAO_Asynch_Queued_Message ( size_t copy_offset = 0; for (const ACE_Message_Block *i = contents; - i != 0; + i != nullptr; i = i->cont ()) { ACE_OS::memcpy (this->buffer_ + copy_offset, @@ -57,20 +57,20 @@ TAO_Asynch_Queued_Message::TAO_Asynch_Queued_Message (char *buf, { } -TAO_Asynch_Queued_Message::~TAO_Asynch_Queued_Message (void) +TAO_Asynch_Queued_Message::~TAO_Asynch_Queued_Message () { // @@ Use a pool for these guys! delete [] this->buffer_; } size_t -TAO_Asynch_Queued_Message::message_length (void) const +TAO_Asynch_Queued_Message::message_length () const { return this->size_ - this->offset_; } int -TAO_Asynch_Queued_Message::all_data_sent (void) const +TAO_Asynch_Queued_Message::all_data_sent () const { return this->size_ == this->offset_; } @@ -112,7 +112,7 @@ TAO_Asynch_Queued_Message::bytes_transferred (size_t &byte_count) TAO_Queued_Message * TAO_Asynch_Queued_Message::clone (ACE_Allocator *alloc) { - char *buf = 0; + char *buf = nullptr; // @todo: Need to use a memory pool. But certain things need to // change a bit in this class for that. Till then. @@ -123,13 +123,13 @@ TAO_Asynch_Queued_Message::clone (ACE_Allocator *alloc) ACE_NEW_RETURN (buf, char[sz], - 0); + nullptr); ACE_OS::memcpy (buf, this->buffer_ + this->offset_, sz); - TAO_Asynch_Queued_Message *qm = 0; + TAO_Asynch_Queued_Message *qm = nullptr; if (alloc) { @@ -142,7 +142,7 @@ TAO_Asynch_Queued_Message::clone (ACE_Allocator *alloc) this->abs_timeout_, alloc, true), - 0); + nullptr); } else { @@ -160,16 +160,16 @@ TAO_Asynch_Queued_Message::clone (ACE_Allocator *alloc) this->orb_core_, sz, this->abs_timeout_, - 0, + nullptr, true), - 0); + nullptr); } return qm; } void -TAO_Asynch_Queued_Message::destroy (void) +TAO_Asynch_Queued_Message::destroy () { if (this->is_heap_created_) { diff --git a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp index a80ac9e9700..8fe4a8281e7 100644 --- a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp +++ b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp @@ -28,8 +28,8 @@ TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base ( TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR, orb_core) - , transport_ (0) - , lock_ (0) + , transport_ (nullptr) + , lock_ (nullptr) , is_reply_dispatched_ (false) { // @@ NOTE: Need a separate option for this.. @@ -38,10 +38,10 @@ TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base ( } // Destructor. -TAO_Asynch_Reply_Dispatcher_Base::~TAO_Asynch_Reply_Dispatcher_Base (void) +TAO_Asynch_Reply_Dispatcher_Base::~TAO_Asynch_Reply_Dispatcher_Base () { // Release the transport that we own - if (this->transport_ != 0) + if (this->transport_ != nullptr) this->transport_->remove_reference (); if (this->lock_) @@ -51,7 +51,7 @@ TAO_Asynch_Reply_Dispatcher_Base::~TAO_Asynch_Reply_Dispatcher_Base (void) void TAO_Asynch_Reply_Dispatcher_Base::transport (TAO_Transport *t) { - if (this->transport_ != 0) + if (this->transport_ != nullptr) this->transport_->remove_reference (); this->transport_ = t; @@ -60,7 +60,7 @@ TAO_Asynch_Reply_Dispatcher_Base::transport (TAO_Transport *t) } bool -TAO_Asynch_Reply_Dispatcher_Base::try_dispatch_reply (void) +TAO_Asynch_Reply_Dispatcher_Base::try_dispatch_reply () { if (this->is_reply_dispatched_) { diff --git a/TAO/tao/Base_Transport_Property.cpp b/TAO/tao/Base_Transport_Property.cpp index 4a4f834c157..17a83e1a618 100644 --- a/TAO/tao/Base_Transport_Property.cpp +++ b/TAO/tao/Base_Transport_Property.cpp @@ -7,21 +7,21 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Base_Transport_Property::~TAO_Base_Transport_Property (void) +TAO_Base_Transport_Property::~TAO_Base_Transport_Property () { } TAO_Transport_Descriptor_Interface * -TAO_Base_Transport_Property::duplicate (void) +TAO_Base_Transport_Property::duplicate () { // Get a copy of the underlying endpoint TAO_Endpoint *const endpt = this->endpoint_->duplicate (); - if (endpt == 0) - return 0; + if (endpt == nullptr) + return nullptr; // Construct a copy of our class - TAO_Base_Transport_Property *prop = 0; - ACE_NEW_RETURN (prop, TAO_Base_Transport_Property (endpt, true), 0); + TAO_Base_Transport_Property *prop = nullptr; + ACE_NEW_RETURN (prop, TAO_Base_Transport_Property (endpt, true), nullptr); return prop; } @@ -33,7 +33,7 @@ TAO_Base_Transport_Property::is_equivalent const TAO_Base_Transport_Property *other_desc = dynamic_cast<const TAO_Base_Transport_Property *> (rhs); - if (other_desc == 0) + if (other_desc == nullptr) return false; return this->endpoint_->is_equivalent (other_desc->endpoint_); @@ -41,7 +41,7 @@ TAO_Base_Transport_Property::is_equivalent u_long -TAO_Base_Transport_Property::hash (void) const +TAO_Base_Transport_Property::hash () const { return this->endpoint_->hash (); } diff --git a/TAO/tao/BiDir_Adapter.cpp b/TAO/tao/BiDir_Adapter.cpp index c5e01c278f8..1149f04dc66 100644 --- a/TAO/tao/BiDir_Adapter.cpp +++ b/TAO/tao/BiDir_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_BiDir_Adapter::~TAO_BiDir_Adapter (void) +TAO_BiDir_Adapter::~TAO_BiDir_Adapter () { } diff --git a/TAO/tao/Bind_Dispatcher_Guard.cpp b/TAO/tao/Bind_Dispatcher_Guard.cpp index 7922d29f21c..09a144d62f3 100644 --- a/TAO/tao/Bind_Dispatcher_Guard.cpp +++ b/TAO/tao/Bind_Dispatcher_Guard.cpp @@ -21,7 +21,7 @@ TAO_Bind_Dispatcher_Guard::TAO_Bind_Dispatcher_Guard (CORBA::ULong request_id, this->status_ = TAO_Bind_Dispatcher_Guard::NO_UNBIND; } -TAO_Bind_Dispatcher_Guard::~TAO_Bind_Dispatcher_Guard (void) +TAO_Bind_Dispatcher_Guard::~TAO_Bind_Dispatcher_Guard () { // We try unbinding. If it works it works, else cant do much about // it.. diff --git a/TAO/tao/Blocked_Connect_Strategy.cpp b/TAO/tao/Blocked_Connect_Strategy.cpp index b55e0ff00c2..0c731feb8e4 100644 --- a/TAO/tao/Blocked_Connect_Strategy.cpp +++ b/TAO/tao/Blocked_Connect_Strategy.cpp @@ -15,7 +15,7 @@ void TAO_Blocked_Connect_Strategy::synch_options (ACE_Time_Value *timeout, ACE_Synch_Options &options) { - if (timeout != 0) + if (timeout != nullptr) { // Blocking with a timeout options.set (ACE_Synch_Options::USE_TIMEOUT, *timeout); diff --git a/TAO/tao/CDR.cpp b/TAO/tao/CDR.cpp index 53c4318b9c1..79835eacf2c 100644 --- a/TAO/tao/CDR.cpp +++ b/TAO/tao/CDR.cpp @@ -64,12 +64,12 @@ TAO_OutputCDR::TAO_OutputCDR (size_t size, memcpy_tradeoff, major_version, minor_version) - , fragmentation_strategy_ (0) + , fragmentation_strategy_ (nullptr) , more_fragments_ (false) , request_id_ (0) - , stub_ (0) + , stub_ (nullptr) , message_semantics_ (TAO_Message_Semantics::TAO_TWOWAY_REQUEST) - , timeout_ (0) + , timeout_ (nullptr) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR1_ENTER); @@ -100,12 +100,12 @@ TAO_OutputCDR::TAO_OutputCDR (char *data, memcpy_tradeoff, major_version, minor_version) - , fragmentation_strategy_ (0) + , fragmentation_strategy_ (nullptr) , more_fragments_ (false) , request_id_ (0) - , stub_ (0) + , stub_ (nullptr) , message_semantics_ (TAO_Message_Semantics::TAO_TWOWAY_REQUEST) - , timeout_ (0) + , timeout_ (nullptr) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR2_ENTER); } @@ -132,9 +132,9 @@ TAO_OutputCDR::TAO_OutputCDR (char *data, , fragmentation_strategy_ (fs) , more_fragments_ (false) , request_id_ (0) - , stub_ (0) + , stub_ (nullptr) , message_semantics_ (TAO_Message_Semantics::TAO_TWOWAY_REQUEST) - , timeout_ (0) + , timeout_ (nullptr) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR3_ENTER); } @@ -149,12 +149,12 @@ TAO_OutputCDR::TAO_OutputCDR (ACE_Message_Block *data, memcpy_tradeoff, major_version, minor_version) - , fragmentation_strategy_ (0) + , fragmentation_strategy_ (nullptr) , more_fragments_ (false) , request_id_ (0) - , stub_ (0) + , stub_ (nullptr) , message_semantics_ (TAO_Message_Semantics::TAO_TWOWAY_REQUEST) - , timeout_ (0) + , timeout_ (nullptr) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR4_ENTER); } @@ -175,9 +175,9 @@ TAO_OutputCDR::TAO_OutputCDR (ACE_Data_Block *data_block, , fragmentation_strategy_ (fs) , more_fragments_ (false) , request_id_ (0) - , stub_ (0) + , stub_ (nullptr) , message_semantics_ (TAO_Message_Semantics::TAO_TWOWAY_REQUEST) - , timeout_ (0) + , timeout_ (nullptr) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR5_ENTER); } @@ -291,15 +291,15 @@ TAO_InputCDR::TAO_InputCDR (const TAO_OutputCDR& rhs, : ACE_InputCDR (rhs, buffer_allocator ? buffer_allocator - : (orb_core ? orb_core->output_cdr_buffer_allocator () : 0), + : (orb_core ? orb_core->output_cdr_buffer_allocator () : nullptr), data_block_allocator ? data_block_allocator : (orb_core ? orb_core->output_cdr_dblock_allocator () : - 0), + nullptr), message_block_allocator ? message_block_allocator : (orb_core ? - orb_core->output_cdr_msgblock_allocator () : 0)), + orb_core->output_cdr_msgblock_allocator () : nullptr)), orb_core_ (orb_core) { } diff --git a/TAO/tao/CORBALOC_Parser.cpp b/TAO/tao/CORBALOC_Parser.cpp index fd98b445944..dff01bf48c0 100644 --- a/TAO/tao/CORBALOC_Parser.cpp +++ b/TAO/tao/CORBALOC_Parser.cpp @@ -31,7 +31,7 @@ static const char iiop_token_len = sizeof iiop_token - 1; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_CORBALOC_Parser::~TAO_CORBALOC_Parser (void) +TAO_CORBALOC_Parser::~TAO_CORBALOC_Parser () { } @@ -49,7 +49,7 @@ TAO_CORBALOC_Parser::make_stub_from_mprofile (CORBA::ORB_ptr orb, TAO_MProfile &mprofile) { // Create a TAO_Stub. - TAO_Stub *data = orb->orb_core ()->create_stub ((const char *) 0, mprofile); + TAO_Stub *data = orb->orb_core ()->create_stub ((const char *) nullptr, mprofile); TAO_Stub_Auto_Ptr safe_data (data); @@ -137,10 +137,10 @@ TAO_CORBALOC_Parser::parse_string (const char * ior, CORBA::ORB_ptr orb) size_t ndx = endpoints.size(); endpoints.size(ndx+1); bool uiop_compatible = false; - TAO_ConnectorSetIterator conn_iter = 0; + TAO_ConnectorSetIterator conn_iter = nullptr; for (conn_iter = conn_reg->begin(); conn_iter != conn_reg->end() && - endpoints[ndx].profile_ == 0; + endpoints[ndx].profile_ == nullptr; conn_iter ++) { endpoints[ndx].profile_ = @@ -156,7 +156,7 @@ TAO_CORBALOC_Parser::parse_string (const char * ior, CORBA::ORB_ptr orb) } } - if (endpoints[ndx].profile_ == 0) + if (endpoints[ndx].profile_ == nullptr) { if (TAO_debug_level) TAOLIB_ERROR ((LM_ERROR, @@ -212,7 +212,7 @@ TAO_CORBALOC_Parser::parse_string (const char * ior, CORBA::ORB_ptr orb) endpoints[i].profile_->parse_string (str); int const share = orb->orb_core()->orb_params()->shared_profile(); if (mprofile.give_profile(endpoints[i].profile_, share) != -1) - endpoints[i].profile_ = 0; + endpoints[i].profile_ = nullptr; else { // Although this ought never happen, we want to make some @@ -252,7 +252,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, const char *addr_tail = ior + prot_addr_len; // skip past version, if any separator = ACE_OS::strchr (addr_base,'@'); - if (separator != 0 && separator < addr_tail) + if (separator != nullptr && separator < addr_tail) { canonical_endpoint.set (addr_base,(separator - addr_base)+1,1); addr_base = separator + 1; @@ -293,7 +293,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, } #endif /* ACE_HAS_IPV6 */ - if (separator != 0 && separator < addr_tail) + if (separator != nullptr && separator < addr_tail) { // we have a port number raw_host.set (addr_base, (separator - addr_base), 1); diff --git a/TAO/tao/CORBANAME_Parser.cpp b/TAO/tao/CORBANAME_Parser.cpp index 507c7bfd5cf..2bd5edee9be 100644 --- a/TAO/tao/CORBANAME_Parser.cpp +++ b/TAO/tao/CORBANAME_Parser.cpp @@ -18,7 +18,7 @@ static const char corbaname_prefix[] = "corbaname:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_CORBANAME_Parser::~TAO_CORBANAME_Parser (void) +TAO_CORBANAME_Parser::~TAO_CORBANAME_Parser () { } @@ -51,7 +51,7 @@ parse_string_dynamic_request_helper (CORBA::Object_ptr naming_context, 11, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY); - tao_call.invoke (0, 0); + tao_call.invoke (nullptr, 0); return _tao_retval.retn (); } @@ -73,7 +73,7 @@ TAO_CORBANAME_Parser::parse_string (const char *ior, CORBA::ORB_ptr orb) // string ACE_CString::size_type pos_seperator = 0; - ACE_CString corbaname_str (corbaname, 0, 1); + ACE_CString corbaname_str (corbaname, nullptr, 1); pos_seperator = corbaname_str.find ("#", 0); @@ -90,7 +90,7 @@ TAO_CORBANAME_Parser::parse_string (const char *ior, CORBA::ORB_ptr orb) // CORBALOC assumes "NameService" for the object key if none // is provided, so just pass everything between "corbaname:" // and "#" as the address - ACE_CString corbaloc_addr ("corbaloc:", 0, 1); + ACE_CString corbaloc_addr ("corbaloc:", nullptr, 1); corbaloc_addr += corbaname_str.substring (0, pos_seperator); // Obtain a reference to the naming context diff --git a/TAO/tao/Cleanup_Func_Registry.cpp b/TAO/tao/Cleanup_Func_Registry.cpp index 5597de7531d..93ef5cb0c8a 100644 --- a/TAO/tao/Cleanup_Func_Registry.cpp +++ b/TAO/tao/Cleanup_Func_Registry.cpp @@ -39,8 +39,8 @@ TAO_Cleanup_Func_Registry::cleanup (ACE_Array_Base <void *> &ts_objects) for (size_t i = 0; i < len; ++i) { ACE_CLEANUP_FUNC destructor = this->cleanup_funcs_[i]; - if (destructor != 0) - destructor (ts_objects[i], 0); + if (destructor != nullptr) + destructor (ts_objects[i], nullptr); } } diff --git a/TAO/tao/ClientRequestInterceptor_Adapter.cpp b/TAO/tao/ClientRequestInterceptor_Adapter.cpp index c5e425c4cd8..40684f17384 100644 --- a/TAO/tao/ClientRequestInterceptor_Adapter.cpp +++ b/TAO/tao/ClientRequestInterceptor_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::ClientRequestInterceptor_Adapter::~ClientRequestInterceptor_Adapter (void) +TAO::ClientRequestInterceptor_Adapter::~ClientRequestInterceptor_Adapter () { } diff --git a/TAO/tao/ClientRequestInterceptor_Adapter_Factory.cpp b/TAO/tao/ClientRequestInterceptor_Adapter_Factory.cpp index 7f0347296a5..a7b9989df41 100644 --- a/TAO/tao/ClientRequestInterceptor_Adapter_Factory.cpp +++ b/TAO/tao/ClientRequestInterceptor_Adapter_Factory.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_ClientRequestInterceptor_Adapter_Factory::~TAO_ClientRequestInterceptor_Adapter_Factory (void) +TAO_ClientRequestInterceptor_Adapter_Factory::~TAO_ClientRequestInterceptor_Adapter_Factory () { } diff --git a/TAO/tao/Client_Strategy_Factory.cpp b/TAO/tao/Client_Strategy_Factory.cpp index 9058c65b2d2..b029deb4e7b 100644 --- a/TAO/tao/Client_Strategy_Factory.cpp +++ b/TAO/tao/Client_Strategy_Factory.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Client_Strategy_Factory::~TAO_Client_Strategy_Factory (void) +TAO_Client_Strategy_Factory::~TAO_Client_Strategy_Factory () { } diff --git a/TAO/tao/Codeset_Manager.cpp b/TAO/tao/Codeset_Manager.cpp index 1fa161ab63a..318904620d3 100644 --- a/TAO/tao/Codeset_Manager.cpp +++ b/TAO/tao/Codeset_Manager.cpp @@ -4,14 +4,14 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Codeset_Manager::~TAO_Codeset_Manager (void) +TAO_Codeset_Manager::~TAO_Codeset_Manager () { } // Add the destructor for the codeset_descriptor_base here, because // it is only ever used in conjunction with the codeset manager. -TAO_Codeset_Descriptor_Base::~TAO_Codeset_Descriptor_Base (void) +TAO_Codeset_Descriptor_Base::~TAO_Codeset_Descriptor_Base () { } diff --git a/TAO/tao/Codeset_Manager_Factory_Base.cpp b/TAO/tao/Codeset_Manager_Factory_Base.cpp index a77dfd61797..94aef786b28 100644 --- a/TAO/tao/Codeset_Manager_Factory_Base.cpp +++ b/TAO/tao/Codeset_Manager_Factory_Base.cpp @@ -5,25 +5,25 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Codeset_Manager_Factory_Base::~TAO_Codeset_Manager_Factory_Base (void) +TAO_Codeset_Manager_Factory_Base::~TAO_Codeset_Manager_Factory_Base () { } bool -TAO_Codeset_Manager_Factory_Base::is_default (void) const +TAO_Codeset_Manager_Factory_Base::is_default () const { return true; } TAO_Codeset_Manager * -TAO_Codeset_Manager_Factory_Base::create (void) +TAO_Codeset_Manager_Factory_Base::create () { - return 0; + return nullptr; } int -TAO_Codeset_Manager_Factory_Base::initialize (void) +TAO_Codeset_Manager_Factory_Base::initialize () { return ACE_Service_Config::process_directive (ace_svc_desc_TAO_Codeset_Manager_Factory_Base); diff --git a/TAO/tao/Codeset_Translator_Base.cpp b/TAO/tao/Codeset_Translator_Base.cpp index d269d80a61c..d5b69e09f35 100644 --- a/TAO/tao/Codeset_Translator_Base.cpp +++ b/TAO/tao/Codeset_Translator_Base.cpp @@ -16,7 +16,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Codeset_Translator_Base::~TAO_Codeset_Translator_Base (void) +TAO_Codeset_Translator_Base::~TAO_Codeset_Translator_Base () { } diff --git a/TAO/tao/Collocation_Resolver.cpp b/TAO/tao/Collocation_Resolver.cpp index 2ddca927e09..7492024fb7a 100644 --- a/TAO/tao/Collocation_Resolver.cpp +++ b/TAO/tao/Collocation_Resolver.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Collocation_Resolver::~TAO_Collocation_Resolver (void) +TAO_Collocation_Resolver::~TAO_Collocation_Resolver () { } diff --git a/TAO/tao/Connect_Strategy.cpp b/TAO/tao/Connect_Strategy.cpp index 1410e5f1fcd..5f5496f9756 100644 --- a/TAO/tao/Connect_Strategy.cpp +++ b/TAO/tao/Connect_Strategy.cpp @@ -12,7 +12,7 @@ TAO_Connect_Strategy::TAO_Connect_Strategy (TAO_ORB_Core *orb_core) } -TAO_Connect_Strategy::~TAO_Connect_Strategy (void) +TAO_Connect_Strategy::~TAO_Connect_Strategy () { } @@ -20,7 +20,7 @@ int TAO_Connect_Strategy::wait (TAO_Connection_Handler *ch, ACE_Time_Value *max_wait_time) { - if (ch == 0) + if (ch == nullptr) return -1; return this->wait_i (ch, ch->transport (), max_wait_time); @@ -32,7 +32,7 @@ TAO_Connect_Strategy::wait (TAO_Transport *t, ACE_Time_Value *max_wait_time) // Basically the connection was EINPROGRESS, but before we could // wait for it some other thread detected a failure and cleaned up // the connection handler. - if (t == 0) + if (t == nullptr) return -1; return this->wait_i (t->connection_handler (), t, max_wait_time); diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index ac9a0a4f01c..6c0520aed30 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -19,7 +19,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core) : orb_core_ (orb_core), - transport_ (0), + transport_ (nullptr), connection_pending_ (false), is_closed_ (false) { @@ -29,12 +29,12 @@ TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core) this->orb_core_->leader_follower ()); } -TAO_Connection_Handler::~TAO_Connection_Handler (void) +TAO_Connection_Handler::~TAO_Connection_Handler () { } int -TAO_Connection_Handler::shared_open (void) +TAO_Connection_Handler::shared_open () { // This reference counting is related to asynch connections. It // should probably be managed by the ACE_Strategy_Connector, since @@ -101,7 +101,7 @@ TAO_Connection_Handler::set_socket_option (ACE_SOCK &sock, } int -TAO_Connection_Handler::svc_i (void) +TAO_Connection_Handler::svc_i () { int result = 0; @@ -113,7 +113,7 @@ TAO_Connection_Handler::svc_i (void) // in a reactive handler, except that this can simply block waiting // for input. - ACE_Time_Value *max_wait_time = 0; + ACE_Time_Value *max_wait_time = nullptr; ACE_Time_Value timeout; ACE_Time_Value current_timeout; @@ -347,13 +347,13 @@ TAO_Connection_Handler::close_connection_eh (ACE_Event_Handler *eh) { // If the ORB is nil, get the reactor from orb_core which gets it // from LF. - if (eh_reactor == 0) + if (eh_reactor == nullptr) eh_reactor = this->transport()->orb_core()->reactor (); } // The Reactor must not be null, otherwise something else is // horribly broken. - ACE_ASSERT (eh_reactor != 0); + ACE_ASSERT (eh_reactor != nullptr); if (TAO_debug_level) { @@ -428,7 +428,7 @@ TAO_Connection_Handler::set_dscp_codepoint (CORBA::Long) } int -TAO_Connection_Handler::release_os_resources (void) +TAO_Connection_Handler::release_os_resources () { return 0; } diff --git a/TAO/tao/Connection_Purging_Strategy.cpp b/TAO/tao/Connection_Purging_Strategy.cpp index b6eface5905..ecdc639fbe4 100644 --- a/TAO/tao/Connection_Purging_Strategy.cpp +++ b/TAO/tao/Connection_Purging_Strategy.cpp @@ -6,12 +6,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Connection_Purging_Strategy::~TAO_Connection_Purging_Strategy (void) +TAO_Connection_Purging_Strategy::~TAO_Connection_Purging_Strategy () { } int -TAO_Connection_Purging_Strategy::cache_maximum (void) const +TAO_Connection_Purging_Strategy::cache_maximum () const { return cache_maximum_; } diff --git a/TAO/tao/Connector_Registry.cpp b/TAO/tao/Connector_Registry.cpp index 378e780292d..d093150da0f 100644 --- a/TAO/tao/Connector_Registry.cpp +++ b/TAO/tao/Connector_Registry.cpp @@ -15,13 +15,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Connector_Registry::TAO_Connector_Registry (void) - : connectors_ (0), +TAO_Connector_Registry::TAO_Connector_Registry () + : connectors_ (nullptr), size_ (0) { } -TAO_Connector_Registry::~TAO_Connector_Registry (void) +TAO_Connector_Registry::~TAO_Connector_Registry () { this->close_all (); @@ -41,7 +41,7 @@ TAO_Connector_Registry::get_connector (CORBA::ULong tag) const return *connector; } - return 0; + return nullptr; } int @@ -52,7 +52,7 @@ TAO_Connector_Registry::open (TAO_ORB_Core *orb_core) // The array containing the TAO_Connectors will never contain more // than the number of loaded protocols in the ORB core. - if (this->connectors_ == 0) + if (this->connectors_ == nullptr) ACE_NEW_RETURN (this->connectors_, TAO_Connector *[pfs->size ()], -1); @@ -92,7 +92,7 @@ TAO_Connector_Registry::open (TAO_ORB_Core *orb_core) } int -TAO_Connector_Registry::close_all (void) +TAO_Connector_Registry::close_all () { const TAO_ConnectorSetIterator end = this->end (); @@ -100,7 +100,7 @@ TAO_Connector_Registry::close_all (void) i != end; ++i) { - if (*i == 0) + if (*i == nullptr) continue; (*i)->close (); @@ -170,13 +170,13 @@ TAO_Connector_Registry::create_profile (TAO_InputCDR &cdr) TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - TAO_Connector_Registry::") ACE_TEXT ("create_profile: Unable to extract tag from CDR stream\n"))); - return 0; + return nullptr; } TAO_Connector *connector = this->get_connector (tag); - if (connector == 0) + if (connector == nullptr) { if (TAO_debug_level > 0) { @@ -187,7 +187,7 @@ TAO_Connector_Registry::create_profile (TAO_InputCDR &cdr) } TAO_ORB_Core *orb_core = cdr.orb_core (); - if (orb_core == 0) + if (orb_core == nullptr) { orb_core = TAO_ORB_Core_instance (); if (TAO_debug_level > 0) @@ -200,18 +200,18 @@ TAO_Connector_Registry::create_profile (TAO_InputCDR &cdr) } } - TAO_Profile *pfile = 0; + TAO_Profile *pfile = nullptr; ACE_NEW_RETURN (pfile, TAO_Unknown_Profile (tag, orb_core), - 0); + nullptr); if (pfile->decode (cdr) == -1) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - TAO_Connector_Registry::") ACE_TEXT ("create_profile: Unable to decode unknown profile from CDR stream\n"))); pfile->_decr_refcnt (); - pfile = 0; + pfile = nullptr; } return pfile; @@ -229,7 +229,7 @@ TAO_Connector_Registry::create_profile (TAO_InputCDR &cdr) TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - TAO_Connector_Registry::") ACE_TEXT ("create_profile: Unable to extract encapsulated length from CDR stream\n"))); - return 0; + return nullptr; } // Create the decoding stream from the encapsulation in the buffer, @@ -241,7 +241,7 @@ TAO_Connector_Registry::create_profile (TAO_InputCDR &cdr) TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - TAO_Connector_Registry::") ACE_TEXT ("create_profile: Unable to skip encapsulated stream from CDR stream\n"))); - return 0; + return nullptr; } TAO_Profile* profile = connector->create_profile (str); diff --git a/TAO/tao/DLL_Parser.cpp b/TAO/tao/DLL_Parser.cpp index 7666e20d18e..2575c276fcb 100644 --- a/TAO/tao/DLL_Parser.cpp +++ b/TAO/tao/DLL_Parser.cpp @@ -16,7 +16,7 @@ static const char dll_prefix[] = "DLL:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_DLL_Parser::~TAO_DLL_Parser (void) +TAO_DLL_Parser::~TAO_DLL_Parser () { } @@ -44,7 +44,7 @@ TAO_DLL_Parser::parse_string (const char *ior, ACE_Dynamic_Service<TAO_Object_Loader>::instance (oc->configuration(), name); - if (loader == 0) + if (loader == nullptr) { throw CORBA::INV_OBJREF @@ -54,7 +54,7 @@ TAO_DLL_Parser::parse_string (const char *ior, CORBA::COMPLETED_NO); } - return loader->create_object (orb, 0, 0); + return loader->create_object (orb, 0, nullptr); } diff --git a/TAO/tao/Default_Endpoint_Selector_Factory.cpp b/TAO/tao/Default_Endpoint_Selector_Factory.cpp index a0f5c95d070..0831fb9a654 100644 --- a/TAO/tao/Default_Endpoint_Selector_Factory.cpp +++ b/TAO/tao/Default_Endpoint_Selector_Factory.cpp @@ -6,19 +6,19 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Default_Endpoint_Selector_Factory::TAO_Default_Endpoint_Selector_Factory ( - void) + ) : default_endpoint_selector_ (new TAO_Default_Endpoint_Selector) { } -TAO_Default_Endpoint_Selector_Factory::~TAO_Default_Endpoint_Selector_Factory (void) +TAO_Default_Endpoint_Selector_Factory::~TAO_Default_Endpoint_Selector_Factory () { delete this->default_endpoint_selector_; } TAO_Invocation_Endpoint_Selector * -TAO_Default_Endpoint_Selector_Factory::get_selector (void) +TAO_Default_Endpoint_Selector_Factory::get_selector () { // Trivial endpoint selector. Just return the default selector. return this->default_endpoint_selector_; diff --git a/TAO/tao/Default_Stub_Factory.cpp b/TAO/tao/Default_Stub_Factory.cpp index ee2fa4090c8..ed4cd6f6d3c 100644 --- a/TAO/tao/Default_Stub_Factory.cpp +++ b/TAO/tao/Default_Stub_Factory.cpp @@ -8,7 +8,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Default_Stub_Factory::~TAO_Default_Stub_Factory (void) +TAO_Default_Stub_Factory::~TAO_Default_Stub_Factory () { } @@ -17,7 +17,7 @@ TAO_Default_Stub_Factory::create_stub (const char *repository_id, const TAO_MProfile &profiles, TAO_ORB_Core *orb_core) { - TAO_Stub *retval = 0; + TAO_Stub *retval = nullptr; ACE_NEW_THROW_EX (retval, TAO_Stub (repository_id, profiles, orb_core), diff --git a/TAO/tao/Default_Thread_Lane_Resources_Manager.cpp b/TAO/tao/Default_Thread_Lane_Resources_Manager.cpp index 2715e7a9a63..dd5dced5afc 100644 --- a/TAO/tao/Default_Thread_Lane_Resources_Manager.cpp +++ b/TAO/tao/Default_Thread_Lane_Resources_Manager.cpp @@ -13,14 +13,14 @@ TAO_Default_Thread_Lane_Resources_Manager::TAO_Default_Thread_Lane_Resources_Man { } -TAO_Default_Thread_Lane_Resources_Manager::~TAO_Default_Thread_Lane_Resources_Manager (void) +TAO_Default_Thread_Lane_Resources_Manager::~TAO_Default_Thread_Lane_Resources_Manager () { // Delete the default resources. delete this->lane_resources_; } int -TAO_Default_Thread_Lane_Resources_Manager::open_default_resources (void) +TAO_Default_Thread_Lane_Resources_Manager::open_default_resources () { TAO_ORB_Parameters * const params = this->orb_core_->orb_params (); @@ -38,32 +38,32 @@ TAO_Default_Thread_Lane_Resources_Manager::open_default_resources (void) } void -TAO_Default_Thread_Lane_Resources_Manager::finalize (void) +TAO_Default_Thread_Lane_Resources_Manager::finalize () { // Finalize default resources. this->lane_resources_->finalize (); } TAO_Thread_Lane_Resources & -TAO_Default_Thread_Lane_Resources_Manager::lane_resources (void) +TAO_Default_Thread_Lane_Resources_Manager::lane_resources () { return *this->lane_resources_; } TAO_Thread_Lane_Resources & -TAO_Default_Thread_Lane_Resources_Manager::default_lane_resources (void) +TAO_Default_Thread_Lane_Resources_Manager::default_lane_resources () { return this->lane_resources (); } void -TAO_Default_Thread_Lane_Resources_Manager::shutdown_reactor (void) +TAO_Default_Thread_Lane_Resources_Manager::shutdown_reactor () { this->lane_resources_->shutdown_reactor (); } void -TAO_Default_Thread_Lane_Resources_Manager::close_all_transports (void) +TAO_Default_Thread_Lane_Resources_Manager::close_all_transports () { this->lane_resources_->close_all_transports (); } @@ -77,19 +77,19 @@ TAO_Default_Thread_Lane_Resources_Manager::is_collocated (const TAO_MProfile &mp // ------------------------------------------------------- TAO_Default_Thread_Lane_Resources_Manager_Factory:: -~TAO_Default_Thread_Lane_Resources_Manager_Factory (void) +~TAO_Default_Thread_Lane_Resources_Manager_Factory () { } TAO_Thread_Lane_Resources_Manager * TAO_Default_Thread_Lane_Resources_Manager_Factory::create_thread_lane_resources_manager (TAO_ORB_Core &core) { - TAO_Thread_Lane_Resources_Manager *manager = 0; + TAO_Thread_Lane_Resources_Manager *manager = nullptr; /// Create the Default Thread Lane Resources Manager. ACE_NEW_RETURN (manager, TAO_Default_Thread_Lane_Resources_Manager (core), - 0); + nullptr); return manager; } diff --git a/TAO/tao/Dynamic_Adapter.cpp b/TAO/tao/Dynamic_Adapter.cpp index 76a6e2bb58d..3c0641d1acc 100644 --- a/TAO/tao/Dynamic_Adapter.cpp +++ b/TAO/tao/Dynamic_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Dynamic_Adapter::~TAO_Dynamic_Adapter (void) +TAO_Dynamic_Adapter::~TAO_Dynamic_Adapter () { } diff --git a/TAO/tao/Endpoint.cpp b/TAO/tao/Endpoint.cpp index f6bd16c9dd0..2fc670189d8 100644 --- a/TAO/tao/Endpoint.cpp +++ b/TAO/tao/Endpoint.cpp @@ -7,14 +7,14 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Endpoint::~TAO_Endpoint (void) +TAO_Endpoint::~TAO_Endpoint () { } TAO_Endpoint * TAO_Endpoint::next_filtered (TAO_ORB_Core *, TAO_Endpoint *root) { - if (root == 0) + if (root == nullptr) return this; return this->next(); } diff --git a/TAO/tao/Endpoint_Selector_Factory.cpp b/TAO/tao/Endpoint_Selector_Factory.cpp index 7078166b809..aaa972099ba 100644 --- a/TAO/tao/Endpoint_Selector_Factory.cpp +++ b/TAO/tao/Endpoint_Selector_Factory.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Endpoint_Selector_Factory::~TAO_Endpoint_Selector_Factory (void) +TAO_Endpoint_Selector_Factory::~TAO_Endpoint_Selector_Factory () { } diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp index 5f4cb9a9d53..779bea6f483 100644 --- a/TAO/tao/Environment.cpp +++ b/TAO/tao/Environment.cpp @@ -11,22 +11,22 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -CORBA::Environment::Environment (void) - : exception_ (0) - , previous_ (0) +CORBA::Environment::Environment () + : exception_ (nullptr) + , previous_ (nullptr) { } CORBA::Environment::Environment (const CORBA::Environment& rhs) - : exception_ (0) - , previous_ (0) + : exception_ (nullptr) + , previous_ (nullptr) { if (rhs.exception_) this->exception_ = rhs.exception_->_tao_duplicate (); } CORBA::Environment::Environment (TAO_ORB_Core* orb_core) - : exception_ (0) + : exception_ (nullptr) , previous_ (orb_core->default_environment ()) { orb_core->default_environment (this); @@ -49,14 +49,14 @@ CORBA::Environment::operator= (const CORBA::Environment& rhs) return *this; } -CORBA::Environment::~Environment (void) +CORBA::Environment::~Environment () { this->clear (); // If previous is 0 then this is the first Environment, allocated // with the ORB, it shouldn't try to pop because the ORB is being // destroyed also. - if (this->previous_ != 0) + if (this->previous_ != nullptr) TAO_ORB_Core_instance ()->default_environment (this->previous_); } @@ -84,15 +84,15 @@ CORBA::Environment::exception (CORBA::Exception *ex) this->exception_ = ex; - if (this->exception_ != 0) + if (this->exception_ != nullptr) this->exception_->_raise (); } void -CORBA::Environment::clear (void) +CORBA::Environment::clear () { delete this->exception_; - this->exception_ = 0; + this->exception_ = nullptr; } CORBA::Environment& @@ -118,7 +118,7 @@ CORBA::Environment::default_environment () // Convenience -- say if the exception is a system exception or not. int -CORBA::Environment::exception_type (void) const +CORBA::Environment::exception_type () const { // @@ Carlos, is this stuff that's properly "transformed" for EBCDIC // platforms?! @@ -156,10 +156,10 @@ CORBA::Environment::exception_type (void) const } const char* -CORBA::Environment::exception_id (void) const +CORBA::Environment::exception_id () const { - if (this->exception_ == 0) - return 0; + if (this->exception_ == nullptr) + return nullptr; return this->exception_->_rep_id (); } @@ -182,7 +182,7 @@ CORBA::Environment::print_exception (const char *info, CORBA::SystemException *x2 = CORBA::SystemException::_downcast (this->exception_); - if (x2 != 0) + if (x2 != nullptr) x2->_tao_print_system_exception (); else // @@ we can use the exception's typecode to dump all the data diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp index b6de9c41fce..a0234612fc2 100644 --- a/TAO/tao/Exception.cpp +++ b/TAO/tao/Exception.cpp @@ -45,13 +45,13 @@ 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 (void) +CORBA::Exception::Exception () : id_ (), name_ () { } -CORBA::Exception::~Exception (void) +CORBA::Exception::~Exception () { } @@ -68,13 +68,13 @@ CORBA::Exception::operator= (const CORBA::Exception &src) } const char * -CORBA::Exception::_rep_id (void) const +CORBA::Exception::_rep_id () const { return this->id_.in (); } const char * -CORBA::Exception::_name (void) const +CORBA::Exception::_name () const { return this->name_.in (); } diff --git a/TAO/tao/Exclusive_TMS.cpp b/TAO/tao/Exclusive_TMS.cpp index 1b414fa7c6f..f7c3e9c936f 100644 --- a/TAO/tao/Exclusive_TMS.cpp +++ b/TAO/tao/Exclusive_TMS.cpp @@ -9,11 +9,11 @@ TAO_Exclusive_TMS::TAO_Exclusive_TMS (TAO_Transport *transport) : TAO_Transport_Mux_Strategy (transport), request_id_generator_ (0), request_id_ (0), - rd_ (0) + rd_ (nullptr) { } -TAO_Exclusive_TMS::~TAO_Exclusive_TMS (void) +TAO_Exclusive_TMS::~TAO_Exclusive_TMS () { } @@ -21,7 +21,7 @@ TAO_Exclusive_TMS::~TAO_Exclusive_TMS (void) // invocation. We can actually return a predecided ULong, since we // allow only one invocation over this connection at a time. CORBA::ULong -TAO_Exclusive_TMS::request_id (void) +TAO_Exclusive_TMS::request_id () { ++this->request_id_generator_; @@ -58,9 +58,9 @@ TAO_Exclusive_TMS::bind_dispatcher (CORBA::ULong request_id, } bool -TAO_Exclusive_TMS::has_request (void) +TAO_Exclusive_TMS::has_request () { - return this->rd_ != 0; + return this->rd_ != nullptr; } int @@ -125,17 +125,17 @@ TAO_Exclusive_TMS::reply_timed_out (CORBA::ULong request_id) } bool -TAO_Exclusive_TMS::idle_after_send (void) +TAO_Exclusive_TMS::idle_after_send () { // if there is no reply dispatcher (possible in case of AMI requests) // release the transport now - if (this->rd_ != 0) + if (this->rd_ != nullptr) { return false; } else { - if (this->transport_ != 0) + if (this->transport_ != nullptr) { // let WS know we're finished this->transport_->wait_strategy ()->finished_request (); @@ -147,12 +147,12 @@ TAO_Exclusive_TMS::idle_after_send (void) } bool -TAO_Exclusive_TMS::idle_after_reply (void) +TAO_Exclusive_TMS::idle_after_reply () { // Irrespective of whether we are successful or not we need to // return true. If *this* class is not successful in idling the // transport no one can. - if (this->transport_ != 0) + if (this->transport_ != nullptr) { // let WS know we're finished this->transport_->wait_strategy ()->finished_request (); @@ -164,9 +164,9 @@ TAO_Exclusive_TMS::idle_after_reply (void) } void -TAO_Exclusive_TMS::connection_closed (void) +TAO_Exclusive_TMS::connection_closed () { - if (this->rd_ != 0) + if (this->rd_ != nullptr) this->rd_->connection_closed (); } diff --git a/TAO/tao/FILE_Parser.cpp b/TAO/tao/FILE_Parser.cpp index 0c9398e27c9..ea0224d4f79 100644 --- a/TAO/tao/FILE_Parser.cpp +++ b/TAO/tao/FILE_Parser.cpp @@ -15,7 +15,7 @@ static const char file_prefix[] = "file:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_FILE_Parser::~TAO_FILE_Parser (void) +TAO_FILE_Parser::~TAO_FILE_Parser () { } @@ -39,14 +39,14 @@ TAO_FILE_Parser::parse_string (const char *ior, CORBA::ORB_ptr orb) FILE* file = ACE_OS::fopen (ACE_TEXT_CHAR_TO_TCHAR (filename), ACE_TEXT("r")); - if (file == 0) + if (file == nullptr) return CORBA::Object::_nil (); ACE_Read_Buffer reader (file, true); char* string = reader.read (); - if (string == 0) + if (string == nullptr) return CORBA::Object::_nil (); CORBA::Object_ptr object = CORBA::Object::_nil (); diff --git a/TAO/tao/Fault_Tolerance_Service.cpp b/TAO/tao/Fault_Tolerance_Service.cpp index cee4f82a00a..c38de0e1be8 100644 --- a/TAO/tao/Fault_Tolerance_Service.cpp +++ b/TAO/tao/Fault_Tolerance_Service.cpp @@ -11,7 +11,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Fault_Tolerance_Service::~TAO_Fault_Tolerance_Service (void) +TAO_Fault_Tolerance_Service::~TAO_Fault_Tolerance_Service () { delete this->ft_service_callback_; } @@ -21,7 +21,7 @@ TAO_Fault_Tolerance_Service::init (TAO_ORB_Core *orb_core) { // Look in to the svc conf stuff to get an instance of the // FT_Service. - if (this->ft_service_callback_ == 0) + if (this->ft_service_callback_ == nullptr) { TAO_Services_Activate *service = ACE_Dynamic_Service <TAO_Services_Activate>::instance ("FT_ClientService_Activate"); diff --git a/TAO/tao/Flushing_Strategy.cpp b/TAO/tao/Flushing_Strategy.cpp index c14d50a30a5..0da9874cc48 100644 --- a/TAO/tao/Flushing_Strategy.cpp +++ b/TAO/tao/Flushing_Strategy.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Flushing_Strategy::~TAO_Flushing_Strategy (void) +TAO_Flushing_Strategy::~TAO_Flushing_Strategy () { } diff --git a/TAO/tao/GIOP_Fragmentation_Strategy.cpp b/TAO/tao/GIOP_Fragmentation_Strategy.cpp index 77e62f54c1f..96c4dd80bbc 100644 --- a/TAO/tao/GIOP_Fragmentation_Strategy.cpp +++ b/TAO/tao/GIOP_Fragmentation_Strategy.cpp @@ -1,6 +1,6 @@ #include "tao/GIOP_Fragmentation_Strategy.h" -TAO_GIOP_Fragmentation_Strategy::~TAO_GIOP_Fragmentation_Strategy (void) +TAO_GIOP_Fragmentation_Strategy::~TAO_GIOP_Fragmentation_Strategy () { } diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index b680dbe26e5..9b42415725f 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -21,7 +21,7 @@ TAO_GIOP_Message_Base::TAO_GIOP_Message_Base (TAO_ORB_Core *orb_core, size_t input_cdr_size) : orb_core_ (orb_core) , fragmentation_strategy_ (orb_core->fragmentation_strategy (transport)) - , out_stream_ (0, + , out_stream_ (nullptr, input_cdr_size, TAO_ENCAP_BYTE_ORDER, orb_core->output_cdr_buffer_allocator (), @@ -46,7 +46,7 @@ TAO_GIOP_Message_Base::TAO_GIOP_Message_Base (TAO_ORB_Core *orb_core, } -TAO_GIOP_Message_Base::~TAO_GIOP_Message_Base (void) +TAO_GIOP_Message_Base::~TAO_GIOP_Message_Base () { #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1) this->out_stream_.unregister_monitor (); @@ -62,7 +62,7 @@ TAO_GIOP_Message_Base::init (CORBA::Octet major, CORBA::Octet minor) } TAO_OutputCDR & -TAO_GIOP_Message_Base::out_stream (void) +TAO_GIOP_Message_Base::out_stream () { return this->out_stream_; } @@ -233,10 +233,10 @@ TAO_GIOP_Message_Base::dump_consolidated_msg (TAO_OutputCDR &stream) // Check whether the output cdr stream is build up of multiple // messageblocks. If so, consolidate them to one block that can be // dumped - ACE_Message_Block* consolidated_block = 0; + ACE_Message_Block* consolidated_block = nullptr; char *buf = const_cast <char*> (stream.buffer ()); size_t const total_len = stream.total_length (); - if (stream.begin()->cont () != 0) + if (stream.begin()->cont () != nullptr) { ACE_NEW_RETURN (consolidated_block, ACE_Message_Block, 0); ACE_CDR::consolidate (consolidated_block, stream.begin ()); @@ -246,7 +246,7 @@ TAO_GIOP_Message_Base::dump_consolidated_msg (TAO_OutputCDR &stream) this->dump_msg ("send", reinterpret_cast <u_char *> (buf), total_len); delete consolidated_block; - consolidated_block = 0; + consolidated_block = nullptr; return 0; } @@ -386,7 +386,7 @@ TAO_GIOP_Message_Base::extract_next_message (ACE_Message_Block &incoming, qd = this->make_queued_data (buf_size); - if (qd == 0) + if (qd == nullptr) { if (TAO_debug_level > 0) { @@ -406,7 +406,7 @@ TAO_GIOP_Message_Base::extract_next_message (ACE_Message_Block &incoming, else { // handle not initialized variables - qd = 0; // reset + qd = nullptr; // reset } return 0; @@ -422,7 +422,7 @@ TAO_GIOP_Message_Base::extract_next_message (ACE_Message_Block &incoming, qd = this->make_queued_data (copying_len); - if (qd == 0) + if (qd == nullptr) { if (TAO_debug_level > 0) { @@ -610,7 +610,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, ACE_Message_Block::MB_DATA, repbuf, this->orb_core_->input_cdr_buffer_allocator (), - 0, + nullptr, ACE_Message_Block::DONT_DELETE, this->orb_core_->input_cdr_dblock_allocator ()); @@ -647,7 +647,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, // we pass it on to the higher layers of the ORB. So we dont to any // copies at all here. The same is also done in the higher layers. - ACE_Data_Block *db = 0; + ACE_Data_Block *db = nullptr; // Get the flag in the message block ACE_Message_Block::Message_Flags flg = qd->msg_block ()->self_flags (); @@ -768,7 +768,7 @@ TAO_GIOP_Message_Base::process_reply_message ( size_t wr_pos = qd->msg_block ()->wr_ptr () - qd->msg_block ()->base (); rd_pos += TAO_GIOP_MESSAGE_HEADER_LEN; - ACE_Data_Block *db = 0; + ACE_Data_Block *db = nullptr; // Get the flag in the message block ACE_Message_Block::Message_Flags flg = qd->msg_block ()->self_flags (); @@ -847,7 +847,7 @@ TAO_GIOP_Message_Base::process_reply_message ( return retval; params.input_cdr_ = &input_cdr; - params.transport_->assign_translators (params.input_cdr_, 0); + params.transport_->assign_translators (params.input_cdr_, nullptr); retval = params.transport_->tms ()->dispatch_reply (params); @@ -1002,9 +1002,9 @@ TAO_GIOP_Message_Base::process_request ( &request.reply_service_info ()); output.message_attributes (request_id, - 0, + nullptr, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY), - 0); + nullptr); // Make the GIOP header and Reply header this->generate_reply_header (output, reply_params); @@ -1022,7 +1022,7 @@ TAO_GIOP_Message_Base::process_request ( output.more_fragments (false); int const result = transport->send_message (output, - 0, + nullptr, &request, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)); if (result == -1) @@ -1276,8 +1276,8 @@ TAO_GIOP_Message_Base::make_send_locate_reply (TAO_Transport *transport, // Send the message int const result = transport->send_message (output, - 0, - 0, + nullptr, + nullptr, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)); // Print out message if there is an error @@ -1327,10 +1327,10 @@ TAO_GIOP_Message_Base::send_error (TAO_Transport *transport) ACE_Data_Block data_block (TAO_GIOP_MESSAGE_HEADER_LEN, ACE_Message_Block::MB_DATA, error_message, - 0, - 0, + nullptr, + nullptr, ACE_Message_Block::DONT_DELETE, - 0); + nullptr); ACE_Message_Block message_block(&data_block, ACE_Message_Block::DONT_DELETE); message_block.wr_ptr (TAO_GIOP_MESSAGE_HEADER_LEN); @@ -1435,10 +1435,10 @@ TAO_GIOP_Message_Base:: ACE_Data_Block data_block (TAO_GIOP_MESSAGE_HEADER_LEN, ACE_Message_Block::MB_DATA, close_message, - 0, - 0, + nullptr, + nullptr, ACE_Message_Block::DONT_DELETE, - 0); + nullptr); ACE_Message_Block message_block(&data_block); message_block.wr_ptr (TAO_GIOP_MESSAGE_HEADER_LEN); @@ -1478,7 +1478,7 @@ TAO_GIOP_Message_Base::send_reply_exception ( // this). reply_params.service_context_notowned (svc_info); - if (CORBA::SystemException::_downcast (x) != 0) + if (CORBA::SystemException::_downcast (x) != nullptr) { reply_params.reply_status (GIOP::SYSTEM_EXCEPTION); } @@ -1492,7 +1492,7 @@ TAO_GIOP_Message_Base::send_reply_exception ( output.more_fragments (false); - return transport->send_message (output, 0, 0, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)); + return transport->send_message (output, nullptr, nullptr, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)); } void @@ -1534,7 +1534,7 @@ TAO_GIOP_Message_Base::dump_msg (const char *label, // request/reply id. CORBA::ULong tmp = 0; CORBA::ULong *id = &tmp; - char *tmp_id = 0; + char *tmp_id = nullptr; if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == GIOP::Request || ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == GIOP::Reply || @@ -1644,7 +1644,7 @@ TAO_GIOP_Message_Base::make_queued_data (size_t sz) this->orb_core_->input_cdr_msgblock_allocator (), db); - if (qd == 0) + if (qd == nullptr) { if (TAO_debug_level > 0) { @@ -1653,14 +1653,14 @@ TAO_GIOP_Message_Base::make_queued_data (size_t sz) ACE_TEXT ("out of memory, failed to allocate queued data object\n"))); } db->release (); - return 0; // NULL pointer + return nullptr; // NULL pointer } return qd; } size_t -TAO_GIOP_Message_Base::header_length (void) const +TAO_GIOP_Message_Base::header_length () const { return TAO_GIOP_MESSAGE_HEADER_LEN; } @@ -1696,7 +1696,7 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, // copies at all here. The same is also done in the higher layers. ACE_Message_Block::Message_Flags flg = 0; - ACE_Data_Block *db = 0; + ACE_Data_Block *db = nullptr; // Get the flag in the message block flg = qd->msg_block ()->self_flags (); @@ -1790,15 +1790,15 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( { TAO::Incoming_Message_Stack reverse_stack; - TAO_Queued_Data *tail = 0; - TAO_Queued_Data *head = 0; + TAO_Queued_Data *tail = nullptr; + TAO_Queued_Data *head = nullptr; // // CONSOLIDATE FRAGMENTED MESSAGE // // check for error-condition - if (qd == 0) + if (qd == nullptr) { return -1; } @@ -1814,7 +1814,7 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( { this->fragment_stack_.push (qd); - msg = 0; // no consolidated message available yet + msg = nullptr; // no consolidated message available yet return 1; // status: more messages expected. } @@ -1850,7 +1850,7 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( head->msg_block ()->cont (tail->msg_block ()); - tail->msg_block (0); + tail->msg_block (nullptr); TAO_Queued_Data::release (tail); @@ -1891,7 +1891,7 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( head->msg_block ()->cont (tail->msg_block ()); - tail->msg_block (0); + tail->msg_block (nullptr); TAO_Queued_Data::release (tail); @@ -1944,7 +1944,7 @@ TAO_GIOP_Message_Base::discard_fragmented_message (const TAO_Queued_Data *cancel return -1; } - TAO_Queued_Data *head = 0; + TAO_Queued_Data *head = nullptr; // Revert stack while (this->fragment_stack_.pop (head) != -1) @@ -1996,7 +1996,7 @@ TAO_GIOP_Message_Base::discard_fragmented_message (const TAO_Queued_Data *cancel } TAO_GIOP_Fragmentation_Strategy * -TAO_GIOP_Message_Base::fragmentation_strategy (void) +TAO_GIOP_Message_Base::fragmentation_strategy () { return this->fragmentation_strategy_; } diff --git a/TAO/tao/GIOP_Message_Generator_Parser.cpp b/TAO/tao/GIOP_Message_Generator_Parser.cpp index bf339a05610..3d5efa6a49d 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser.cpp @@ -8,7 +8,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_GIOP_Message_Generator_Parser::~TAO_GIOP_Message_Generator_Parser (void) +TAO_GIOP_Message_Generator_Parser::~TAO_GIOP_Message_Generator_Parser () { } @@ -90,7 +90,7 @@ TAO_GIOP_Message_Generator_Parser::parse_locate_reply ( } bool -TAO_GIOP_Message_Generator_Parser::is_ready_for_bidirectional (void) const +TAO_GIOP_Message_Generator_Parser::is_ready_for_bidirectional () const { return false; } diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index e9a6ca9f4bc..3775c7789be 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -456,21 +456,21 @@ TAO_GIOP_Message_Generator_Parser_10::parse_locate_reply ( } CORBA::Octet -TAO_GIOP_Message_Generator_Parser_10::major_version (void) const +TAO_GIOP_Message_Generator_Parser_10::major_version () const { // Any harm in hardcoding?? return static_cast<CORBA::Octet> (1); } CORBA::Octet -TAO_GIOP_Message_Generator_Parser_10::minor_version (void) const +TAO_GIOP_Message_Generator_Parser_10::minor_version () const { // Any harm in hardcoding?? return 0; } size_t -TAO_GIOP_Message_Generator_Parser_10::fragment_header_length (void) const +TAO_GIOP_Message_Generator_Parser_10::fragment_header_length () const { return 0; } diff --git a/TAO/tao/GIOP_Message_Generator_Parser_11.cpp b/TAO/tao/GIOP_Message_Generator_Parser_11.cpp index 9dcc9dfe78d..9f030a51d1f 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_11.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_11.cpp @@ -4,7 +4,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::Octet -TAO_GIOP_Message_Generator_Parser_11::minor_version (void) const +TAO_GIOP_Message_Generator_Parser_11::minor_version () const { return static_cast<CORBA::Octet> (1); } diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp index 9b0c1a683cf..aec9acbfd60 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp @@ -380,20 +380,20 @@ TAO_GIOP_Message_Generator_Parser_12::parse_locate_reply ( CORBA::Octet -TAO_GIOP_Message_Generator_Parser_12::major_version (void) const +TAO_GIOP_Message_Generator_Parser_12::major_version () const { return static_cast<CORBA::Octet> (1); } CORBA::Octet -TAO_GIOP_Message_Generator_Parser_12::minor_version (void) const +TAO_GIOP_Message_Generator_Parser_12::minor_version () const { return static_cast<CORBA::Octet> (2); } bool -TAO_GIOP_Message_Generator_Parser_12::is_ready_for_bidirectional (void) const +TAO_GIOP_Message_Generator_Parser_12::is_ready_for_bidirectional () const { // We do support bidirectional return true; @@ -465,7 +465,7 @@ TAO_GIOP_Message_Generator_Parser_12::marshall_target_spec ( return false; // Get the IOR - IOP::IOR *ior = 0; + IOP::IOR *ior = nullptr; CORBA::ULong const index = spec.iop_ior (ior); if (ior) @@ -502,7 +502,7 @@ TAO_GIOP_Message_Generator_Parser_12::marshall_target_spec ( } size_t -TAO_GIOP_Message_Generator_Parser_12::fragment_header_length (void) const +TAO_GIOP_Message_Generator_Parser_12::fragment_header_length () const { return TAO_GIOP_MESSAGE_FRAGMENT_HEADER; } diff --git a/TAO/tao/GUIResource_Factory.cpp b/TAO/tao/GUIResource_Factory.cpp index 903f59995df..18e9854bf0d 100644 --- a/TAO/tao/GUIResource_Factory.cpp +++ b/TAO/tao/GUIResource_Factory.cpp @@ -7,17 +7,17 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { - GUIResource_Factory::GUIResource_Factory (void) + GUIResource_Factory::GUIResource_Factory () : dynamically_allocated_reactor_ (false) { } - GUIResource_Factory::~GUIResource_Factory (void) + GUIResource_Factory::~GUIResource_Factory () { } ACE_Reactor * - GUIResource_Factory::get_reactor (void) + GUIResource_Factory::get_reactor () { // @@Marek, do we need a lock here?? // @Bala, I suppose we don't need locking for any @@ -28,17 +28,17 @@ namespace TAO // what for. Nevertheless, just for a case I sync the creation of reactor. // I think, that double checked locking is // not necessary, because the performance is not an issue here. - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - ACE_Reactor *reactor = 0; + ACE_Reactor *reactor = nullptr; ACE_NEW_RETURN (reactor, ACE_Reactor (this->reactor_impl (), 1), - 0); + nullptr); if (reactor->initialized () == 0) { delete reactor; - reactor = 0; + reactor = nullptr; } else this->dynamically_allocated_reactor_ = true; diff --git a/TAO/tao/HR_Time_Policy_Strategy.cpp b/TAO/tao/HR_Time_Policy_Strategy.cpp index 33cd3180412..6cd1a821445 100644 --- a/TAO/tao/HR_Time_Policy_Strategy.cpp +++ b/TAO/tao/HR_Time_Policy_Strategy.cpp @@ -13,15 +13,15 @@ TAO_HR_Time_Policy_Strategy::~TAO_HR_Time_Policy_Strategy () { } -ACE_Timer_Queue * TAO_HR_Time_Policy_Strategy::create_timer_queue (void) +ACE_Timer_Queue * TAO_HR_Time_Policy_Strategy::create_timer_queue () { - ACE_Timer_Queue * tmq = 0; + ACE_Timer_Queue * tmq = nullptr; typedef ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall, ACE_SYNCH_RECURSIVE_MUTEX, ACE_HR_Time_Policy> timer_queue_type; - ACE_NEW_RETURN (tmq, timer_queue_type (), 0); + ACE_NEW_RETURN (tmq, timer_queue_type (), nullptr); return tmq; } @@ -32,7 +32,7 @@ TAO_HR_Time_Policy_Strategy::destroy_timer_queue (ACE_Timer_Queue *tmq) delete tmq; } -ACE_Dynamic_Time_Policy_Base * TAO_HR_Time_Policy_Strategy::get_time_policy (void) +ACE_Dynamic_Time_Policy_Base * TAO_HR_Time_Policy_Strategy::get_time_policy () { return &time_policy_; } diff --git a/TAO/tao/HTTP_Client.cpp b/TAO/tao/HTTP_Client.cpp index f4ddaa6678d..80938aac971 100644 --- a/TAO/tao/HTTP_Client.cpp +++ b/TAO/tao/HTTP_Client.cpp @@ -9,12 +9,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_HTTP_Client::TAO_HTTP_Client (void) - : filename_ (0) +TAO_HTTP_Client::TAO_HTTP_Client () + : filename_ (nullptr) { } -TAO_HTTP_Client::~TAO_HTTP_Client (void) +TAO_HTTP_Client::~TAO_HTTP_Client () { this->close (); } @@ -47,12 +47,12 @@ TAO_HTTP_Client::read (ACE_Message_Block *mb) } int -TAO_HTTP_Client::close (void) +TAO_HTTP_Client::close () { if (this->filename_) { ACE_OS::free ((void *) this->filename_); - this->filename_ = 0; + this->filename_ = nullptr; } return 0; } diff --git a/TAO/tao/HTTP_Handler.cpp b/TAO/tao/HTTP_Handler.cpp index c645b03007a..5c70d7425b9 100644 --- a/TAO/tao/HTTP_Handler.cpp +++ b/TAO/tao/HTTP_Handler.cpp @@ -9,9 +9,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_HTTP_Handler::TAO_HTTP_Handler (void) : - mb_ (0), - filename_ (0), +TAO_HTTP_Handler::TAO_HTTP_Handler () : + mb_ (nullptr), + filename_ (nullptr), bytecount_ (0) { } @@ -24,12 +24,12 @@ TAO_HTTP_Handler::TAO_HTTP_Handler (ACE_Message_Block * mb, { } -TAO_HTTP_Handler::~TAO_HTTP_Handler (void) +TAO_HTTP_Handler::~TAO_HTTP_Handler () { if (this->filename_) { ACE_OS::free (this->filename_); - filename_ = 0; + filename_ = nullptr; } } @@ -52,19 +52,19 @@ TAO_HTTP_Handler::close (u_long) } int -TAO_HTTP_Handler::send_request (void) +TAO_HTTP_Handler::send_request () { return -1; } int -TAO_HTTP_Handler::receive_reply (void) +TAO_HTTP_Handler::receive_reply () { return -1; } size_t -TAO_HTTP_Handler::byte_count (void) const +TAO_HTTP_Handler::byte_count () const { return bytecount_; } @@ -82,7 +82,7 @@ TAO_HTTP_Reader::TAO_HTTP_Reader (ACE_Message_Block * mb, } int -TAO_HTTP_Reader::send_request (void) +TAO_HTTP_Reader::send_request () { char mesg [MAX_HEADER_SIZE]; @@ -105,27 +105,27 @@ TAO_HTTP_Reader::send_request (void) } int -TAO_HTTP_Reader::receive_reply (void) +TAO_HTTP_Reader::receive_reply () { size_t num_recvd = 0; char buf [MTU+1]; - char *buf_ptr = 0; + char *buf_ptr = nullptr; size_t bytes_read = 0; // Receive the first MTU bytes and strip the header off. // Note that we assume that the header will fit into MTU bytes. - if (peer ().recv_n (buf, MTU, 0, &num_recvd) >= 0) + if (peer ().recv_n (buf, MTU, nullptr, &num_recvd) >= 0) { //Make sure that response type is 200 OK - if (ACE_OS::strstr (buf,"200 OK") == 0) + if (ACE_OS::strstr (buf,"200 OK") == nullptr) TAOLIB_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Reader::receive_reply, Response is not 200 OK\n" ), -1); // Search for the header termination string "\r\n\r\n", or "\n\n". If // found, move past it to get to the data portion. - if ((buf_ptr = ACE_OS::strstr (buf,"\r\n\r\n")) != 0) + if ((buf_ptr = ACE_OS::strstr (buf,"\r\n\r\n")) != nullptr) buf_ptr += 4; - else if ((buf_ptr = ACE_OS::strstr (buf, "\n\n")) != 0) //for compatibility with JAWS + else if ((buf_ptr = ACE_OS::strstr (buf, "\n\n")) != nullptr) //for compatibility with JAWS buf_ptr += 2; else buf_ptr = buf; @@ -145,7 +145,7 @@ TAO_HTTP_Reader::receive_reply (void) // At this point, we have stripped off the header and are ready to // process data. buf_ptr points to the data - ACE_Message_Block* temp = 0; + ACE_Message_Block* temp = nullptr; ACE_Message_Block* curr = this->mb_; ACE_NEW_RETURN (temp, @@ -175,7 +175,7 @@ TAO_HTTP_Reader::receive_reply (void) curr = curr->cont (); } - if (peer ().recv_n (curr->wr_ptr (), curr->space (), 0, &num_recvd) >= 0) + if (peer ().recv_n (curr->wr_ptr (), curr->space (), nullptr, &num_recvd) >= 0) { // Move the write pointer curr->wr_ptr (num_recvd); diff --git a/TAO/tao/HTTP_Parser.cpp b/TAO/tao/HTTP_Parser.cpp index 7090dea4d03..e4922fb4a7d 100644 --- a/TAO/tao/HTTP_Parser.cpp +++ b/TAO/tao/HTTP_Parser.cpp @@ -18,7 +18,7 @@ static const ACE_TCHAR file_prefix[] = ACE_TEXT ("http:"); TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_HTTP_Parser::~TAO_HTTP_Parser (void) +TAO_HTTP_Parser::~TAO_HTTP_Parser () { } @@ -42,9 +42,9 @@ TAO_HTTP_Parser::parse_string (const char *nior, const ACE_TCHAR *http_url = ior.c_str () + sizeof (::file_prefix) + 1; - ACE_TCHAR *hostname = 0; - ACE_TCHAR *filename = 0; - const ACE_TCHAR *ptr = 0; + ACE_TCHAR *hostname = nullptr; + ACE_TCHAR *filename = nullptr; + const ACE_TCHAR *ptr = nullptr; u_short port = 80; if (http_url[0] == '/') @@ -60,11 +60,11 @@ TAO_HTTP_Parser::parse_string (const char *nior, ptr = ACE_OS::strstr (http_url, ACE_TEXT ("/")); if(!ptr) - return 0; + return nullptr; else { size_t const host_len = ptr - http_url; - ACE_NEW_RETURN (hostname, ACE_TCHAR [host_len + 1], 0 ); + ACE_NEW_RETURN (hostname, ACE_TCHAR [host_len + 1], nullptr ); ACE_OS::strncpy (hostname, http_url, host_len); hostname [host_len] = '\0'; ptr = ACE_OS::strstr (ptr, ACE_TEXT ("/")); @@ -75,12 +75,12 @@ TAO_HTTP_Parser::parse_string (const char *nior, else { delete [] hostname; - return 0; + return nullptr; } } } - ACE_Message_Block* mb = 0; + ACE_Message_Block* mb = nullptr; ACE_NEW_THROW_EX (mb, ACE_Message_Block (), CORBA::INTERNAL ()); @@ -101,7 +101,7 @@ TAO_HTTP_Parser::parse_string (const char *nior, port) == -1) { client.close (); - return 0; + return nullptr; } delete [] hostname; @@ -111,13 +111,13 @@ TAO_HTTP_Parser::parse_string (const char *nior, if (client.read (mb) <= 0) { client.close (); - return 0; + return nullptr; } // We get multiple message blocks back, concatenate them to // one large string ACE_CString string; - for (ACE_Message_Block * curr = mb; curr != 0; curr = curr->cont ()) + for (ACE_Message_Block * curr = mb; curr != nullptr; curr = curr->cont ()) string += curr->rd_ptr(); return orb->string_to_object (string.c_str()); diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index ae4c3f769d4..1f8244e94b9 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -20,15 +20,15 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void) +TAO_IIOP_Acceptor::TAO_IIOP_Acceptor () : TAO_Acceptor (IOP::TAG_INTERNET_IOP), - addrs_ (0), + addrs_ (nullptr), port_span_ (1), - hosts_ (0), - hostname_in_ior_ (0), + hosts_ (nullptr), + hostname_in_ior_ (nullptr), endpoint_count_ (0), version_ (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR), - orb_core_ (0), + orb_core_ (nullptr), reuse_addr_ (1), #if defined (ACE_HAS_IPV6) && !defined (ACE_USES_IPV4_IPV6_MIGRATION) default_address_ (static_cast<unsigned short> (0), ACE_IPV6_ANY, AF_INET6), @@ -36,9 +36,9 @@ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void) default_address_ (static_cast<unsigned short> (0), static_cast<ACE_UINT32> (INADDR_ANY)), #endif /* ACE_HAS_IPV6 && !ACE_USES_IPV4_IPV6_MIGRATION */ base_acceptor_ (this), - creation_strategy_ (0), - concurrency_strategy_ (0), - accept_strategy_ (0) + creation_strategy_ (nullptr), + concurrency_strategy_ (nullptr), + accept_strategy_ (nullptr) { #if defined (ACE_HAS_IPV6) && defined (ACE_USES_IPV4_IPV6_MIGRATION) if (ACE::ipv6_enabled()) @@ -49,7 +49,7 @@ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void) #endif /* ACE_HAS_IPV6 && ACE_USES_IPV4_IPV6_MIGRATION */ } -TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor (void) +TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor () { // Make sure we are closed before we start destroying the // strategies. @@ -109,7 +109,7 @@ TAO_IIOP_Acceptor::create_new_profile (const TAO::ObjectKey &object_key, && ACE_OS::strcmp(this->hosts_[i], this->hosts_[0]) == 0) continue; - TAO_IIOP_Profile *pfile = 0; + TAO_IIOP_Profile *pfile = nullptr; ACE_NEW_RETURN (pfile, TAO_IIOP_Profile (this->hosts_[i], this->addrs_[i].get_port_number (), @@ -123,7 +123,7 @@ TAO_IIOP_Acceptor::create_new_profile (const TAO::ObjectKey &object_key, if (mprofile.give_profile (pfile) == -1) { pfile->_decr_refcnt (); - pfile = 0; + pfile = nullptr; return -1; } @@ -150,8 +150,8 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key, CORBA::Short priority) { CORBA::ULong index = 0; - TAO_Profile *pfile = 0; - TAO_IIOP_Profile *iiop_profile = 0; + TAO_Profile *pfile = nullptr; + TAO_IIOP_Profile *iiop_profile = nullptr; // First see if @a mprofile already contains a IIOP profile. for (TAO_PHandle i = 0; i != mprofile.profile_count (); ++i) @@ -166,7 +166,7 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key, // If <mprofile> doesn't contain a IIOP_Profile, we need to create // one. - if (iiop_profile == 0) + if (iiop_profile == nullptr) { ACE_NEW_RETURN (iiop_profile, TAO_IIOP_Profile (this->hosts_[0], @@ -182,7 +182,7 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key, if (mprofile.give_profile (iiop_profile) == -1) { iiop_profile->_decr_refcnt (); - iiop_profile = 0; + iiop_profile = nullptr; return -1; } @@ -211,7 +211,7 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key, ACE_OS::strcmp(this->hosts_[index], this->hosts_[0]) == 0) continue; - TAO_IIOP_Endpoint *endpoint = 0; + TAO_IIOP_Endpoint *endpoint = nullptr; ACE_NEW_RETURN (endpoint, TAO_IIOP_Endpoint (this->hosts_[index], this->addrs_[index].get_port_number (), @@ -231,7 +231,7 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint) dynamic_cast<const TAO_IIOP_Endpoint *> (endpoint); // Make sure the dynamically cast pointer is valid. - if (endp == 0) + if (endp == nullptr) return 0; for (CORBA::ULong i = 0; i < this->endpoint_count_; ++i) @@ -251,7 +251,7 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint) } int -TAO_IIOP_Acceptor::close (void) +TAO_IIOP_Acceptor::close () { return this->base_acceptor_.close (); } @@ -274,7 +274,7 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, this->orb_core_ = orb_core; - if (this->hosts_ != 0) + if (this->hosts_ != nullptr) { // The hostname cache has already been set! // This is bad mojo, i.e. an internal TAO error. @@ -285,7 +285,7 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, -1); } - if (address == 0) + if (address == nullptr) return -1; if (major >=0 && minor >= 0) @@ -357,9 +357,9 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, char *[this->endpoint_count_], -1); - this->hosts_[0] = 0; + this->hosts_[0] = nullptr; - if (this->hostname_in_ior_ != 0) + if (this->hostname_in_ior_ != nullptr) { if (TAO_debug_level > 2) { @@ -395,7 +395,7 @@ TAO_IIOP_Acceptor::open_default (TAO_ORB_Core *orb_core, { this->orb_core_ = orb_core; - if (this->hosts_ != 0) + if (this->hosts_ != nullptr) { // The hostname cache has already been set! // This is bad mojo, i.e. an internal TAO error. @@ -454,7 +454,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr, this->creation_strategy_, this->accept_strategy_, this->concurrency_strategy_, - 0, 0, 0, ACE_DEFAULT_ACCEPTOR_USE_SELECT, + nullptr, nullptr, nullptr, ACE_DEFAULT_ACCEPTOR_USE_SELECT, this->reuse_addr_) == -1) { if (TAO_debug_level > 0) @@ -490,7 +490,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr, this->creation_strategy_, this->accept_strategy_, this->concurrency_strategy_, - 0, 0, 0, ACE_DEFAULT_ACCEPTOR_USE_SELECT, + nullptr, nullptr, nullptr, ACE_DEFAULT_ACCEPTOR_USE_SELECT, this->reuse_addr_) != -1) { found_a_port = true; @@ -594,7 +594,7 @@ TAO_IIOP_Acceptor::hostname (TAO_ORB_Core *orb_core, char *&host, const char *specified_hostname) { - if (this->hostname_in_ior_ != 0) + if (this->hostname_in_ior_ != nullptr) { if (TAO_debug_level >= 5) TAOLIB_DEBUG ((LM_DEBUG, @@ -610,7 +610,7 @@ TAO_IIOP_Acceptor::hostname (TAO_ORB_Core *orb_core, // just return ours. return this->dotted_decimal_address (addr, host); } - else if (specified_hostname != 0) + else if (specified_hostname != nullptr) { // If the user specified a hostname, pass it back // blindly as it overrides our choice of hostname. @@ -710,7 +710,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address, #endif /* ACE_HAS_IPV6 */ if (!host_defaulted) { - if (port_separator_loc != 0) + if (port_separator_loc != nullptr) { // Extract out just the host part of the address. size_t const len = port_separator_loc - address; @@ -739,7 +739,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address, { // First convert the port into a usable form. unsigned short portno = 0; - if (port_separator_loc != 0) + if (port_separator_loc != nullptr) { portno = static_cast<u_short> (ACE_OS::atoi (port_separator_loc + @@ -751,7 +751,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address, if (addr.set (this->default_address_) != 0) return -1; } - else if (port_separator_loc == 0) + else if (port_separator_loc == nullptr) { // The address is a hostname. No port was specified, so assume // port zero (port will be chosen for us). @@ -788,7 +788,7 @@ TAO_IIOP_Acceptor::dotted_decimal_address (const ACE_INET_Addr &addr, char *&host) { int result = 0; - const char *tmp = 0; + const char *tmp = nullptr; // If the IP address in the INET_Addr is the IN(6)ADDR_ANY address, // then force the actual IP address to be used by initializing a new @@ -812,7 +812,7 @@ TAO_IIOP_Acceptor::dotted_decimal_address (const ACE_INET_Addr &addr, else tmp = addr.get_host_addr (); - if (tmp == 0 || result != 0) + if (tmp == nullptr || result != 0) { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -834,7 +834,7 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core, int def_type) // it. The hostnames will then be used when creating a // TAO_IIOP_Profile for each endpoint setup on the probed // network interfaces. - ACE_INET_Addr *if_addrs = 0; + ACE_INET_Addr *if_addrs = nullptr; size_t if_cnt = 0; if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0 @@ -846,7 +846,7 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core, int def_type) return -1; } - if (if_cnt == 0 || if_addrs == 0) + if (if_cnt == 0 || if_addrs == nullptr) { if (TAO_debug_level > 0) { @@ -1049,7 +1049,7 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core, int def_type) } CORBA::ULong -TAO_IIOP_Acceptor::endpoint_count (void) +TAO_IIOP_Acceptor::endpoint_count () { return this->endpoint_count_; } @@ -1112,7 +1112,7 @@ TAO_IIOP_Acceptor::object_key (IOP::TaggedProfile &profile, int TAO_IIOP_Acceptor::parse_options (const char *str) { - if (str == 0) + if (str == nullptr) return 0; // No options to parse. Not a problem. // Use an option format similar to the one used for CGI scripts in @@ -1140,9 +1140,9 @@ TAO_IIOP_Acceptor::parse_options (const char *str) // `option1=foo' // `option2=bar' - ACE_CString *argv_base = 0; + ACE_CString *argv_base = nullptr; ACE_NEW_RETURN (argv_base, ACE_CString[argc],-1); - ACE_CString **argv = 0; + ACE_CString **argv = nullptr; ACE_NEW_RETURN (argv, ACE_CString*[argc],-1); ACE_CString::size_type begin = 0; diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index e5831f43aa4..55126126816 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -56,8 +56,8 @@ TAO_IIOP_Connection_Handler::remove_reference (void) TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler (ACE_Thread_Manager *t) - : TAO_IIOP_SVC_HANDLER (t, 0 , 0), - TAO_Connection_Handler (0), + : TAO_IIOP_SVC_HANDLER (t, nullptr , nullptr), + TAO_Connection_Handler (nullptr), dscp_codepoint_ (IPDSFIELD_DSCP_DEFAULT << 2) { // This constructor should *never* get called, it is just here to @@ -71,11 +71,11 @@ TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler (ACE_Thread_Manager *t) TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler ( TAO_ORB_Core *orb_core) - : TAO_IIOP_SVC_HANDLER (orb_core->thr_mgr (), 0, 0), + : TAO_IIOP_SVC_HANDLER (orb_core->thr_mgr (), nullptr, nullptr), TAO_Connection_Handler (orb_core), dscp_codepoint_ (IPDSFIELD_DSCP_DEFAULT << 2) { - TAO_IIOP_Transport* specific_transport = 0; + TAO_IIOP_Transport* specific_transport = nullptr; ACE_NEW (specific_transport, TAO_IIOP_Transport (this, orb_core)); @@ -86,7 +86,7 @@ TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler ( ACE_TEXT("TAO (%P|%t) - IIOP_Connection_Handler[%d]::") ACE_TEXT("IIOP_Connection_Handler, ") ACE_TEXT("this=%@\n"), - tport != 0 ? tport->id () : 0, + tport != nullptr ? tport->id () : 0, this)); } @@ -94,7 +94,7 @@ TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler ( this->transport (specific_transport); } -TAO_IIOP_Connection_Handler::~TAO_IIOP_Connection_Handler (void) +TAO_IIOP_Connection_Handler::~TAO_IIOP_Connection_Handler () { if (TAO_debug_level > 9) { @@ -103,7 +103,7 @@ TAO_IIOP_Connection_Handler::~TAO_IIOP_Connection_Handler (void) ACE_TEXT("TAO (%P|%t) - IIOP_Connection_Handler[%d]::") ACE_TEXT("~IIOP_Connection_Handler, ") ACE_TEXT("this=%@, transport=%@\n"), - tport != 0 ? tport->id () : 0, + tport != nullptr ? tport->id () : 0, this, tport)); } @@ -150,7 +150,7 @@ TAO_IIOP_Connection_Handler::open (void*) TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); - if (tph != 0) + if (tph != nullptr) { try { @@ -358,13 +358,13 @@ TAO_IIOP_Connection_Handler::open (void*) } int -TAO_IIOP_Connection_Handler::resume_handler (void) +TAO_IIOP_Connection_Handler::resume_handler () { return ACE_Event_Handler::ACE_APPLICATION_RESUMES_HANDLER; } int -TAO_IIOP_Connection_Handler::close_connection (void) +TAO_IIOP_Connection_Handler::close_connection () { // To maintain maximum compatibility, we only set this socket option // if the user has provided a linger timeout. @@ -460,13 +460,13 @@ TAO_IIOP_Connection_Handler::close (u_long flags) } int -TAO_IIOP_Connection_Handler::release_os_resources (void) +TAO_IIOP_Connection_Handler::release_os_resources () { return this->peer ().close (); } int -TAO_IIOP_Connection_Handler::add_transport_to_cache (void) +TAO_IIOP_Connection_Handler::add_transport_to_cache () { ACE_INET_Addr addr; @@ -644,7 +644,7 @@ TAO_IIOP_Connection_Handler::set_dscp_codepoint (CORBA::Boolean set_network_prio { TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); - if (tph != 0) + if (tph != nullptr) { CORBA::Long codepoint = tph->get_dscp_codepoint (); @@ -657,7 +657,7 @@ TAO_IIOP_Connection_Handler::set_dscp_codepoint (CORBA::Boolean set_network_prio } void -TAO_IIOP_Connection_Handler::abort (void) +TAO_IIOP_Connection_Handler::abort () { struct linger lval = { 0, 0 }; lval.l_onoff = 1; diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index b7cc8127aab..28ea80707e8 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -50,7 +50,7 @@ class TAO_IIOP_Connection_Handler_Array_Guard { public: TAO_IIOP_Connection_Handler_Array_Guard (TAO_IIOP_Connection_Handler **p, unsigned count); - ~TAO_IIOP_Connection_Handler_Array_Guard (void); + ~TAO_IIOP_Connection_Handler_Array_Guard (); private: /// Handler. @@ -66,10 +66,10 @@ TAO_IIOP_Connection_Handler_Array_Guard::TAO_IIOP_Connection_Handler_Array_Guard { } -TAO_IIOP_Connection_Handler_Array_Guard::~TAO_IIOP_Connection_Handler_Array_Guard (void) +TAO_IIOP_Connection_Handler_Array_Guard::~TAO_IIOP_Connection_Handler_Array_Guard () { ACE_Errno_Guard eguard (errno); - if (this->ptr_ != 0) + if (this->ptr_ != nullptr) { for (unsigned i = 0; i < this->count_; i++) this->ptr_[i]->remove_reference (); @@ -79,14 +79,14 @@ TAO_IIOP_Connection_Handler_Array_Guard::~TAO_IIOP_Connection_Handler_Array_Guar //--------------------------------------------------------------------------- -TAO_IIOP_Connector::~TAO_IIOP_Connector (void) +TAO_IIOP_Connector::~TAO_IIOP_Connector () { } -TAO_IIOP_Connector::TAO_IIOP_Connector (void) +TAO_IIOP_Connector::TAO_IIOP_Connector () : TAO_Connector (IOP::TAG_INTERNET_IOP) , connect_strategy_ () - , base_connector_ (0) + , base_connector_ (nullptr) { } @@ -105,7 +105,7 @@ TAO_IIOP_Connector::open (TAO_ORB_Core *orb_core) return -1; /// Our connect creation strategy - TAO_IIOP_CONNECT_CREATION_STRATEGY *connect_creation_strategy = 0; + TAO_IIOP_CONNECT_CREATION_STRATEGY *connect_creation_strategy = nullptr; ACE_NEW_RETURN (connect_creation_strategy, TAO_IIOP_CONNECT_CREATION_STRATEGY @@ -114,7 +114,7 @@ TAO_IIOP_Connector::open (TAO_ORB_Core *orb_core) -1); /// Our activation strategy - TAO_IIOP_CONNECT_CONCURRENCY_STRATEGY *concurrency_strategy = 0; + TAO_IIOP_CONNECT_CONCURRENCY_STRATEGY *concurrency_strategy = nullptr; ACE_NEW_RETURN (concurrency_strategy, TAO_IIOP_CONNECT_CONCURRENCY_STRATEGY (orb_core), @@ -127,7 +127,7 @@ TAO_IIOP_Connector::open (TAO_ORB_Core *orb_core) } int -TAO_IIOP_Connector::close (void) +TAO_IIOP_Connector::close () { delete this->base_connector_.concurrency_strategy (); delete this->base_connector_.creation_strategy (); @@ -135,7 +135,7 @@ TAO_IIOP_Connector::close (void) } int -TAO_IIOP_Connector::supports_parallel_connects(void) const +TAO_IIOP_Connector::supports_parallel_connects() const { return 1; } @@ -145,7 +145,7 @@ TAO_IIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint) { TAO_IIOP_Endpoint *iiop_endpoint = this->remote_endpoint (endpoint); - if (iiop_endpoint == 0) + if (iiop_endpoint == nullptr) return -1; const ACE_INET_Addr &remote_address = iiop_endpoint->object_addr (); @@ -180,11 +180,11 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r, TAO_Transport_Descriptor_Interface &desc, ACE_Time_Value *timeout) { - TAO_IIOP_Connection_Handler *svc_handler = 0; + TAO_IIOP_Connection_Handler *svc_handler = nullptr; TAO_IIOP_Endpoint *iiop_endpoint = this->remote_endpoint (desc.endpoint()); - if (iiop_endpoint == 0) - return 0; + if (iiop_endpoint == nullptr) + return nullptr; int const result = this->begin_connection (svc_handler, r, iiop_endpoint, timeout); @@ -204,7 +204,7 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r, iiop_endpoint->port (), ACE_TEXT("errno"))); } - return 0; + return nullptr; } TAO_IIOP_Connection_Handler **sh_ptr = &svc_handler; @@ -224,7 +224,7 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r, // If complete_connection was unsuccessful then remove // the last reference that we have to the svc_handler. - if (transport == 0) + if (transport == nullptr) { if (TAO_debug_level > 1) { @@ -234,7 +234,7 @@ TAO_IIOP_Connector::make_connection (TAO::Profile_Transport_Resolver *r, iiop_endpoint->host (), iiop_endpoint->port ())); } - return 0; + return nullptr; } svc_handler_auto_ptr.release (); @@ -253,8 +253,8 @@ TAO_IIOP_Connector::make_parallel_connection ( this->orb_core ()->orb_params ()->parallel_connect_delay (); time_t sec_stagger = ns_stagger/1000; ns_stagger = (ns_stagger % 1000) * 1000000; - for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(), 0); - ep != 0; + for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(), nullptr); + ep != nullptr; ep = ep->next_filtered (this->orb_core(), root_ep)) ++max_count; @@ -263,20 +263,20 @@ TAO_IIOP_Connector::make_parallel_connection ( ACE_TEXT ("TAO (%P|%t) - IIOP_Connector::") ACE_TEXT ("make_parallel_connection, ") ACE_TEXT ("to %d endpoints\n"), max_count)); - TAO_IIOP_Endpoint **eplist = 0; - TAO_IIOP_Connection_Handler **shlist = 0; - ACE_NEW_RETURN (shlist, TAO_IIOP_Connection_Handler *[max_count], 0); - ACE_NEW_RETURN (eplist, TAO_IIOP_Endpoint *[max_count], 0); + TAO_IIOP_Endpoint **eplist = nullptr; + TAO_IIOP_Connection_Handler **shlist = nullptr; + ACE_NEW_RETURN (shlist, TAO_IIOP_Connection_Handler *[max_count], nullptr); + ACE_NEW_RETURN (eplist, TAO_IIOP_Endpoint *[max_count], nullptr); TAO_LF_Multi_Event mev; int result = 0; unsigned count = 0; - for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),0); - ep != 0; + for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),nullptr); + ep != nullptr; ep = ep->next_filtered(this->orb_core(),root_ep)) { eplist[count] = this->remote_endpoint (ep); - shlist[count] = 0; + shlist[count] = nullptr; result = this->begin_connection (shlist[count], r, eplist[count], @@ -291,7 +291,7 @@ TAO_IIOP_Connector::make_parallel_connection ( if (errno == EWOULDBLOCK) { mev.add_event(shlist[count++]); - if (ep->next() != 0) + if (ep->next() != nullptr) { struct timespec nsleep = {sec_stagger, ns_stagger}; ACE_OS::nanosleep (&nsleep); @@ -314,7 +314,7 @@ TAO_IIOP_Connector::make_parallel_connection ( } } - TAO_Transport *winner = 0; + TAO_Transport *winner = nullptr; if (count > 0) // only complete if at least one pending or success { // Make sure that we always do a remove_reference for every member @@ -381,7 +381,7 @@ TAO_IIOP_Connector::begin_connection (TAO_IIOP_Connection_Handler *&svc_handler, // The code used to set the timeout to zero, with the intent of // polling the reactor for connection completion. However, the side-effect // was to cause the connection to timeout immediately. - svc_handler = 0; + svc_handler = nullptr; int result = -1; u_short span = this->orb_core ()->orb_params ()->iiop_client_port_span (); @@ -405,10 +405,10 @@ TAO_IIOP_Connector::begin_connection (TAO_IIOP_Connection_Handler *&svc_handler, } else { - if (svc_handler != 0) + if (svc_handler != nullptr) { svc_handler->remove_reference (); - svc_handler = 0; + svc_handler = nullptr; } } } @@ -423,19 +423,19 @@ namespace TAO_IIOP { public: TList_Holder (size_t count) - : tlist_ (0) + : tlist_ (nullptr) { // Resources are acquired during initialization (RAII) ACE_NEW (tlist_, TAO_Transport*[count]); } - ~TList_Holder (void) + ~TList_Holder () { // Resources are unacquired during uninitialization delete [] tlist_; } - operator TAO_Transport** (void) + operator TAO_Transport** () { return tlist_; } @@ -460,7 +460,7 @@ TAO_IIOP_Connector::complete_connection (int result, { TAO_IIOP::TList_Holder tlist(count); - TAO_Transport *transport = 0; + TAO_Transport *transport = nullptr; // populate the transport list for (unsigned i = 0; i < count; i++) @@ -482,7 +482,7 @@ TAO_IIOP_Connector::complete_connection (int result, { // Cache is full, so close the connection again sh_list[count-1]->close (); - transport = 0; + transport = nullptr; } } else @@ -540,10 +540,10 @@ TAO_IIOP_Connector::complete_connection (int result, // At this point, the connection has been successfully created // connected or not connected, but we have a connection. - TAO_IIOP_Connection_Handler *svc_handler = 0; - TAO_IIOP_Endpoint *iiop_endpoint = 0; + TAO_IIOP_Connection_Handler *svc_handler = nullptr; + TAO_IIOP_Endpoint *iiop_endpoint = nullptr; - if (transport != 0) + if (transport != nullptr) { for (unsigned i = 0; i < count; i++) { @@ -571,7 +571,7 @@ TAO_IIOP_Connector::complete_connection (int result, ACE_TEXT("errno"))); } } - return 0; + return nullptr; } TAO_Leader_Follower &leader_follower = this->orb_core ()->leader_follower (); @@ -599,7 +599,7 @@ TAO_IIOP_Connector::complete_connection (int result, ACE_TEXT("TAO (%P|%t) - IIOP_Connector::make_connection, ") ACE_TEXT("transport in error before cache!\n"))); transport->connection_handler()->cancel_pending_connection(); - return 0; + return nullptr; } if (TAO_debug_level > 2) @@ -645,7 +645,7 @@ TAO_IIOP_Connector::complete_connection (int result, ACE_TEXT ("could not add new connection to cache\n"))); } - return 0; + return nullptr; } // Other part of fix for bug 2654. @@ -661,7 +661,7 @@ TAO_IIOP_Connector::complete_connection (int result, ACE_TEXT("transport in error after cache!\n"))); svc_handler->cancel_pending_connection(); transport->purge_entry(); - return 0; + return nullptr; } @@ -677,7 +677,7 @@ TAO_IIOP_Connector::complete_connection (int result, // deal with the transport cache if there is a failure. if (!transport->register_if_necessary ()) { - return 0; + return nullptr; } return transport; @@ -686,30 +686,30 @@ TAO_IIOP_Connector::complete_connection (int result, TAO_Profile * TAO_IIOP_Connector::create_profile (TAO_InputCDR& cdr) { - TAO_Profile *pfile = 0; + TAO_Profile *pfile = nullptr; ACE_NEW_RETURN (pfile, TAO_IIOP_Profile (this->orb_core ()), - 0); + nullptr); int const r = pfile->decode (cdr); if (r == -1) { pfile->_decr_refcnt (); - pfile = 0; + pfile = nullptr; } return pfile; } TAO_Profile * -TAO_IIOP_Connector::make_profile (void) +TAO_IIOP_Connector::make_profile () { // The endpoint should be of the form: // N.n@host:port/object_key // or: // host:port/object_key - TAO_Profile *profile = 0; + TAO_Profile *profile = nullptr; ACE_NEW_THROW_EX (profile, TAO_IIOP_Profile (this->orb_core ()), CORBA::NO_MEMORY ( @@ -750,7 +750,7 @@ TAO_IIOP_Connector::check_prefix (const char *endpoint) } char -TAO_IIOP_Connector::object_key_delimiter (void) const +TAO_IIOP_Connector::object_key_delimiter () const { return TAO_IIOP_Profile::object_key_delimiter_; } @@ -759,13 +759,13 @@ TAO_IIOP_Endpoint * TAO_IIOP_Connector::remote_endpoint (TAO_Endpoint *endpoint) { if (endpoint->tag () != IOP::TAG_INTERNET_IOP) - return 0; + return nullptr; TAO_IIOP_Endpoint *iiop_endpoint = dynamic_cast<TAO_IIOP_Endpoint *> (endpoint ); - if (iiop_endpoint == 0) - return 0; + if (iiop_endpoint == nullptr) + return nullptr; return iiop_endpoint; } diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp index b30580fc28e..8ec0fde8237 100644 --- a/TAO/tao/IIOP_Endpoint.cpp +++ b/TAO/tao/IIOP_Endpoint.cpp @@ -39,7 +39,7 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const ACE_INET_Addr &addr, , object_addr_set_ (false) , object_addr_ (addr) , preferred_path_ () - , next_ (0) + , next_ (nullptr) { this->set (addr, use_dotted_decimal_addresses); } @@ -58,12 +58,12 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const char *host, , object_addr_set_ (false) , object_addr_ (addr) , preferred_path_ () - , next_ (0) + , next_ (nullptr) { this->host(host); // With IPv6 performs check for decimal address } -TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (void) +TAO_IIOP_Endpoint::TAO_IIOP_Endpoint () : TAO_Endpoint (IOP::TAG_INTERNET_IOP) , host_ () , port_ (683) // default port (IANA assigned) @@ -74,7 +74,7 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (void) , object_addr_set_ (false) , object_addr_ () , preferred_path_ () - , next_ (0) + , next_ (nullptr) { } @@ -91,7 +91,7 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const char *host, , object_addr_set_ (false) , object_addr_ () , preferred_path_ () - , next_ (0) + , next_ (nullptr) { this->host(host); // With IPv6 performs check for decimal address } @@ -110,12 +110,12 @@ TAO_IIOP_Endpoint::operator= (const TAO_IIOP_Endpoint &other) this->object_addr_set_ = other.object_addr_set_; this->object_addr_ = other.object_addr_; this->preferred_path_ = other.preferred_path_; - this->next_ = 0; // do not copy list membership, since we are only cloning the values + this->next_ = nullptr; // do not copy list membership, since we are only cloning the values } return *this; } -TAO_IIOP_Endpoint::~TAO_IIOP_Endpoint (void) +TAO_IIOP_Endpoint::~TAO_IIOP_Endpoint () { } @@ -130,7 +130,7 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const TAO_IIOP_Endpoint &rhs) , object_addr_set_ (rhs.object_addr_set_) , object_addr_ (rhs.object_addr_) , preferred_path_ (rhs.preferred_path_) - , next_ (0) + , next_ (nullptr) { } @@ -156,7 +156,7 @@ TAO_IIOP_Endpoint::set (const ACE_INET_Addr &addr, } const char *tmp = addr.get_host_addr (); - if (tmp == 0) + if (tmp == nullptr) { if (TAO_debug_level > 0) { @@ -226,7 +226,7 @@ TAO_IIOP_Endpoint::host (const char *h) } TAO_Endpoint * -TAO_IIOP_Endpoint::next (void) +TAO_IIOP_Endpoint::next () { return this->next_; } @@ -260,8 +260,8 @@ TAO_IIOP_Endpoint::next_filtered_i (TAO_IIOP_Endpoint *root, // the candidate is nominally the next entry in the list, but since // the list may loop back on itself, the root of the list needs to be // initialized. - TAO_IIOP_Endpoint *candidate = (root == 0) ? this : next_; - if (root == 0) + TAO_IIOP_Endpoint *candidate = (root == nullptr) ? this : next_; + if (root == nullptr) root = this; #if defined (ACE_HAS_IPV6) @@ -301,18 +301,18 @@ TAO_IIOP_Endpoint::next_filtered_i (TAO_IIOP_Endpoint *root, } TAO_Endpoint * -TAO_IIOP_Endpoint::duplicate (void) +TAO_IIOP_Endpoint::duplicate () { - TAO_IIOP_Endpoint *endpoint = 0; + TAO_IIOP_Endpoint *endpoint = nullptr; // @@ NOTE: Not exception safe.. - ACE_NEW_RETURN (endpoint, TAO_IIOP_Endpoint (*this), 0); + ACE_NEW_RETURN (endpoint, TAO_IIOP_Endpoint (*this), nullptr); return endpoint; } const ACE_INET_Addr & -TAO_IIOP_Endpoint::object_addr (void) const +TAO_IIOP_Endpoint::object_addr () const { // The object_addr_ is initialized here, rather than at IOR decode // time for several reasons: @@ -338,7 +338,7 @@ TAO_IIOP_Endpoint::object_addr (void) const } void -TAO_IIOP_Endpoint::object_addr_i (void) const +TAO_IIOP_Endpoint::object_addr_i () const { // We should have already held the lock @@ -401,7 +401,7 @@ TAO_IIOP_Endpoint::add_local_endpoint (TAO_IIOP_Endpoint *ep, static void TAO_IIOP_Endpoint_get_ip_interfaces (ACE_Vector<ACE_CString> &local_ips) { - ACE_INET_Addr* tmp = 0; + ACE_INET_Addr* tmp = nullptr; size_t cnt = 0u; int err = ACE::get_ip_interfaces (cnt, tmp); if (err != 0) @@ -414,7 +414,7 @@ TAO_IIOP_Endpoint_get_ip_interfaces (ACE_Vector<ACE_CString> &local_ips) for (size_t i = 0u; i < cnt; ++i) { const char *s_if = tmp[i].get_host_addr (buf, sizeof (buf)); - ACE_ASSERT (s_if != 0); + ACE_ASSERT (s_if != nullptr); ACE_CString tmp (s_if); local_ips.push_back (tmp); } @@ -535,7 +535,7 @@ TAO_IIOP_Endpoint::preferred_interfaces (const char *csv, find_preferred_interfaces(this->host_.in(), csv, preferred); CORBA::ULong count = static_cast<CORBA::ULong> (preferred.size()); size_t i = 0; - while (i < count && ACE_OS::strstr (preferred[i].c_str(), "if=") != 0) + while (i < count && ACE_OS::strstr (preferred[i].c_str(), "if=") != nullptr) { // For now we disregard these with IIOP ++i; @@ -547,7 +547,7 @@ TAO_IIOP_Endpoint::preferred_interfaces (const char *csv, TAO_IIOP_Endpoint* ep = this; for (++i; i < count; ++i) { - if (ACE_OS::strstr (preferred[i].c_str(), "if=") == 0) + if (ACE_OS::strstr (preferred[i].c_str(), "if=") == nullptr) ep = add_local_endpoint (ep, preferred[i].c_str(), profile); } @@ -571,7 +571,7 @@ TAO_IIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) const TAO_IIOP_Endpoint *endpoint = dynamic_cast<const TAO_IIOP_Endpoint *> (other_endpoint); - if (endpoint == 0) + if (endpoint == nullptr) return 0; return (this->port_ == endpoint->port_ @@ -579,7 +579,7 @@ TAO_IIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) } CORBA::ULong -TAO_IIOP_Endpoint::hash (void) +TAO_IIOP_Endpoint::hash () { if (this->hash_val_ != 0) return this->hash_val_; @@ -609,14 +609,14 @@ TAO_IIOP_Endpoint::hash (void) } bool -TAO_IIOP_Endpoint::is_preferred_network (void) const +TAO_IIOP_Endpoint::is_preferred_network () const { - return (this->preferred_path_.host.in () != 0 && + return (this->preferred_path_.host.in () != nullptr && this->preferred_path_.host.in ()[0] != 0); } const char * -TAO_IIOP_Endpoint::preferred_network (void) const +TAO_IIOP_Endpoint::preferred_network () const { return this->preferred_path_.host.in (); } diff --git a/TAO/tao/IIOP_Factory.cpp b/TAO/tao/IIOP_Factory.cpp index 33b614739de..d8155105036 100644 --- a/TAO/tao/IIOP_Factory.cpp +++ b/TAO/tao/IIOP_Factory.cpp @@ -12,12 +12,12 @@ static const char the_prefix[] = "iiop"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_IIOP_Protocol_Factory::TAO_IIOP_Protocol_Factory (void) +TAO_IIOP_Protocol_Factory::TAO_IIOP_Protocol_Factory () : TAO_Protocol_Factory (IOP::TAG_INTERNET_IOP) { } -TAO_IIOP_Protocol_Factory::~TAO_IIOP_Protocol_Factory (void) +TAO_IIOP_Protocol_Factory::~TAO_IIOP_Protocol_Factory () { } @@ -29,25 +29,25 @@ TAO_IIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix) } const char * -TAO_IIOP_Protocol_Factory::prefix (void) const +TAO_IIOP_Protocol_Factory::prefix () const { return ::the_prefix; } char -TAO_IIOP_Protocol_Factory::options_delimiter (void) const +TAO_IIOP_Protocol_Factory::options_delimiter () const { return '/'; } TAO_Acceptor * -TAO_IIOP_Protocol_Factory::make_acceptor (void) +TAO_IIOP_Protocol_Factory::make_acceptor () { - TAO_Acceptor *acceptor = 0; + TAO_Acceptor *acceptor = nullptr; ACE_NEW_RETURN (acceptor, TAO_IIOP_Acceptor, - 0); + nullptr); return acceptor; } @@ -60,18 +60,18 @@ TAO_IIOP_Protocol_Factory::init (int /* argc */, } TAO_Connector * -TAO_IIOP_Protocol_Factory::make_connector (void) +TAO_IIOP_Protocol_Factory::make_connector () { - TAO_Connector *connector = 0; + TAO_Connector *connector = nullptr; ACE_NEW_RETURN (connector, TAO_IIOP_Connector, - 0); + nullptr); return connector; } int -TAO_IIOP_Protocol_Factory::requires_explicit_endpoint (void) const +TAO_IIOP_Protocol_Factory::requires_explicit_endpoint () const { return 0; } diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp index 975605b0641..a33b42085e7 100644 --- a/TAO/tao/IIOP_Profile.cpp +++ b/TAO/tao/IIOP_Profile.cpp @@ -17,14 +17,14 @@ static const char the_prefix[] = "iiop"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_IIOP_Profile::~TAO_IIOP_Profile (void) +TAO_IIOP_Profile::~TAO_IIOP_Profile () { // Clean up the list of endpoints since we own it. // Skip the head, since it is not dynamically allocated. - TAO_Endpoint *tmp = 0; + TAO_Endpoint *tmp = nullptr; for (TAO_Endpoint *next = this->endpoint ()->next (); - next != 0; + next != nullptr; next = tmp) { tmp = next->next (); @@ -35,7 +35,7 @@ TAO_IIOP_Profile::~TAO_IIOP_Profile (void) const char TAO_IIOP_Profile::object_key_delimiter_ = '/'; char -TAO_IIOP_Profile::object_key_delimiter (void) const +TAO_IIOP_Profile::object_key_delimiter () const { return TAO_IIOP_Profile::object_key_delimiter_; } @@ -110,7 +110,7 @@ TAO_IIOP_Profile::decode_profile (TAO_InputCDR& cdr) this->endpoint_.object_addr_.set_type (-1); const char* csv = this->orb_core()->orb_params()->preferred_interfaces(); - if (csv != 0 && *csv != '\0') + if (csv != nullptr && *csv != '\0') { bool const enforce = this->orb_core()->orb_params()->enforce_pref_interfaces(); @@ -130,7 +130,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) const char *okd = ACE_OS::strchr (ior, this->object_key_delimiter_); - if (okd == 0 || okd == ior) + if (okd == nullptr || okd == ior) { // No object key delimiter or no hostname specified. throw ::CORBA::INV_OBJREF ( @@ -144,7 +144,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) CORBA::ULong length_host = 0; const char *cp_pos_overrun = ACE_OS::strchr (ior, ':'); // Look for a port - const char *cp_pos = (cp_pos_overrun < okd) ? cp_pos_overrun : 0; // but before object key + const char *cp_pos = (cp_pos_overrun < okd) ? cp_pos_overrun : nullptr; // but before object key #if defined (ACE_HAS_IPV6) // IPv6 numeric address in host string? bool ipv6_in_host = false; @@ -203,13 +203,13 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) EINVAL), CORBA::COMPLETED_NO); } - else if (cp_pos != 0) + else if (cp_pos != nullptr) { // A port number or port name was specified. CORBA::ULong length_port = ACE_Utils::truncate_cast<CORBA::ULong> (okd - cp_pos - 1); CORBA::String_var tmp = CORBA::string_alloc (length_port); - if (tmp.in() != 0) + if (tmp.in() != nullptr) { ACE_OS::strncpy (tmp.inout (), cp_pos + 1, length_port); tmp[length_port] = '\0'; @@ -220,7 +220,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) this->endpoint_.port_ = 2809; // default IIOP port for // parsing corbaloc strings } - else if (tmp.in () != 0 && ACE_OS::strspn (tmp.in (), "1234567890") == length_port) + else if (tmp.in () != nullptr && ACE_OS::strspn (tmp.in (), "1234567890") == length_port) { this->endpoint_.port_ = static_cast<CORBA::UShort> (ACE_OS::atoi (tmp.in ())); @@ -228,7 +228,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) else { ACE_INET_Addr ia; - if (tmp.in () == 0 || ia.string_to_addr (tmp.in ()) == -1) + if (tmp.in () == nullptr || ia.string_to_addr (tmp.in ()) == -1) { throw ::CORBA::INV_OBJREF ( CORBA::SystemException::_tao_minor_code ( @@ -322,7 +322,7 @@ TAO_IIOP_Profile::do_is_equivalent (const TAO_Profile *other_profile) dynamic_cast<const TAO_IIOP_Profile *> (other_profile); // Make sure we have a TAO_IIOP_Profile. - if (op == 0) + if (op == nullptr) return false; if (this->count_ == 0 && op->count_ == 0) @@ -332,7 +332,7 @@ TAO_IIOP_Profile::do_is_equivalent (const TAO_Profile *other_profile) // Check endpoints equivalence. const TAO_IIOP_Endpoint *other_endp = &op->endpoint_; for (TAO_IIOP_Endpoint *endp = &this->endpoint_; - endp != 0; + endp != nullptr; endp = endp->next_) { if (endp->is_equivalent (other_endp)) @@ -350,7 +350,7 @@ TAO_IIOP_Profile::hash (CORBA::ULong max) // Get the hash value for all endpoints. CORBA::ULong hashval = 0; for (TAO_IIOP_Endpoint *endp = &this->endpoint_; - endp != 0; + endp != nullptr; endp = endp->next_) { hashval += endp->hash (); @@ -374,13 +374,13 @@ TAO_IIOP_Profile::hash (CORBA::ULong max) } TAO_Endpoint* -TAO_IIOP_Profile::endpoint (void) +TAO_IIOP_Profile::endpoint () { return &this->endpoint_; } TAO_Endpoint * -TAO_IIOP_Profile::base_endpoint (void) +TAO_IIOP_Profile::base_endpoint () { // do not call endpoint(), return the value directly. This is to // avoid calling a derived implementation of endpoint(). @@ -388,7 +388,7 @@ TAO_IIOP_Profile::base_endpoint (void) } CORBA::ULong -TAO_IIOP_Profile::endpoint_count (void) const +TAO_IIOP_Profile::endpoint_count () const { return this->count_; } @@ -405,7 +405,7 @@ TAO_IIOP_Profile::add_endpoint (TAO_IIOP_Endpoint *endp) void TAO_IIOP_Profile::remove_endpoint (TAO_IIOP_Endpoint *endp) { - if (endp == 0) + if (endp == nullptr) return; // special handling for the target matching the base endpoint @@ -430,7 +430,7 @@ TAO_IIOP_Profile::remove_endpoint (TAO_IIOP_Endpoint *endp) TAO_IIOP_Endpoint* prev = &this->endpoint_; TAO_IIOP_Endpoint* cur = this->endpoint_.next_; - while (cur != 0) + while (cur != nullptr) { if (cur == endp) break; @@ -438,10 +438,10 @@ TAO_IIOP_Profile::remove_endpoint (TAO_IIOP_Endpoint *endp) cur = cur->next_; } - if (cur != 0) + if (cur != nullptr) { prev->next_ = cur->next_; - cur->next_ = 0; + cur->next_ = nullptr; --this->count_; if (this->last_endpoint_ == cur) { @@ -461,7 +461,7 @@ void TAO_IIOP_Profile::add_generic_endpoint (TAO_Endpoint *endp) { TAO_IIOP_Endpoint *iep = dynamic_cast<TAO_IIOP_Endpoint *>(endp); - if (iep != 0) + if (iep != nullptr) { TAO_IIOP_Endpoint *clone; ACE_NEW (clone, TAO_IIOP_Endpoint(*iep)); @@ -470,7 +470,7 @@ TAO_IIOP_Profile::add_generic_endpoint (TAO_Endpoint *endp) } char * -TAO_IIOP_Profile::to_string (void) const +TAO_IIOP_Profile::to_string () const { // corbaloc:iiop:1.2@host:port,iiop:1.2@host:port,.../key @@ -487,8 +487,8 @@ TAO_IIOP_Profile::to_string (void) const ACE_OS::strlen (::the_prefix) /* "iiop" */ + 1 /* colon separator */); - const TAO_IIOP_Endpoint *endp = 0; - for (endp = &this->endpoint_; endp != 0; endp = endp->next_) + const TAO_IIOP_Endpoint *endp = nullptr; + for (endp = &this->endpoint_; endp != nullptr; endp = endp->next_) { buflen += ( pfx_len + @@ -512,7 +512,7 @@ TAO_IIOP_Profile::to_string (void) const ACE_OS::strcpy(buf, "corbaloc:"); - for (endp = &this->endpoint_; endp != 0; endp = endp->next_) + for (endp = &this->endpoint_; endp != nullptr; endp = endp->next_) { if(&this->endpoint_ != endp) ACE_OS::strcat(buf, ","); @@ -556,7 +556,7 @@ TAO_IIOP_Profile::to_string (void) const } const char * -TAO_IIOP_Profile::prefix (void) +TAO_IIOP_Profile::prefix () { return ::the_prefix; } @@ -606,7 +606,7 @@ TAO_IIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const } int -TAO_IIOP_Profile::encode_alternate_endpoints (void) +TAO_IIOP_Profile::encode_alternate_endpoints () { // encode IOP::TAG_ALTERNATE_IIOP_ADDRESS tags if there are more // than one endpoints to listen to. @@ -662,7 +662,7 @@ TAO_IIOP_Profile::encode_alternate_endpoints (void) tagged_component.component_data.get_buffer (); for (const ACE_Message_Block *iterator = out_cdr.begin (); - iterator != 0; + iterator != nullptr; iterator = iterator->cont ()) { size_t i_length = iterator->length (); @@ -679,7 +679,7 @@ TAO_IIOP_Profile::encode_alternate_endpoints (void) } int -TAO_IIOP_Profile::encode_endpoints (void) +TAO_IIOP_Profile::encode_endpoints () { CORBA::ULong actual_count = 0; @@ -751,7 +751,7 @@ TAO_IIOP_Profile::encode_endpoints (void) int -TAO_IIOP_Profile::decode_endpoints (void) +TAO_IIOP_Profile::decode_endpoints () { IOP::TaggedComponent tagged_component; tagged_component.tag = TAO_TAG_ENDPOINTS; @@ -791,7 +791,7 @@ TAO_IIOP_Profile::decode_endpoints (void) i > 0; --i) { - TAO_IIOP_Endpoint *endpoint = 0; + TAO_IIOP_Endpoint *endpoint = nullptr; ACE_NEW_RETURN (endpoint, TAO_IIOP_Endpoint (endpoints[i].host, endpoints[i].port, @@ -829,7 +829,7 @@ TAO_IIOP_Profile::decode_endpoints (void) if (!(in_cdr >> host.out()) || !(in_cdr >> port)) return -1; - TAO_IIOP_Endpoint *endpoint = 0; + TAO_IIOP_Endpoint *endpoint = nullptr; ACE_NEW_RETURN (endpoint, TAO_IIOP_Endpoint (host.in(), port, diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index d9f835c81bc..bb63d2ce313 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -27,18 +27,18 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler, { } -TAO_IIOP_Transport::~TAO_IIOP_Transport (void) +TAO_IIOP_Transport::~TAO_IIOP_Transport () { } ACE_Event_Handler * -TAO_IIOP_Transport::event_handler_i (void) +TAO_IIOP_Transport::event_handler_i () { return this->connection_handler_; } TAO_Connection_Handler * -TAO_IIOP_Transport::connection_handler_i (void) +TAO_IIOP_Transport::connection_handler_i () { return this->connection_handler_; } @@ -82,7 +82,7 @@ TAO_IIOP_Transport::sendfile (TAO_MMAP_Allocator * allocator, // If we don't have an allocator, fallback to the regular way of sending // data - if (allocator == 0) + if (allocator == nullptr) return this->send (iov, iovcnt, bytes_transferred, this->io_timeout(dc)); // We can only use sendfile when all data is coming from the mmap allocator, @@ -207,7 +207,7 @@ TAO_IIOP_Transport::send_request (TAO_Stub *stub, if (this->send_message (stream, stub, - 0, + nullptr, message_semantics, max_wait_time) == -1) { @@ -341,7 +341,7 @@ TAO_IIOP_Transport::get_listen_point ( TAO_IIOP_Acceptor *iiop_acceptor = dynamic_cast<TAO_IIOP_Acceptor *> (acceptor); - if (iiop_acceptor == 0) + if (iiop_acceptor == nullptr) return -1; // Get the array of endpoints serviced by TAO_IIOP_Acceptor diff --git a/TAO/tao/IORInterceptor_Adapter.cpp b/TAO/tao/IORInterceptor_Adapter.cpp index c4b785595ab..48b8f0e9bf6 100644 --- a/TAO/tao/IORInterceptor_Adapter.cpp +++ b/TAO/tao/IORInterceptor_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_IORInterceptor_Adapter::~TAO_IORInterceptor_Adapter (void) +TAO_IORInterceptor_Adapter::~TAO_IORInterceptor_Adapter () { } diff --git a/TAO/tao/IORInterceptor_Adapter_Factory.cpp b/TAO/tao/IORInterceptor_Adapter_Factory.cpp index 4a1b09b31b3..280fc46ab4a 100644 --- a/TAO/tao/IORInterceptor_Adapter_Factory.cpp +++ b/TAO/tao/IORInterceptor_Adapter_Factory.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_IORInterceptor_Adapter_Factory::~TAO_IORInterceptor_Adapter_Factory (void) +TAO_IORInterceptor_Adapter_Factory::~TAO_IORInterceptor_Adapter_Factory () { } diff --git a/TAO/tao/IOR_Parser.cpp b/TAO/tao/IOR_Parser.cpp index 7049b1b6ff0..cee044f8785 100644 --- a/TAO/tao/IOR_Parser.cpp +++ b/TAO/tao/IOR_Parser.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_IOR_Parser::~TAO_IOR_Parser (void) +TAO_IOR_Parser::~TAO_IOR_Parser () { } diff --git a/TAO/tao/Incoming_Message_Queue.cpp b/TAO/tao/Incoming_Message_Queue.cpp index 4b9048426ec..5622b387571 100644 --- a/TAO/tao/Incoming_Message_Queue.cpp +++ b/TAO/tao/Incoming_Message_Queue.cpp @@ -11,7 +11,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Incoming_Message_Queue::~TAO_Incoming_Message_Queue (void) +TAO_Incoming_Message_Queue::~TAO_Incoming_Message_Queue () { CORBA::ULong const sz = this->size_; @@ -27,10 +27,10 @@ TAO_Incoming_Message_Queue::~TAO_Incoming_Message_Queue (void) TAO_Queued_Data * -TAO_Incoming_Message_Queue::dequeue_head (void) +TAO_Incoming_Message_Queue::dequeue_head () { if (this->size_ == 0) - return 0; + return nullptr; // Get the node on the head of the queue... TAO_Queued_Data * const head = this->last_added_->next (); @@ -40,17 +40,17 @@ TAO_Incoming_Message_Queue::dequeue_head (void) // Decrease the size and reset last_added_ if empty if (--this->size_ == 0) - this->last_added_ = 0; + this->last_added_ = nullptr; return head; } TAO_Queued_Data * -TAO_Incoming_Message_Queue::dequeue_tail (void) +TAO_Incoming_Message_Queue::dequeue_tail () { // This is a bit painful stuff... if (this->size_ == 0) - return 0; + return nullptr; // Get the node on the head of the queue... TAO_Queued_Data *head = this->last_added_->next (); @@ -69,7 +69,7 @@ TAO_Incoming_Message_Queue::dequeue_tail (void) // Decrease the size if (--this->size_ == 0) - this->last_added_ = 0; + this->last_added_ = nullptr; return ret_qd; } diff --git a/TAO/tao/Invocation_Adapter.cpp b/TAO/tao/Invocation_Adapter.cpp index e9e71701152..78b9eaafbfd 100644 --- a/TAO/tao/Invocation_Adapter.cpp +++ b/TAO/tao/Invocation_Adapter.cpp @@ -25,7 +25,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { - Invocation_Adapter::~Invocation_Adapter (void) + Invocation_Adapter::~Invocation_Adapter () { } @@ -63,7 +63,7 @@ namespace TAO // Initial state TAO::Invocation_Status status = TAO_INVOKE_START; - ACE_Time_Value *max_wait_time = 0; + ACE_Time_Value *max_wait_time = nullptr; ACE_Time_Value tmp_wait_time = ACE_Time_Value::zero; if (this->get_timeout (stub, tmp_wait_time)) { @@ -139,11 +139,11 @@ namespace TAO } TAO_Stub * - Invocation_Adapter::get_stub (void) const + Invocation_Adapter::get_stub () const { TAO_Stub * const stub = this->target_->_stubobj (); - if (stub == 0) + if (stub == nullptr) { if (TAO_debug_level > 0) { @@ -365,7 +365,7 @@ namespace TAO { // The object pointer has to be changed to a TAO_Stub pointer // in order to obtain the profiles. - TAO_Stub *stubobj = 0; + TAO_Stub *stubobj = nullptr; bool nil_forward_ref = false; if (CORBA::is_nil (effective_target.in ())) @@ -385,7 +385,7 @@ namespace TAO 0), CORBA::COMPLETED_NO); - if (stubobj == 0) + if (stubobj == nullptr) throw ::CORBA::INTERNAL ( CORBA::SystemException::_tao_minor_code ( TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE, @@ -395,7 +395,7 @@ namespace TAO // Reset the profile in the stubs stub->add_forward_profiles (stubobj->base_profiles (), permanent_forward); - if (stub->next_profile () == 0) + if (stub->next_profile () == nullptr) throw ::CORBA::TRANSIENT ( CORBA::SystemException::_tao_minor_code ( TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE, @@ -409,7 +409,7 @@ namespace TAO TAO::Collocation_Strategy strategy = TAO::TAO_CS_REMOTE_STRATEGY; TAO_Stub *stub = object->_stubobj (); if (!CORBA::is_nil (stub->servant_orb_var ().in ()) && - stub->servant_orb_var ()->orb_core () != 0) + stub->servant_orb_var ()->orb_core () != nullptr) { TAO_ORB_Core *orb_core = stub->servant_orb_var ()->orb_core (); @@ -447,7 +447,7 @@ namespace TAO { if (ACE_BIT_ENABLED (this->collocation_opportunity_, TAO::TAO_CO_DIRECT_STRATEGY) - && (object->_servant () != 0)) + && (object->_servant () != nullptr)) { strategy = TAO::TAO_CS_DIRECT_STRATEGY; } @@ -474,7 +474,7 @@ namespace TAO { if (ACE_BIT_ENABLED (this->collocation_opportunity_, TAO::TAO_CO_DIRECT_STRATEGY) - && (object->_servant () != 0)) + && (object->_servant () != nullptr)) { strategy = TAO::TAO_CS_DIRECT_STRATEGY; } diff --git a/TAO/tao/Invocation_Base.cpp b/TAO/tao/Invocation_Base.cpp index 8571d40c0b5..0af8f490d8f 100644 --- a/TAO/tao/Invocation_Base.cpp +++ b/TAO/tao/Invocation_Base.cpp @@ -33,7 +33,7 @@ namespace TAO bool response_expected, bool TAO_INTERCEPTOR (request_is_remote)) : details_ (details) - , forwarded_to_ (0) + , forwarded_to_ (nullptr) , response_expected_ (response_expected) , reply_status_ (GIOP::NO_EXCEPTION) , otarget_ (ot) @@ -44,33 +44,33 @@ namespace TAO , sri_adapter_ (stub_->orb_core ()->serverrequestinterceptor_adapter ()) , stack_size_ (0) , invoke_status_ (TAO_INVOKE_START) - , caught_exception_ (0) + , caught_exception_ (nullptr) , is_remote_request_ (request_is_remote) #endif /* TAO_HAS_INTERCEPTORS == 1 */ { } - Invocation_Base::~Invocation_Base (void) + Invocation_Base::~Invocation_Base () { - TAO_INTERCEPTOR (cri_adapter_= 0); - TAO_INTERCEPTOR (sri_adapter_= 0); + TAO_INTERCEPTOR (cri_adapter_= nullptr); + TAO_INTERCEPTOR (sri_adapter_= nullptr); } TAO_Service_Context & - Invocation_Base::request_service_context (void) + Invocation_Base::request_service_context () { return this->details_.request_service_context (); } TAO_Service_Context & - Invocation_Base::reply_service_context (void) + Invocation_Base::reply_service_context () { return this->details_.reply_service_context (); } #if TAO_HAS_INTERCEPTORS == 1 Invocation_Status - Invocation_Base::send_request_interception (void) + Invocation_Base::send_request_interception () { if (cri_adapter_) { @@ -105,7 +105,7 @@ namespace TAO } Invocation_Status - Invocation_Base::receive_reply_interception (void) + Invocation_Base::receive_reply_interception () { if (cri_adapter_) { @@ -137,7 +137,7 @@ namespace TAO } Invocation_Status - Invocation_Base::receive_other_interception (void) + Invocation_Base::receive_other_interception () { if (cri_adapter_) { @@ -199,7 +199,7 @@ namespace TAO } PortableInterceptor::ReplyStatus - Invocation_Base::handle_all_exception (void) + Invocation_Base::handle_all_exception () { this->exception (&unknown_exception); @@ -224,9 +224,9 @@ namespace TAO void Invocation_Base::exception (CORBA::Exception *exception) { - if (CORBA::SystemException::_downcast (exception) != 0) + if (CORBA::SystemException::_downcast (exception) != nullptr) this->invoke_status_ = TAO::TAO_INVOKE_SYSTEM_EXCEPTION; - else if (CORBA::UserException::_downcast (exception) != 0) + else if (CORBA::UserException::_downcast (exception) != nullptr) this->invoke_status_ = TAO::TAO_INVOKE_USER_EXCEPTION; this->forwarded_to_ = CORBA::Object::_nil (); @@ -235,7 +235,7 @@ namespace TAO } PortableInterceptor::ReplyStatus - Invocation_Base::pi_reply_status (void) const + Invocation_Base::pi_reply_status () const { if (cri_adapter_) { diff --git a/TAO/tao/Invocation_Endpoint_Selectors.cpp b/TAO/tao/Invocation_Endpoint_Selectors.cpp index 913169b2ad6..9d4999cbd25 100644 --- a/TAO/tao/Invocation_Endpoint_Selectors.cpp +++ b/TAO/tao/Invocation_Endpoint_Selectors.cpp @@ -10,13 +10,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Invocation_Endpoint_Selector::~TAO_Invocation_Endpoint_Selector (void) +TAO_Invocation_Endpoint_Selector::~TAO_Invocation_Endpoint_Selector () { } // **************************************************************** -TAO_Default_Endpoint_Selector::~TAO_Default_Endpoint_Selector (void) +TAO_Default_Endpoint_Selector::~TAO_Default_Endpoint_Selector () { } @@ -55,7 +55,7 @@ TAO_Default_Endpoint_Selector::select_endpoint (TAO::Profile_Transport_Resolver } for (TAO_Endpoint *ep = r->profile ()->first_filtered_endpoint (); - ep != 0; + ep != nullptr; ep = r->profile ()->next_filtered_endpoint (ep)) { TAO_Base_Transport_Property desc (ep); diff --git a/TAO/tao/Invocation_Retry_Params.cpp b/TAO/tao/Invocation_Retry_Params.cpp index 48519b3ea0f..c900114d007 100644 --- a/TAO/tao/Invocation_Retry_Params.cpp +++ b/TAO/tao/Invocation_Retry_Params.cpp @@ -4,7 +4,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::Invocation_Retry_Params::Invocation_Retry_Params (void) +TAO::Invocation_Retry_Params::Invocation_Retry_Params () : forward_on_reply_closed_limit_ (0) , init_retry_delay_ (0, 100000) // Set default to 0.1 seconds { diff --git a/TAO/tao/LF_CH_Event.cpp b/TAO/tao/LF_CH_Event.cpp index 9c168b12f9c..d3ae6c39d35 100644 --- a/TAO/tao/LF_CH_Event.cpp +++ b/TAO/tao/LF_CH_Event.cpp @@ -6,14 +6,14 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_CH_Event::TAO_LF_CH_Event (void) +TAO_LF_CH_Event::TAO_LF_CH_Event () : TAO_LF_Event (), prev_state_ (TAO_LF_Event::LFS_IDLE) { } -TAO_LF_CH_Event::~TAO_LF_CH_Event (void) +TAO_LF_CH_Event::~TAO_LF_CH_Event () { } @@ -39,7 +39,7 @@ TAO_LF_CH_Event::state_changed_i (LFS_STATE new_state) if (TAO_debug_level > 9) { size_t id = 0; - TAO_Connection_Handler *ch = 0; + TAO_Connection_Handler *ch = nullptr; if ((ch = dynamic_cast<TAO_Connection_Handler *> (this)) && ch->transport ()) { @@ -109,7 +109,7 @@ TAO_LF_CH_Event::validate_state_change (LFS_STATE new_state) } bool -TAO_LF_CH_Event::successful_i (void) const +TAO_LF_CH_Event::successful_i () const { if (this->prev_state_ == TAO_LF_Event::LFS_CONNECTION_WAIT) return this->state_ == TAO_LF_Event::LFS_SUCCESS; @@ -118,7 +118,7 @@ TAO_LF_CH_Event::successful_i (void) const } bool -TAO_LF_CH_Event::error_detected_i (void) const +TAO_LF_CH_Event::error_detected_i () const { if (this->prev_state_ == TAO_LF_Event::LFS_CONNECTION_WAIT) return this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED; @@ -137,7 +137,7 @@ TAO_LF_CH_Event::set_state (LFS_STATE new_state) if (TAO_debug_level > 9) { size_t id = 0; - TAO_Connection_Handler *ch = 0; + TAO_Connection_Handler *ch = nullptr; if ((ch = dynamic_cast<TAO_Connection_Handler *> (this)) && ch->transport ()) { @@ -150,7 +150,7 @@ TAO_LF_CH_Event::set_state (LFS_STATE new_state) } bool -TAO_LF_CH_Event::is_state_final (void) const +TAO_LF_CH_Event::is_state_final () const { return this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED; } diff --git a/TAO/tao/LF_Connect_Strategy.cpp b/TAO/tao/LF_Connect_Strategy.cpp index 8bc6dce0c6c..b59e184e042 100644 --- a/TAO/tao/LF_Connect_Strategy.cpp +++ b/TAO/tao/LF_Connect_Strategy.cpp @@ -17,7 +17,7 @@ TAO_LF_Connect_Strategy::TAO_LF_Connect_Strategy (TAO_ORB_Core *orb_core, { } -TAO_LF_Connect_Strategy::~TAO_LF_Connect_Strategy (void) +TAO_LF_Connect_Strategy::~TAO_LF_Connect_Strategy () { } @@ -25,7 +25,7 @@ void TAO_LF_Connect_Strategy::synch_options (ACE_Time_Value *timeout, ACE_Synch_Options &options) { - if (timeout != 0) + if (timeout != nullptr) { options.set (ACE_Synch_Options::USE_REACTOR, *timeout); } @@ -41,7 +41,7 @@ TAO_LF_Connect_Strategy::wait_i (TAO_LF_Event *ev, TAO_Transport *transport, ACE_Time_Value *max_wait_time) { - if (transport == 0) + if (transport == nullptr) return -1; TAO::Nested_Upcall_Guard guard(transport, this->no_upcall_); diff --git a/TAO/tao/LF_Event.cpp b/TAO/tao/LF_Event.cpp index 16139aeb985..d8cf240ce1c 100644 --- a/TAO/tao/LF_Event.cpp +++ b/TAO/tao/LF_Event.cpp @@ -10,13 +10,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Event::TAO_LF_Event (void) +TAO_LF_Event::TAO_LF_Event () : state_ (TAO_LF_Event::LFS_IDLE) - , follower_ (0) + , follower_ (nullptr) { } -TAO_LF_Event::~TAO_LF_Event (void) +TAO_LF_Event::~TAO_LF_Event () { } @@ -30,7 +30,7 @@ TAO_LF_Event::state_changed (LFS_STATE new_state, TAO_Leader_Follower &lf) this->state_changed_i (new_state); /// Sort of double-checked optimization.. - if (this->follower_ != 0) + if (this->follower_ != nullptr) this->follower_->signal (); } } diff --git a/TAO/tao/LF_Event_Binder.cpp b/TAO/tao/LF_Event_Binder.cpp index 7a052e90f2a..1d916f80544 100644 --- a/TAO/tao/LF_Event_Binder.cpp +++ b/TAO/tao/LF_Event_Binder.cpp @@ -6,7 +6,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Event_Binder::~TAO_LF_Event_Binder (void) +TAO_LF_Event_Binder::~TAO_LF_Event_Binder () { this->event_->unbind (follower_); } diff --git a/TAO/tao/LF_Follower.cpp b/TAO/tao/LF_Follower.cpp index b1bf0a45bff..9f57ef471d8 100644 --- a/TAO/tao/LF_Follower.cpp +++ b/TAO/tao/LF_Follower.cpp @@ -13,12 +13,12 @@ TAO_LF_Follower::TAO_LF_Follower (TAO_Leader_Follower &leader_follower) { } -TAO_LF_Follower::~TAO_LF_Follower (void) +TAO_LF_Follower::~TAO_LF_Follower () { } int -TAO_LF_Follower::signal (void) +TAO_LF_Follower::signal () { // We *must* remove ourselves from the list of followers, otherwise // we could get signaled twice: to wake up as a follower and as the diff --git a/TAO/tao/LF_Follower_Auto_Adder.cpp b/TAO/tao/LF_Follower_Auto_Adder.cpp index 69e26eb5caf..ec4d4ddd668 100644 --- a/TAO/tao/LF_Follower_Auto_Adder.cpp +++ b/TAO/tao/LF_Follower_Auto_Adder.cpp @@ -6,7 +6,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Follower_Auto_Adder::~TAO_LF_Follower_Auto_Adder (void) +TAO_LF_Follower_Auto_Adder::~TAO_LF_Follower_Auto_Adder () { this->leader_follower_.remove_follower (this->follower_); } diff --git a/TAO/tao/LF_Follower_Auto_Ptr.cpp b/TAO/tao/LF_Follower_Auto_Ptr.cpp index 87aa0780e6c..6d3adc40080 100644 --- a/TAO/tao/LF_Follower_Auto_Ptr.cpp +++ b/TAO/tao/LF_Follower_Auto_Ptr.cpp @@ -7,7 +7,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Follower_Auto_Ptr::~TAO_LF_Follower_Auto_Ptr (void) +TAO_LF_Follower_Auto_Ptr::~TAO_LF_Follower_Auto_Ptr () { this->leader_follower_.release_follower (this->follower_); } diff --git a/TAO/tao/LF_Invocation_Event.cpp b/TAO/tao/LF_Invocation_Event.cpp index 16964032c5b..7c627c4cdfb 100644 --- a/TAO/tao/LF_Invocation_Event.cpp +++ b/TAO/tao/LF_Invocation_Event.cpp @@ -3,12 +3,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Invocation_Event::TAO_LF_Invocation_Event (void) +TAO_LF_Invocation_Event::TAO_LF_Invocation_Event () : TAO_LF_Event () { } -TAO_LF_Invocation_Event::~TAO_LF_Invocation_Event (void) +TAO_LF_Invocation_Event::~TAO_LF_Invocation_Event () { } @@ -62,13 +62,13 @@ TAO_LF_Invocation_Event::state_changed_i (LFS_STATE new_state) } bool -TAO_LF_Invocation_Event::successful_i (void) const +TAO_LF_Invocation_Event::successful_i () const { return this->state_ == TAO_LF_Event::LFS_SUCCESS; } bool -TAO_LF_Invocation_Event::error_detected_i (void) const +TAO_LF_Invocation_Event::error_detected_i () const { return (this->state_ == TAO_LF_Event::LFS_FAILURE || this->state_ == TAO_LF_Event::LFS_TIMEOUT @@ -76,7 +76,7 @@ TAO_LF_Invocation_Event::error_detected_i (void) const } bool -TAO_LF_Invocation_Event::is_state_final (void) const +TAO_LF_Invocation_Event::is_state_final () const { if (this->state_ == TAO_LF_Event::LFS_TIMEOUT || this->state_ == TAO_LF_Event::LFS_FAILURE) diff --git a/TAO/tao/LF_Multi_Event.cpp b/TAO/tao/LF_Multi_Event.cpp index 4d15cfa1e0e..244ea609a55 100644 --- a/TAO/tao/LF_Multi_Event.cpp +++ b/TAO/tao/LF_Multi_Event.cpp @@ -5,16 +5,16 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Multi_Event::TAO_LF_Multi_Event (void) +TAO_LF_Multi_Event::TAO_LF_Multi_Event () : TAO_LF_Event (), - events_ (0), - winner_ (0) + events_ (nullptr), + winner_ (nullptr) { } -TAO_LF_Multi_Event::~TAO_LF_Multi_Event (void) +TAO_LF_Multi_Event::~TAO_LF_Multi_Event () { - while (this->events_ != 0) + while (this->events_ != nullptr) { Event_Node *n = this->events_->next_; delete this->events_; @@ -30,7 +30,7 @@ TAO_LF_Multi_Event::bind (TAO_LF_Follower *follower) return -1; } - for (Event_Node *n = this->events_; n != 0; n = n->next_) + for (Event_Node *n = this->events_; n != nullptr; n = n->next_) if (n->ptr_->bind(follower) == -1) { return -1; @@ -46,7 +46,7 @@ TAO_LF_Multi_Event::unbind (TAO_LF_Follower *follower) return -1; } - for (Event_Node *n = this->events_; n != 0; n = n->next_) + for (Event_Node *n = this->events_; n != nullptr; n = n->next_) if (n->ptr_->unbind (follower) == -1) { return -1; @@ -58,7 +58,7 @@ TAO_LF_Multi_Event::unbind (TAO_LF_Follower *follower) void TAO_LF_Multi_Event::add_event (TAO_Connection_Handler *ev) { - Event_Node *node = 0; + Event_Node *node = nullptr; ACE_NEW (node, Event_Node); node->next_ = this->events_; node->ptr_ = ev; @@ -67,21 +67,21 @@ TAO_LF_Multi_Event::add_event (TAO_Connection_Handler *ev) } TAO_Connection_Handler* -TAO_LF_Multi_Event::winner (void) +TAO_LF_Multi_Event::winner () { return this->winner_; } TAO_Transport * -TAO_LF_Multi_Event::base_transport (void) +TAO_LF_Multi_Event::base_transport () { - return (this->events_ == 0) ? 0 : this->events_->ptr_->transport(); + return (this->events_ == nullptr) ? nullptr : this->events_->ptr_->transport(); } bool -TAO_LF_Multi_Event::successful_i (void) const +TAO_LF_Multi_Event::successful_i () const { - for (Event_Node *n = this->events_; n != 0; n = n->next_) + for (Event_Node *n = this->events_; n != nullptr; n = n->next_) if (n->ptr_->successful_i()) { this->winner_ = n->ptr_; @@ -91,9 +91,9 @@ TAO_LF_Multi_Event::successful_i (void) const } bool -TAO_LF_Multi_Event::error_detected_i (void) const +TAO_LF_Multi_Event::error_detected_i () const { - for (Event_Node *n = this->events_; n != 0; n = n->next_) + for (Event_Node *n = this->events_; n != nullptr; n = n->next_) { if (!n->ptr_->error_detected_i ()) { @@ -109,9 +109,9 @@ TAO_LF_Multi_Event::state_changed_i (LFS_STATE ) } bool -TAO_LF_Multi_Event::is_state_final (void) const +TAO_LF_Multi_Event::is_state_final () const { - for (Event_Node *n = this->events_; n != 0; n = n->next_) + for (Event_Node *n = this->events_; n != nullptr; n = n->next_) { if (!n->ptr_->is_state_final ()) { diff --git a/TAO/tao/LF_Strategy.cpp b/TAO/tao/LF_Strategy.cpp index 327816a7a94..a1c4293458c 100644 --- a/TAO/tao/LF_Strategy.cpp +++ b/TAO/tao/LF_Strategy.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Strategy::~TAO_LF_Strategy (void) +TAO_LF_Strategy::~TAO_LF_Strategy () { } diff --git a/TAO/tao/LF_Strategy_Complete.cpp b/TAO/tao/LF_Strategy_Complete.cpp index 96628848401..1b7d4e4c60c 100644 --- a/TAO/tao/LF_Strategy_Complete.cpp +++ b/TAO/tao/LF_Strategy_Complete.cpp @@ -6,7 +6,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_LF_Strategy_Complete::~TAO_LF_Strategy_Complete (void) +TAO_LF_Strategy_Complete::~TAO_LF_Strategy_Complete () { } diff --git a/TAO/tao/LRU_Connection_Purging_Strategy.cpp b/TAO/tao/LRU_Connection_Purging_Strategy.cpp index 3ed8ef1a4e3..57482d1a29f 100644 --- a/TAO/tao/LRU_Connection_Purging_Strategy.cpp +++ b/TAO/tao/LRU_Connection_Purging_Strategy.cpp @@ -11,7 +11,7 @@ TAO_LRU_Connection_Purging_Strategy::TAO_LRU_Connection_Purging_Strategy ( } -TAO_LRU_Connection_Purging_Strategy::~TAO_LRU_Connection_Purging_Strategy (void) +TAO_LRU_Connection_Purging_Strategy::~TAO_LRU_Connection_Purging_Strategy () { } diff --git a/TAO/tao/Leader_Follower.cpp b/TAO/tao/Leader_Follower.cpp index 62b3527edd8..7baf6687771 100644 --- a/TAO/tao/Leader_Follower.cpp +++ b/TAO/tao/Leader_Follower.cpp @@ -30,7 +30,7 @@ ACE_Event_Handler* TAO_Leader_Follower::Deferred_Event::handler () const return this->eh_.handler (); } -TAO_Leader_Follower::~TAO_Leader_Follower (void) +TAO_Leader_Follower::~TAO_Leader_Follower () { while (!this->deferred_event_set_.is_empty ()) { @@ -49,19 +49,19 @@ TAO_Leader_Follower::~TAO_Leader_Follower (void) else this->orb_core_->resource_factory ()->reclaim_reactor (this->reactor_); - this->reactor_ = 0; + this->reactor_ = nullptr; } TAO_LF_Follower * -TAO_Leader_Follower::allocate_follower (void) +TAO_Leader_Follower::allocate_follower () { if (!this->follower_free_list_.is_empty ()) return this->follower_free_list_.pop_front (); - TAO_LF_Follower* ptr = 0; + TAO_LF_Follower* ptr = nullptr; ACE_NEW_RETURN (ptr, TAO_LF_Follower (*this), - 0); + nullptr); return ptr; } @@ -72,7 +72,7 @@ TAO_Leader_Follower::release_follower (TAO_LF_Follower *follower) } int -TAO_Leader_Follower::elect_new_leader_i (void) +TAO_Leader_Follower::elect_new_leader_i () { TAO_LF_Follower* const follower = this->follower_set_.head (); @@ -97,7 +97,7 @@ TAO_Leader_Follower::wait_for_client_leader_to_complete (ACE_Time_Value *max_wai while (this->client_thread_is_leader_ && result != -1) { - if (max_wait_time == 0) + if (max_wait_time == nullptr) { if (this->event_loop_threads_condition_.wait () == -1) { @@ -134,12 +134,12 @@ TAO_Leader_Follower::wait_for_client_leader_to_complete (ACE_Time_Value *max_wai } ACE_Reactor * -TAO_Leader_Follower::reactor (void) +TAO_Leader_Follower::reactor () { - if (this->reactor_ == 0) + if (this->reactor_ == nullptr) { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock (), 0); - if (this->reactor_ == 0) + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock (), nullptr); + if (this->reactor_ == nullptr) { // use GUI reactor factory if available if ( this->orb_core_->gui_resource_factory () ) @@ -154,7 +154,7 @@ TAO_Leader_Follower::reactor (void) } void -TAO_Leader_Follower::set_client_thread (void) +TAO_Leader_Follower::set_client_thread () { // If we were a leader thread or an event loop thread, give up // leadership. @@ -178,7 +178,7 @@ TAO_Leader_Follower::set_client_thread (void) } void -TAO_Leader_Follower::reset_client_thread (void) +TAO_Leader_Follower::reset_client_thread () { // If we were a leader thread or an event loop thread, take back // leadership. @@ -211,7 +211,7 @@ TAO_Leader_Follower::defer_event (ACE_Event_Handler* eh) ACE_TEXT ("TAO (%P|%t) - TAO_Leader_Follower::defer_event, ") ACE_TEXT ("deferring event handler[%d]\n"), eh->get_handle ())); - Deferred_Event* ptr = 0; + Deferred_Event* ptr = nullptr; ACE_NEW_RETURN (ptr, Deferred_Event (eh), -1); @@ -265,7 +265,7 @@ TAO_Leader_Follower::wait_for_event (TAO_LF_Event *event, // in PathFinder size_t t_id = 0; - if (TAO_debug_level && transport != 0) + if (TAO_debug_level && transport != nullptr) { t_id = transport->id (); } @@ -283,7 +283,7 @@ TAO_Leader_Follower::wait_for_event (TAO_LF_Event *event, // leader loop below can end, other than the event being complete while (event->keep_waiting_i () && !(result == 0 && - max_wait_time != 0 && + max_wait_time != nullptr && *max_wait_time == ACE_Time_Value::zero) && result != -1) { // Scope #2: threads here alternate between being leader/followers @@ -296,7 +296,7 @@ TAO_Leader_Follower::wait_for_event (TAO_LF_Event *event, // Grab a follower: TAO_LF_Follower_Auto_Ptr follower (*this); - if (follower.get () == 0) + if (follower.get () == nullptr) return -1; if (TAO_debug_level >= 5) @@ -338,7 +338,7 @@ TAO_Leader_Follower::wait_for_event (TAO_LF_Event *event, // lost. TAO_LF_Follower_Auto_Adder auto_adder (*this, follower); - if (max_wait_time == 0) + if (max_wait_time == nullptr) { if (follower->wait (max_wait_time) == -1) { @@ -506,7 +506,7 @@ TAO_Leader_Follower::wait_for_event (TAO_LF_Event *event, // Did we timeout? If so, stop running the loop. if (result == 0 && - max_wait_time != 0 && + max_wait_time != nullptr && *max_wait_time == ACE_Time_Value::zero) break; @@ -600,7 +600,7 @@ TAO_Leader_Follower::wait_for_event (TAO_LF_Event *event, -1); // Return an error if there was a problem receiving the reply... - if (max_wait_time != 0) + if (max_wait_time != nullptr) { if (!event->successful_i () && *max_wait_time == ACE_Time_Value::zero) diff --git a/TAO/tao/Leader_Follower_Flushing_Strategy.cpp b/TAO/tao/Leader_Follower_Flushing_Strategy.cpp index 0c2763b1a84..ed8f4654227 100644 --- a/TAO/tao/Leader_Follower_Flushing_Strategy.cpp +++ b/TAO/tao/Leader_Follower_Flushing_Strategy.cpp @@ -48,7 +48,7 @@ TAO_Leader_Follower_Flushing_Strategy::flush_transport ( // transport we're coping with here and this thread will block. // Instead we do run for a small amount of time and then recheck // the queue. - if (max_wait_time == 0) + if (max_wait_time == nullptr) { ACE_Errno_Guard eguard (errno); @@ -61,7 +61,7 @@ TAO_Leader_Follower_Flushing_Strategy::flush_transport ( orb_core->orb ()->perform_work (max_wait_time); } - if (max_wait_time != 0) { + if (max_wait_time != nullptr) { if (*max_wait_time <= ACE_Time_Value::zero) { errno = ETIME; return -1; diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp index 9ddb386e204..0d806c12689 100644 --- a/TAO/tao/LocalObject.cpp +++ b/TAO/tao/LocalObject.cpp @@ -13,7 +13,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -CORBA::LocalObject::~LocalObject (void) +CORBA::LocalObject::~LocalObject () { } @@ -50,7 +50,7 @@ CORBA::LocalObject::_is_equivalent (CORBA::Object_ptr other_obj) TAO::ObjectKey * -CORBA::LocalObject::_key (void) +CORBA::LocalObject::_key () { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -66,14 +66,14 @@ CORBA::LocalObject::_key (void) // the latter case, return FALSE. CORBA::Boolean -CORBA::LocalObject::_non_existent (void) +CORBA::LocalObject::_non_existent () { // Always return false. return false; } char * -CORBA::LocalObject::_repository_id (void) +CORBA::LocalObject::_repository_id () { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -126,7 +126,7 @@ CORBA::LocalObject::_request (const char *) } CORBA::Object_ptr -CORBA::LocalObject::_get_component (void) +CORBA::LocalObject::_get_component () { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -136,7 +136,7 @@ CORBA::LocalObject::_get_component (void) } CORBA::InterfaceDef_ptr -CORBA::LocalObject::_get_interface (void) +CORBA::LocalObject::_get_interface () { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -204,7 +204,7 @@ CORBA::LocalObject::_validate_connection (CORBA::PolicyList_out) #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ CORBA::ORB_ptr -CORBA::LocalObject::_get_orb (void) +CORBA::LocalObject::_get_orb () { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, diff --git a/TAO/tao/LocateRequest_Invocation.cpp b/TAO/tao/LocateRequest_Invocation.cpp index deff77755ff..55fba329255 100644 --- a/TAO/tao/LocateRequest_Invocation.cpp +++ b/TAO/tao/LocateRequest_Invocation.cpp @@ -34,7 +34,7 @@ namespace TAO public: First_Request_Guard (TAO_Transport &transport); - ~First_Request_Guard (void); + ~First_Request_Guard (); private: /// The transport that we guard. @@ -50,7 +50,7 @@ namespace TAO this->is_first_ = this->transport_.first_request (); } - First_Request_Guard::~First_Request_Guard (void) + First_Request_Guard::~First_Request_Guard () { this->transport_.first_request_sent (this->is_first_); } @@ -71,7 +71,7 @@ namespace TAO { TAO::ORB_Countdown_Time countdown (max_wait_time); - TAO_Synch_Reply_Dispatcher *rd_p = 0; + TAO_Synch_Reply_Dispatcher *rd_p = nullptr; ACE_NEW_NORETURN (rd_p, TAO_Synch_Reply_Dispatcher (this->resolver_.stub ()->orb_core (), this->details_.reply_service_info ())); if (!rd_p) @@ -148,7 +148,7 @@ namespace TAO TAO_InputCDR &cdr = rd.reply_cdr (); // Set the translators - this->resolver_.transport ()->assign_translators (&cdr, 0); + this->resolver_.transport ()->assign_translators (&cdr, nullptr); switch (rd.locate_reply_status ()) { diff --git a/TAO/tao/LocateRequest_Invocation_Adapter.cpp b/TAO/tao/LocateRequest_Invocation_Adapter.cpp index 531dba39b28..e7920ac5439 100644 --- a/TAO/tao/LocateRequest_Invocation_Adapter.cpp +++ b/TAO/tao/LocateRequest_Invocation_Adapter.cpp @@ -18,19 +18,19 @@ namespace TAO LocateRequest_Invocation_Adapter::LocateRequest_Invocation_Adapter ( CORBA::Object_ptr target) : target_ (target) - , list_ (0) + , list_ (nullptr) { } void - LocateRequest_Invocation_Adapter::invoke (void) + LocateRequest_Invocation_Adapter::invoke () { CORBA::Object_var effective_target = CORBA::Object::_duplicate (this->target_); TAO_Stub * const stub = this->target_->_stubobj (); - if (stub == 0) + if (stub == nullptr) throw ::CORBA::INTERNAL ( CORBA::SystemException::_tao_minor_code ( 0, @@ -45,7 +45,7 @@ namespace TAO ACE_Service_Config_Guard scg (stub->orb_core ()->configuration ()); ACE_Time_Value tmp_wait_time; - ACE_Time_Value *max_wait_time = 0; + ACE_Time_Value *max_wait_time = nullptr; if (this->get_timeout (tmp_wait_time)) max_wait_time = &tmp_wait_time; @@ -70,7 +70,7 @@ namespace TAO // Dummy operation details that is used to instantiate the // LocateRequest class. - TAO_Operation_Details op (0, 0); + TAO_Operation_Details op (nullptr, 0); op.request_id (resolver.transport ()->tms ()->request_id ()); TAO::LocateRequest_Invocation synch (this->target_, resolver, op); @@ -101,7 +101,7 @@ namespace TAO } CORBA::PolicyList * - LocateRequest_Invocation_Adapter::get_inconsistent_policies (void) + LocateRequest_Invocation_Adapter::get_inconsistent_policies () { return this->list_._retn (); } @@ -125,7 +125,7 @@ namespace TAO { // The object pointer has to be changed to a TAO_Stub pointer // in order to obtain the profiles. - TAO_Stub *stubobj = 0; + TAO_Stub *stubobj = nullptr; bool nil_forward_ref = false; if (CORBA::is_nil (effective_target.in ())) @@ -146,7 +146,7 @@ namespace TAO 0), CORBA::COMPLETED_NO); - if (stubobj == 0) + if (stubobj == nullptr) throw ::CORBA::INTERNAL ( CORBA::SystemException::_tao_minor_code ( TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE, @@ -156,7 +156,7 @@ namespace TAO // Reset the profile in the stubs stub->add_forward_profiles (stubobj->base_profiles (), permanent_forward); - if (stub->next_profile () == 0) + if (stub->next_profile () == nullptr) throw ::CORBA::TRANSIENT ( CORBA::SystemException::_tao_minor_code ( TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE, diff --git a/TAO/tao/MCAST_Parser.cpp b/TAO/tao/MCAST_Parser.cpp index 5eda8d95184..101a9c54238 100644 --- a/TAO/tao/MCAST_Parser.cpp +++ b/TAO/tao/MCAST_Parser.cpp @@ -21,7 +21,7 @@ static const char mcast_prefix[] = "mcast:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_MCAST_Parser::~TAO_MCAST_Parser (void) +TAO_MCAST_Parser::~TAO_MCAST_Parser () { } @@ -247,13 +247,13 @@ TAO_MCAST_Parser::multicast_query (char* & buf, result)); // Wait for response until timeout. ACE_Time_Value tv ( - timeout == 0 + timeout == nullptr ? ACE_Time_Value (TAO_DEFAULT_SERVICE_RESOLUTION_TIMEOUT) : *timeout); // Accept reply connection from server. if (acceptor.accept (stream, - 0, + nullptr, &tv) == -1) { if (TAO_debug_level > 0) @@ -293,7 +293,7 @@ TAO_MCAST_Parser::multicast_query (char* & buf, if (ior_len >= TAO_DEFAULT_IOR_SIZE) { buf = CORBA::string_alloc (ior_len); - if (buf == 0) + if (buf == nullptr) { if (TAO_debug_level > 0) { diff --git a/TAO/tao/MMAP_Allocator.cpp b/TAO/tao/MMAP_Allocator.cpp index aca4124f7b1..04453f7cd8d 100644 --- a/TAO/tao/MMAP_Allocator.cpp +++ b/TAO/tao/MMAP_Allocator.cpp @@ -54,20 +54,20 @@ namespace // read(2)) for the open()ed /dev/zero device. Reading through the // /dev/zero file descriptor simply returns zero, as /dev/zero was // designed to do. So unfortunate. :) -TAO_MMAP_Allocator::TAO_MMAP_Allocator (void) - : TAO_MMAP_Allocator_Base ((char const *) 0 /* pool name */, - 0, // No need to explicitly name the lock. +TAO_MMAP_Allocator::TAO_MMAP_Allocator () + : TAO_MMAP_Allocator_Base ((char const *) nullptr /* pool name */, + nullptr, // No need to explicitly name the lock. &the_pool_options) { } -TAO_MMAP_Allocator::~TAO_MMAP_Allocator (void) +TAO_MMAP_Allocator::~TAO_MMAP_Allocator () { } // @@ Should be const but underlying allocator methods are not! ACE_HANDLE -TAO_MMAP_Allocator::handle (void) +TAO_MMAP_Allocator::handle () { return this->alloc ().memory_pool ().mmap ().handle (); } diff --git a/TAO/tao/MProfile.cpp b/TAO/tao/MProfile.cpp index d0d59889b7a..a8590c3d08a 100644 --- a/TAO/tao/MProfile.cpp +++ b/TAO/tao/MProfile.cpp @@ -15,9 +15,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_MProfile::~TAO_MProfile (void) +TAO_MProfile::~TAO_MProfile () { - if (this->policy_list_ != 0) + if (this->policy_list_ != nullptr) { CORBA::ULong const len = this->policy_list_->length (); for (CORBA::ULong i = 0; i < len; ++i) @@ -41,15 +41,15 @@ TAO_MProfile::~TAO_MProfile (void) } void -TAO_MProfile::cleanup (void) +TAO_MProfile::cleanup () { - if (this->pfiles_ != 0) + if (this->pfiles_ != nullptr) { for (TAO_PHandle i = 0; i < this->last_; ++i) if (this->pfiles_[i]) this->pfiles_[i]->_decr_refcnt (); delete [] this->pfiles_; - this->pfiles_ = 0; + this->pfiles_ = nullptr; } this->current_ = 0; @@ -78,7 +78,7 @@ TAO_MProfile::set (CORBA::ULong sz) if (this->pfiles_[h]) { this->pfiles_[h]->_decr_refcnt (); - this->pfiles_[h] = 0; + this->pfiles_[h] = nullptr; } // Next see if we can reuse our profile list memory @@ -107,7 +107,7 @@ TAO_MProfile::set (CORBA::ULong sz) this->current_ = 0; for (TAO_PHandle i = 0; i != this->size_; ++i) - this->pfiles_[i] = 0; + this->pfiles_[i] = nullptr; return this->size_; } @@ -132,7 +132,7 @@ TAO_MProfile::set (const TAO_MProfile &mprofile) for (TAO_PHandle h = 0; h < this->last_; ++h) { this->pfiles_[h] = mprofile.pfiles_[h]; - if (this->pfiles_[h] != 0) + if (this->pfiles_[h] != nullptr) this->pfiles_[h]->_incr_refcnt (); } @@ -147,8 +147,8 @@ TAO_MProfile::grow (CORBA::ULong sz) return 0; // get the additional space - TAO_Profile **new_pfiles = 0; - TAO_Profile **old_pfiles = 0; + TAO_Profile **new_pfiles = nullptr; + TAO_Profile **old_pfiles = nullptr; ACE_NEW_RETURN (new_pfiles, TAO_Profile *[sz], -1); @@ -159,7 +159,7 @@ TAO_MProfile::grow (CORBA::ULong sz) for (TAO_PHandle h = 0; h < this->size_; ++h) { new_pfiles[h] = old_pfiles[h]; - old_pfiles[h] = 0; + old_pfiles[h] = nullptr; } this->pfiles_ = new_pfiles; @@ -235,7 +235,7 @@ TAO_MProfile::remove_profile (const TAO_Profile *pfile) if (this->pfiles_[h]->is_equivalent (pfile)) { // remove it! TAO_Profile *old = this->pfiles_[h]; - this->pfiles_[h] = 0; + this->pfiles_[h] = nullptr; old->_decr_refcnt (); // shift other profiles up one // note, if h == last_ - 1 then do nothing. @@ -300,7 +300,7 @@ TAO_MProfile::hash (CORBA::ULong max) } void -TAO_MProfile::create_policy_list (void) +TAO_MProfile::create_policy_list () { ACE_NEW_THROW_EX (this->policy_list_, CORBA::PolicyList, @@ -309,7 +309,7 @@ TAO_MProfile::create_policy_list (void) } void -TAO_MProfile::init_policy_list (void) +TAO_MProfile::init_policy_list () { // The first time this method is called // it causes the initialization of the policies @@ -321,23 +321,23 @@ TAO_MProfile::init_policy_list (void) } CORBA::PolicyList * -TAO_MProfile::policy_list (void) +TAO_MProfile::policy_list () { if (!this->is_policy_list_initialized_) { ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->mutex_, - 0); + nullptr); - if (this->policy_list_ == 0) + if (this->policy_list_ == nullptr) { this->create_policy_list (); this->init_policy_list (); } } - CORBA::PolicyList *ret_val = 0; + CORBA::PolicyList *ret_val = nullptr; ACE_NEW_THROW_EX (ret_val, CORBA::PolicyList (*this->policy_list_), CORBA::NO_MEMORY (0, diff --git a/TAO/tao/Muxed_TMS.cpp b/TAO/tao/Muxed_TMS.cpp index e7d9022413a..c80043ad541 100644 --- a/TAO/tao/Muxed_TMS.cpp +++ b/TAO/tao/Muxed_TMS.cpp @@ -9,7 +9,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Muxed_TMS::TAO_Muxed_TMS (TAO_Transport *transport) : TAO_Transport_Mux_Strategy (transport) - , lock_ (0) + , lock_ (nullptr) , request_id_generator_ (0) , orb_core_ (transport->orb_core ()) , dispatcher_table_ (this->orb_core_->client_factory ()->reply_dispatcher_table_size ()) @@ -18,7 +18,7 @@ TAO_Muxed_TMS::TAO_Muxed_TMS (TAO_Transport *transport) this->orb_core_->client_factory ()->create_transport_mux_strategy_lock (); } -TAO_Muxed_TMS::~TAO_Muxed_TMS (void) +TAO_Muxed_TMS::~TAO_Muxed_TMS () { delete this->lock_; } @@ -26,7 +26,7 @@ TAO_Muxed_TMS::~TAO_Muxed_TMS (void) // Generate and return an unique request id for the current // invocation. CORBA::ULong -TAO_Muxed_TMS::request_id (void) +TAO_Muxed_TMS::request_id () { // @@ What is a good error return value? ACE_GUARD_RETURN (ACE_Lock, @@ -67,7 +67,7 @@ TAO_Muxed_TMS::bind_dispatcher (CORBA::ULong request_id, *this->lock_, -1); - if (rd == 0) + if (rd == nullptr) { if (TAO_debug_level > 0) { @@ -106,7 +106,7 @@ TAO_Muxed_TMS::unbind_dispatcher (CORBA::ULong request_id) } bool -TAO_Muxed_TMS::has_request (void) +TAO_Muxed_TMS::has_request () { ACE_GUARD_RETURN (ACE_Lock, ace_mon, @@ -120,7 +120,7 @@ int TAO_Muxed_TMS::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) { int result = 0; - ACE_Intrusive_Auto_Ptr<TAO_Reply_Dispatcher> rd(0); + ACE_Intrusive_Auto_Ptr<TAO_Reply_Dispatcher> rd(nullptr); // Grab the reply dispatcher for this id. { @@ -167,7 +167,7 @@ int TAO_Muxed_TMS::reply_timed_out (CORBA::ULong request_id) { int result = 0; - ACE_Intrusive_Auto_Ptr<TAO_Reply_Dispatcher> rd(0); + ACE_Intrusive_Auto_Ptr<TAO_Reply_Dispatcher> rd(nullptr); // Grab the reply dispatcher for this id. { @@ -218,25 +218,25 @@ TAO_Muxed_TMS::reply_timed_out (CORBA::ULong request_id) bool -TAO_Muxed_TMS::idle_after_send (void) +TAO_Muxed_TMS::idle_after_send () { // Irrespective of whether we are successful or not we need to // return true. If *this* class is not successful in idling the // transport no one can. - if (this->transport_ != 0) + if (this->transport_ != nullptr) (void) this->transport_->make_idle (); return true; } bool -TAO_Muxed_TMS::idle_after_reply (void) +TAO_Muxed_TMS::idle_after_reply () { return false; } void -TAO_Muxed_TMS::connection_closed (void) +TAO_Muxed_TMS::connection_closed () { ACE_GUARD (ACE_Lock, ace_mon, @@ -251,7 +251,7 @@ TAO_Muxed_TMS::connection_closed (void) } int -TAO_Muxed_TMS::clear_cache_i (void) +TAO_Muxed_TMS::clear_cache_i () { if (this->dispatcher_table_.current_size () == 0) return -1; @@ -274,7 +274,7 @@ TAO_Muxed_TMS::clear_cache_i (void) for (size_t k = 0 ; k != sz ; ++k) { - ACE_Intrusive_Auto_Ptr<TAO_Reply_Dispatcher> rd(0); + ACE_Intrusive_Auto_Ptr<TAO_Reply_Dispatcher> rd(nullptr); if (ubs.pop (rd) == 0) { diff --git a/TAO/tao/NVList_Adapter.cpp b/TAO/tao/NVList_Adapter.cpp index a1b542673cc..f4050918d63 100644 --- a/TAO/tao/NVList_Adapter.cpp +++ b/TAO/tao/NVList_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_NVList_Adapter::~TAO_NVList_Adapter (void) +TAO_NVList_Adapter::~TAO_NVList_Adapter () { } diff --git a/TAO/tao/Network_Priority_Protocols_Hooks.cpp b/TAO/tao/Network_Priority_Protocols_Hooks.cpp index db6e3aaea66..8f7d55568c4 100644 --- a/TAO/tao/Network_Priority_Protocols_Hooks.cpp +++ b/TAO/tao/Network_Priority_Protocols_Hooks.cpp @@ -4,7 +4,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Network_Priority_Protocols_Hooks:: -~TAO_Network_Priority_Protocols_Hooks (void) +~TAO_Network_Priority_Protocols_Hooks () { } diff --git a/TAO/tao/New_Leader_Generator.cpp b/TAO/tao/New_Leader_Generator.cpp index e490ae08f73..17e0cb12f97 100644 --- a/TAO/tao/New_Leader_Generator.cpp +++ b/TAO/tao/New_Leader_Generator.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_New_Leader_Generator::~TAO_New_Leader_Generator (void) +TAO_New_Leader_Generator::~TAO_New_Leader_Generator () { } diff --git a/TAO/tao/Null_Fragmentation_Strategy.cpp b/TAO/tao/Null_Fragmentation_Strategy.cpp index d41d7f42d34..f04ae96cad2 100644 --- a/TAO/tao/Null_Fragmentation_Strategy.cpp +++ b/TAO/tao/Null_Fragmentation_Strategy.cpp @@ -1,6 +1,6 @@ #include "tao/Null_Fragmentation_Strategy.h" -TAO_Null_Fragmentation_Strategy::~TAO_Null_Fragmentation_Strategy (void) +TAO_Null_Fragmentation_Strategy::~TAO_Null_Fragmentation_Strategy () { } diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 9b930da8c0d..70f9681685e 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -45,14 +45,14 @@ static const char ior_prefix[] = "IOR:"; TAO_BEGIN_VERSIONED_NAMESPACE_DECL -CORBA::ORB::InvalidName::InvalidName (void) +CORBA::ORB::InvalidName::InvalidName () : CORBA::UserException ("IDL:omg.org/CORBA/ORB/InvalidName:1.0", "InvalidName") { } // Destructor - all members are of self managing types. -CORBA::ORB::InvalidName::~InvalidName (void) +CORBA::ORB::InvalidName::~InvalidName () { } @@ -77,25 +77,25 @@ CORBA::ORB::InvalidName::_downcast (CORBA::Exception *exc) return dynamic_cast<InvalidName *> (exc); } -CORBA::Exception *CORBA::ORB::InvalidName::_alloc (void) +CORBA::Exception *CORBA::ORB::InvalidName::_alloc () { - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::CORBA::ORB::InvalidName, 0); + CORBA::Exception *retval = nullptr; + ACE_NEW_RETURN (retval, ::CORBA::ORB::InvalidName, nullptr); return retval; } CORBA::Exception * -CORBA::ORB::InvalidName::_tao_duplicate (void) const +CORBA::ORB::InvalidName::_tao_duplicate () const { - CORBA::Exception *result = 0; + CORBA::Exception *result = nullptr; ACE_NEW_RETURN ( result, ::CORBA::ORB::InvalidName (*this), - 0); + nullptr); return result; } -void CORBA::ORB::InvalidName::_raise (void) const +void CORBA::ORB::InvalidName::_raise () const { throw *this; } @@ -116,11 +116,11 @@ CORBA::ORB::ORB (TAO_ORB_Core *orb_core) : refcount_ (1) , orb_core_ (orb_core) , use_omg_ior_format_ (1) - , timeout_ (0) + , timeout_ (nullptr) { } -CORBA::ORB::~ORB (void) +CORBA::ORB::~ORB () { // This destructor is only invoked when the last ORB reference (not // instance) is being destroyed. @@ -138,9 +138,9 @@ CORBA::ORB::shutdown (CORBA::Boolean wait_for_completion) } void -CORBA::ORB::destroy (void) +CORBA::ORB::destroy () { - if (this->orb_core () == 0) + if (this->orb_core () == nullptr) { // If the ORB_Core pointer is zero, assume that the ORB_Core has // been destroyed. @@ -163,13 +163,13 @@ CORBA::ORB::destroy (void) // Now invalidate the pointer to the ORB_Core that created this // ORB. - this->orb_core_ = 0; + this->orb_core_ = nullptr; } void -CORBA::ORB::run (void) +CORBA::ORB::run () { - this->run (0); + this->run (nullptr); } void @@ -187,9 +187,9 @@ CORBA::ORB::run (ACE_Time_Value *tv) } void -CORBA::ORB::perform_work (void) +CORBA::ORB::perform_work () { - this->perform_work (0); + this->perform_work (nullptr); } void @@ -224,7 +224,7 @@ CORBA::ORB::work_pending (ACE_Time_Value &tv) } CORBA::Boolean -CORBA::ORB::work_pending (void) +CORBA::ORB::work_pending () { // This method should not be called if the ORB has been shutdown. this->check_shutdown (); @@ -247,7 +247,7 @@ CORBA::ORB::create_list (CORBA::Long count, CORBA::NVList_ptr &new_list) TAO_NVList_Adapter *adapter = ACE_Dynamic_Service<TAO_NVList_Adapter>::instance ("TAO_NVList_Adapter"); - if (adapter == 0) + if (adapter == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), @@ -277,7 +277,7 @@ CORBA::ORB::create_operation_list (CORBA::OperationDef_ptr opDef, ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( TAO_ORB_Core::ifr_client_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTF_REPOS (); } @@ -305,7 +305,7 @@ CORBA::ORB::create_named_value (CORBA::NamedValue_ptr &nv) ACE_Dynamic_Service<TAO_NVList_Adapter>::instance ( "TAO_NVList_Adapter"); - if (adapter == 0) + if (adapter == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), @@ -384,7 +384,7 @@ CORBA::ORB::get_next_response (CORBA::Request_ptr &) } CORBA::Boolean -CORBA::ORB::poll_next_response (void) +CORBA::ORB::poll_next_response () { throw ::CORBA::NO_IMPLEMENT ( CORBA::SystemException::_tao_minor_code ( @@ -405,7 +405,7 @@ CORBA::ORB::create_struct_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -424,7 +424,7 @@ CORBA::ORB::create_union_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -445,7 +445,7 @@ CORBA::ORB::create_enum_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -463,7 +463,7 @@ CORBA::ORB::create_alias_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -481,7 +481,7 @@ CORBA::ORB::create_exception_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -498,7 +498,7 @@ CORBA::ORB::create_interface_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -514,7 +514,7 @@ CORBA::ORB::create_string_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -530,7 +530,7 @@ CORBA::ORB::create_wstring_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -547,7 +547,7 @@ CORBA::ORB::create_fixed_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -564,7 +564,7 @@ CORBA::ORB::create_sequence_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -581,7 +581,7 @@ CORBA::ORB::create_array_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -601,7 +601,7 @@ CORBA::ORB::create_value_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -622,7 +622,7 @@ CORBA::ORB::create_value_box_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -637,7 +637,7 @@ CORBA::ORB::create_native_tc (const char *id, const char *name) ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -652,7 +652,7 @@ CORBA::ORB::create_recursive_tc (const char *id) ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -667,7 +667,7 @@ CORBA::ORB::create_abstract_interface_tc (const char *id, const char *name) ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -682,7 +682,7 @@ CORBA::ORB::create_local_interface_tc (const char *id, const char *name) ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -697,7 +697,7 @@ CORBA::ORB::create_component_tc (const char *id, const char *name) ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -712,7 +712,7 @@ CORBA::ORB::create_home_tc (const char *id, const char *name) ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -732,7 +732,7 @@ CORBA::ORB::create_event_tc ( ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance ( TAO_ORB_Core::typecodefactory_adapter_name ()); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -749,13 +749,13 @@ CORBA::ORB::create_event_tc ( #endif /* TAO_HAS_MINIMUM_CORBA */ CORBA::Object_ptr -CORBA::ORB::resolve_policy_manager (void) +CORBA::ORB::resolve_policy_manager () { #if (TAO_HAS_CORBA_MESSAGING == 1) TAO_Policy_Manager *policy_manager = this->orb_core_->policy_manager (); - if (policy_manager == 0) + if (policy_manager == nullptr) { return CORBA::Object::_nil (); } @@ -770,7 +770,7 @@ CORBA::ORB::resolve_policy_manager (void) } CORBA::Object_ptr -CORBA::ORB::resolve_policy_current (void) +CORBA::ORB::resolve_policy_current () { #if (TAO_HAS_CORBA_MESSAGING == 1) @@ -827,7 +827,7 @@ CORBA::ORB::resolve_service (TAO::MCAST_SERVICEID mcast_service_id) char const * const port_number = ACE_OS::getenv (env_service_port[mcast_service_id]); - if (port_number != 0) + if (port_number != nullptr) port = static_cast<unsigned short> (ACE_OS::atoi (port_number)); else port = default_service_port[mcast_service_id]; @@ -1005,7 +1005,7 @@ CORBA::ORB::resolve_initial_references (const char *name, void CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj) { - if (id == 0 || ACE_OS::strlen (id) == 0) + if (id == nullptr || ACE_OS::strlen (id) == 0) throw ::CORBA::ORB::InvalidName (); if (CORBA::is_nil (obj)) @@ -1020,7 +1020,7 @@ CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj) CORBA::Object_ptr CORBA::ORB::unregister_initial_reference (const char * id) { - if (id == 0 || ACE_OS::strlen (id) == 0) + if (id == nullptr || ACE_OS::strlen (id) == 0) throw ::CORBA::ORB::InvalidName (); TAO_Object_Ref_Table &table = this->orb_core_->object_ref_table (); @@ -1034,7 +1034,7 @@ CORBA::ORB::unregister_initial_reference (const char * id) #endif CORBA::ORB::ObjectIdList_ptr -CORBA::ORB::list_initial_services (void) +CORBA::ORB::list_initial_services () { this->check_shutdown (); @@ -1042,9 +1042,9 @@ CORBA::ORB::list_initial_services (void) } void -CORBA::ORB::check_shutdown (void) +CORBA::ORB::check_shutdown () { - if (this->orb_core () != 0) + if (this->orb_core () != nullptr) { this->orb_core ()->check_shutdown (); } @@ -1134,7 +1134,7 @@ namespace TAO // big as the default repository if (ACE_OS::strcasecmp (arg, ACE_TEXT("LOCAL")) == 0) { - ACE_Service_Gestalt* gestalt = 0; + ACE_Service_Gestalt* gestalt = nullptr; ACE_NEW_THROW_EX (gestalt, ACE_Service_Gestalt (ACE_Service_Gestalt::MAX_SERVICES / 4, true), @@ -1166,7 +1166,7 @@ namespace TAO // Get ORB Core TAO_ORB_Core_Auto_Ptr oc (TAO::ORB_Table::instance ()->find ( ACE_TEXT_ALWAYS_CHAR(orbid.c_str ()))); - if (oc.get () != 0) + if (oc.get () != nullptr) return oc->configuration (); if (TAO_debug_level > 0) @@ -1237,7 +1237,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid) : 0); if ((argc == 0 && argv0_len != 0) - || (argc != 0 && (argv == 0 || argv[0] == 0))) + || (argc != 0 && (argv == nullptr || argv[0] == nullptr))) { throw ::CORBA::BAD_PARAM ( CORBA::SystemException::_tao_minor_code ( @@ -1273,7 +1273,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid) ACE_TEXT_ALWAYS_CHAR(orbid_string.c_str ()))); // The ORB was already initialized. Just return that one. - if (oc.get () != 0) + if (oc.get () != nullptr) { return CORBA::ORB::_duplicate (oc->orb ()); } @@ -1288,7 +1288,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid) // An ORB corresponding to the desired ORBid doesn't exist so create // a new one. - TAO_ORB_Core * tmp = 0; + TAO_ORB_Core * tmp = nullptr; ACE_NEW_THROW_EX (tmp, TAO_ORB_Core (ACE_TEXT_ALWAYS_CHAR(orbid_string.c_str ()), gestalt), @@ -1343,7 +1343,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid) PortableInterceptor::SlotId slotid = 0; size_t pre_init_count = 0; - if (orbinitializer_registry != 0) + if (orbinitializer_registry != nullptr) { pre_init_count = orbinitializer_registry->pre_init (oc.get (), @@ -1356,7 +1356,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid) result = oc->init (command_line.get_argc(), command_line.get_ASCII_argv()); - if (orbinitializer_registry != 0) + if (orbinitializer_registry != nullptr) { orbinitializer_registry->post_init (pre_init_count, oc.get (), @@ -1400,7 +1400,7 @@ CORBA::ORB::object_to_string (CORBA::Object_ptr obj) char* user_string = obj->convert_to_ior (this->use_omg_ior_format_, ior_prefix); - if (user_string != 0) + if (user_string != nullptr) return user_string; } @@ -1448,20 +1448,20 @@ CORBA::ORB::object_to_string (CORBA::Object_ptr obj) // return that string. size_t const total_len = cdr.total_length (); - char *cp = 0; + char *cp = nullptr; ACE_ALLOCATOR_RETURN (cp, CORBA::string_alloc ( sizeof ior_prefix + 2 * static_cast<CORBA::ULong> (total_len)), - 0); + nullptr); CORBA::String_var string = cp; ACE_OS::strcpy (cp, ior_prefix); cp += sizeof (ior_prefix) - 1; - for (const ACE_Message_Block *i = cdr.begin (); i != 0; i = i->cont ()) + for (const ACE_Message_Block *i = cdr.begin (); i != nullptr; i = i->cont ()) { const char *bytes = i->rd_ptr (); size_t len = i->length (); @@ -1483,7 +1483,7 @@ CORBA::ORB::object_to_string (CORBA::Object_ptr obj) // It is perfectly valid to marshal a nil object reference. // However, it is not possible to convert a nil object reference // to a URL IOR, so throw an exception. - if (CORBA::is_nil (obj) || obj->_stubobj () == 0) + if (CORBA::is_nil (obj) || obj->_stubobj () == nullptr) { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -1530,7 +1530,7 @@ CORBA::ORB::string_to_object (const char *str) this->check_shutdown (); // Check for NULL pointer - if (str == 0) + if (str == nullptr) throw ::CORBA::INV_OBJREF ( CORBA::SystemException::_tao_minor_code ( 0, @@ -1540,7 +1540,7 @@ CORBA::ORB::string_to_object (const char *str) TAO_IOR_Parser *ior_parser = this->orb_core_->parser_registry ()->match_parser (str); - if (ior_parser != 0) + if (ior_parser != nullptr) { return ior_parser->parse_string (str, this); } @@ -1562,7 +1562,7 @@ CORBA::ORB::string_to_object (const wchar_t *str) // **************************************************************** char * -CORBA::ORB::id (void) +CORBA::ORB::id () { return CORBA::string_dup (this->orb_core_->orbid ()); } @@ -1578,7 +1578,7 @@ CORBA::ORB::create_policy (CORBA::PolicyType type, const CORBA::Any& val) TAO::PolicyFactory_Registry_Adapter *adapter = this->orb_core_->policy_factory_registry (); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -1597,7 +1597,7 @@ CORBA::ORB::_create_policy (CORBA::PolicyType type) TAO::PolicyFactory_Registry_Adapter *adapter = this->orb_core_->policy_factory_registry (); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTERNAL (); } @@ -1689,7 +1689,7 @@ CORBA::ORB::url_ior_string_to_object (const char* str) } // Now make the TAO_Stub. - TAO_Stub *data = this->orb_core_->create_stub ((char *) 0, mprofile); + TAO_Stub *data = this->orb_core_->create_stub ((char *) nullptr, mprofile); TAO_Stub_Auto_Ptr safe_objdata (data); diff --git a/TAO/tao/ORBInitializer_Registry.cpp b/TAO/tao/ORBInitializer_Registry.cpp index 309110a79cc..9b74ab3f3a7 100644 --- a/TAO/tao/ORBInitializer_Registry.cpp +++ b/TAO/tao/ORBInitializer_Registry.cpp @@ -42,7 +42,7 @@ namespace PortableInterceptor ("ORBInitializer_Registry", true); // only look in the local repo #if !defined (TAO_AS_STATIC_LIBS) - if (orbinitializer_registry_ == 0) + if (orbinitializer_registry_ == nullptr) { ACE_Service_Config::process_directive ( ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("ORBInitializer_Registry", @@ -56,7 +56,7 @@ namespace PortableInterceptor } #endif /* !TAO_AS_STATIC_LIBS */ - if (orbinitializer_registry_ != 0) + if (orbinitializer_registry_ != nullptr) { orbinitializer_registry_->register_orb_initializer (init); } diff --git a/TAO/tao/ORBInitializer_Registry_Adapter.cpp b/TAO/tao/ORBInitializer_Registry_Adapter.cpp index 874bca2e5fc..aac674bc9d7 100644 --- a/TAO/tao/ORBInitializer_Registry_Adapter.cpp +++ b/TAO/tao/ORBInitializer_Registry_Adapter.cpp @@ -4,7 +4,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { - ORBInitializer_Registry_Adapter::~ORBInitializer_Registry_Adapter (void) + ORBInitializer_Registry_Adapter::~ORBInitializer_Registry_Adapter () { } } diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 7a9a212df75..ac09508d440 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -91,7 +91,7 @@ ACE_FACTORY_DEFINE (TAO, TAO_ORB_Core_Static_Resources) // **************************************************************** CORBA::Environment& -TAO_default_environment (void) +TAO_default_environment () { return *TAO_TSS_Resources::instance ()->default_environment_; } @@ -111,14 +111,14 @@ TAO_ORB_Core_Static_Resources::initialization_reference_ = TAO_ORB_Core_Static_Resources::instance (); TAO_ORB_Core_Static_Resources* -TAO_ORB_Core_Static_Resources::instance (void) +TAO_ORB_Core_Static_Resources::instance () { ACE_Service_Gestalt *current = ACE_Service_Config::current(); TAO_ORB_Core_Static_Resources* tocsr = ACE_Dynamic_Service<TAO_ORB_Core_Static_Resources>::instance (current, "TAO_ORB_Core_Static_Resources", true); - if (tocsr == 0) + if (tocsr == nullptr) { // This new is never freed on purpose. The data specified by // it needs to be around for the last shared library that references @@ -136,7 +136,7 @@ TAO_ORB_Core_Static_Resources::instance (void) ACE_Dynamic_Service<TAO_ORB_Core_Static_Resources>::instance (global,"TAO_ORB_Core_Static_Resources"); - if (global_tocsr != 0) + if (global_tocsr != nullptr) *tocsr = *global_tocsr; } } @@ -144,17 +144,17 @@ TAO_ORB_Core_Static_Resources::instance (void) return tocsr; } -TAO_ORB_Core_Static_Resources::TAO_ORB_Core_Static_Resources (void) +TAO_ORB_Core_Static_Resources::TAO_ORB_Core_Static_Resources () : network_priority_protocols_hooks_name_ ( "Network_Priority_Protocols_Hooks"), - connection_timeout_hook_ (0), + connection_timeout_hook_ (nullptr), resource_factory_name_ ("Resource_Factory"), dynamic_adapter_name_ ("Dynamic_Adapter"), ifr_client_adapter_name_ ("IFR_Client_Adapter"), typecodefactory_adapter_name_ ("TypeCodeFactory_Adapter"), iorinterceptor_adapter_factory_name_ ("IORInterceptor_Adapter_Factory"), valuetype_adapter_factory_name_ ("Valuetype_Adapter_Factory"), - alt_connection_timeout_hook_ (0) + alt_connection_timeout_hook_ (nullptr) { } @@ -180,18 +180,18 @@ TAO_ORB_Core_Static_Resources::operator=(const TAO_ORB_Core_Static_Resources& ot TAO_ORB_Core::TAO_ORB_Core (const char *orbid, ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> gestalt) - : protocols_hooks_ (0), - network_priority_protocols_hooks_ (0), + : protocols_hooks_ (nullptr), + network_priority_protocols_hooks_ (nullptr), #if TAO_USE_LOCAL_MEMORY_POOL == 1 use_local_memory_pool_ (true), #else use_local_memory_pool_ (false), #endif lock_ (), - thread_lane_resources_manager_ (0), - collocation_resolver_ (0), - stub_factory_ (0), - protocol_factories_ (0), + thread_lane_resources_manager_ (nullptr), + collocation_resolver_ (nullptr), + stub_factory_ (nullptr), + protocol_factories_ (nullptr), implrepo_service_ (CORBA::Object::_nil ()), use_implrepo_ (0), imr_endpoints_in_ior_ (1), @@ -210,9 +210,9 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid, object_ref_table_ (), object_key_table_ (), orbid_ (ACE_OS::strdup (orbid ? orbid : "")), - resource_factory_ (0), - client_factory_ (0), - server_factory_ (0), + resource_factory_ (nullptr), + client_factory_ (nullptr), + server_factory_ (nullptr), ft_send_extended_sc_ (false), opt_for_collocation_ (true), use_global_collocation_ (true), @@ -220,15 +220,15 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid, #if (TAO_HAS_CORBA_MESSAGING == 1) - policy_manager_ (0), - default_policies_ (0), - policy_current_ (0), + policy_manager_ (nullptr), + default_policies_ (nullptr), + policy_current_ (nullptr), #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ poa_current_ (), adapter_registry_ (this), - poa_adapter_ (0), + poa_adapter_ (nullptr), tm_ (), tss_cleanup_funcs_ (), tss_resources_ (), @@ -239,33 +239,33 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid, // can only be initialized once. thread_per_connection_use_timeout_ (1), open_lock_ (), - endpoint_selector_factory_ (0), + endpoint_selector_factory_ (nullptr), #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1) - eager_transport_queueing_strategy_ (0), - delayed_transport_queueing_strategy_ (0), - flush_transport_queueing_strategy_ (0), + eager_transport_queueing_strategy_ (nullptr), + delayed_transport_queueing_strategy_ (nullptr), + flush_transport_queueing_strategy_ (nullptr), #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */ refcount_ (1), - policy_factory_registry_ (0), - orbinitializer_registry_ (0), + policy_factory_registry_ (nullptr), + orbinitializer_registry_ (nullptr), #if (TAO_HAS_INTERCEPTORS == 1) pi_current_ (CORBA::Object::_nil ()), - client_request_interceptor_adapter_ (0), - server_request_interceptor_adapter_ (0), + client_request_interceptor_adapter_ (nullptr), + server_request_interceptor_adapter_ (nullptr), #endif /* TAO_HAS_INTERCEPTORS == 1 */ - ior_interceptor_adapter_ (0), - valuetype_adapter_ (0), + ior_interceptor_adapter_ (nullptr), + valuetype_adapter_ (nullptr), parser_registry_ (), - bidir_adapter_ (0), + bidir_adapter_ (nullptr), bidir_giop_policy_ (0), - ziop_adapter_ (0), + ziop_adapter_ (nullptr), ziop_enabled_ (false), - flushing_strategy_ (0), - codeset_manager_ (0), + flushing_strategy_ (nullptr), + codeset_manager_ (nullptr), config_ (gestalt), - sync_scope_hook_ (0), + sync_scope_hook_ (nullptr), default_sync_scope_ (Messaging::SYNC_WITH_TRANSPORT), - timeout_hook_ (0) + timeout_hook_ (nullptr) { #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1) @@ -294,7 +294,7 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid, this->set_sync_scope_hook (TAO_ORB_Core::default_sync_scope_hook); } -TAO_ORB_Core::~TAO_ORB_Core (void) +TAO_ORB_Core::~TAO_ORB_Core () { delete this->thread_lane_resources_manager_; @@ -323,12 +323,12 @@ TAO_ORB_Core::~TAO_ORB_Core (void) delete this->policy_factory_registry_; // Don't delete, is a process wide singleton shared by all orbs - orbinitializer_registry_ = 0; + orbinitializer_registry_ = nullptr; ::CORBA::release (this->orb_); delete this->codeset_manager_; - this->codeset_manager_ = 0; + this->codeset_manager_ = nullptr; // This will destroy the service repository for this core (void) TAO::ORB::close_services (this->config_); @@ -434,19 +434,19 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) // the "-ORBUseIMR" command line argument. // char* const use_IMR_env_var_value = ACE_OS::getenv ("TAO_USE_IMR") ; - if (use_IMR_env_var_value != 0) + if (use_IMR_env_var_value != nullptr) { this->use_implrepo_ = ACE_OS::atoi (use_IMR_env_var_value) ; } while (arg_shifter.is_anything_left ()) { - const ACE_TCHAR *current_arg = 0; + const ACE_TCHAR *current_arg = nullptr; //////////////////////////////////////////////////////////////// // begin with the 'parameterless' flags // //////////////////////////////////////////////////////////////// - if (0 != (current_arg = arg_shifter.get_the_parameter + if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDottedDecimalAddresses")))) { // Use dotted decimal addresses @@ -456,7 +456,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNoServerSideNameLookups")))) { // Don't look up the host name for incoming connections @@ -465,7 +465,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNameServicePort")))) { // Specify the port number for the NameService. @@ -475,7 +475,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBMulticastDiscoveryEndpoint")))) { // Specify mcast address:port@network_interface for the @@ -488,7 +488,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNodelay")))) { // Use TCP_NODELAY or not. @@ -497,7 +497,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBKeepalive")))) { // Use SO_KEEPALIVE or not. @@ -506,7 +506,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDontRoute")))) { // Use SO_DONTROUTE or not. @@ -515,7 +515,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBIPHopLimit")))) { // Number of IP hops. @@ -524,7 +524,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBIPMulticastLoop")))) { // Use IP_MULTICAST_LOOP or not. @@ -533,7 +533,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBTradingServicePort")))) { // Specify the port number for the TradingService. @@ -542,7 +542,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBImplRepoServicePort")))) { // Specify the multicast port number for the Implementation @@ -551,7 +551,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBRcvSock")))) { // @@ All protocol implementation may not use sockets, so @@ -564,7 +564,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBSndSock")))) { // @@ All protocol implementation may not use sockets, so @@ -576,7 +576,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBObjRefStyle")))) { // Specifies the style of printed objrefs: URL or IOR @@ -606,7 +606,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBCollocationStrategy")))) { // Specify which collocation policy we want to use. @@ -626,7 +626,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBCollocation")))) { // Specify whether we want to optimize against collocation @@ -658,21 +658,21 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBIIOPClientPortBase")))) { this->orb_params ()->iiop_client_port_base (ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBIIOPClientPortSpan")))) { this->orb_params ()->iiop_client_port_span (ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBPreferredInterfaces"))) || - 0 != (current_arg = arg_shifter.get_the_parameter + nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBPreferredInterface"))) ) { if (this->orb_params ()->preferred_interfaces ( @@ -685,9 +685,9 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBEnforcePreferredInterfaces"))) || - 0 != (current_arg = arg_shifter.get_the_parameter + nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBEnforcePreferredInterface"))) ) { this->orb_params ()->enforce_pref_interfaces ( @@ -729,7 +729,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } #endif /* ACE_HAS_IPV6 */ - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBCDRTradeoff")))) { cdr_tradeoff = ACE_OS::atoi (current_arg); @@ -740,11 +740,11 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) // A new <ObjectID>:<IOR> mapping has been specified. This will be // used by the resolve_initial_references (). - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBInitRef")))) { const ACE_TCHAR *pos = ACE_OS::strchr (current_arg, '='); - if (pos == 0) + if (pos == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("Invalid ORBInitRef argument '%s'") @@ -775,7 +775,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) } arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDefaultInitRef")))) { // Set the list of prefixes from -ORBDefaultInitRef. @@ -784,14 +784,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBStdProfileComponents")))) { std_profile_components = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBAMICollocation")))) { int const ami_collocation = ACE_OS::atoi (current_arg); @@ -802,7 +802,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBResources")))) { TAOLIB_DEBUG ((LM_WARNING, @@ -811,7 +811,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBLogFile")))) { // redirect all TAOLIB_DEBUG and TAOLIB_ERROR output to a file @@ -834,7 +834,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) #else /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - ofstream* output_stream = 0; + ofstream* output_stream = nullptr; // // note: we are allocating dynamic memory here....but @@ -862,7 +862,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBVerboseLogging")))) { unsigned long const verbose_logging = ACE_OS::atoi (current_arg); @@ -894,14 +894,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) dynamic_cast<ACE_Logging_Strategy*> ( ACE_Dynamic_Service<ACE_Service_Object>::instance (current_arg)); - if (logging_strategy != 0) + if (logging_strategy != nullptr) { logging_strategy->reactor (this->reactor ()); } arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBUseIMR")))) { // Use IR or not. @@ -909,14 +909,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBIMREndpointsInIOR")))) { this->imr_endpoints_in_ior_ = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBid")))) { // The ORBid is actually set in ORB_init(), and then passed @@ -935,7 +935,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBServerId")))) { // The this->server_id_ is to uniquely identify a server to @@ -945,21 +945,21 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBLingerTimeout")))) { linger = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBAcceptErrorDelay")))) { accept_error_delay = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBEndpoint")))) { // Each "endpoint" is of the form: @@ -986,7 +986,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBListenEndpoints")))) { // This option is similar to the -ORBEndPoint option. May be @@ -999,9 +999,9 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if ((0 != (current_arg = arg_shifter.get_the_parameter + else if ((nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBLaneEndpoint")))) || - (0 != (current_arg = arg_shifter.get_the_parameter + (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBLaneListenEndpoints"))))) { // This option is similar to the -ORBEndPoint option but @@ -1022,7 +1022,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) this->set_endpoint_helper (lane, endpoints); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNoProprietaryActivation")))) { // This option can be used to set to not use any proprietary @@ -1035,34 +1035,34 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) throw ::CORBA::NO_IMPLEMENT (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBUseSharedProfile")))) { this->orb_params ()->shared_profile (ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNegotiateCodesets")))) { negotiate_codesets = (ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBUseParallelConnects")))) { use_parallel_connects = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBParallelConnectDelay")))) { this->orb_params ()->parallel_connect_delay (ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBSingleReadOptimization")))) { this->orb_params ()->single_read_optimization @@ -1070,7 +1070,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDisableRTCollocation")))) { int disable_rt_collocation = ACE_OS::atoi (current_arg); @@ -1081,28 +1081,28 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBUseLocalMemoryPool")))) { this->use_local_memory_pool_ = (0 != ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBMaxMessageSize")))) { this->orb_params_.max_message_size (ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBFTSendFullGroupTC")))) { this->ft_send_extended_sc_ = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardInvocationOnObjectNotExist")))) { int const forward = ACE_OS::atoi (current_arg); @@ -1113,14 +1113,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnTransientLimit")))) { int const limit = ACE_OS::atoi (current_arg); this->orb_params_.forward_on_exception_limit (TAO::FOE_TRANSIENT, limit); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnCommFailureLimit")))) { int const limit = ACE_OS::atoi (current_arg); @@ -1128,7 +1128,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) TAO::FOE_COMM_FAILURE, limit); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnObjectNotExistLimit")))) { int const limit = ACE_OS::atoi (current_arg); @@ -1136,7 +1136,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) TAO::FOE_OBJECT_NOT_EXIST, limit); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnInvObjrefLimit")))) { int const limit = ACE_OS::atoi (current_arg); @@ -1144,7 +1144,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) TAO::FOE_INV_OBJREF, limit); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnReplyClosedLimit")))) { int const limit = ACE_OS::atoi (current_arg); @@ -1152,7 +1152,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) .forward_on_reply_closed_limit_ = limit; arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardDelay")))) { int const msecs = ACE_OS::atoi (current_arg); @@ -1160,7 +1160,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) this->orb_params_.forward_on_exception_delay (delay); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnceOnObjectNotExist")))) { int const forward = ACE_OS::atoi (current_arg); @@ -1169,7 +1169,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnceOnCommFailure")))) { int const forward = ACE_OS::atoi (current_arg); @@ -1178,7 +1178,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnceOnTransient")))) { int const forward = ACE_OS::atoi (current_arg); @@ -1187,7 +1187,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBForwardOnceOnInvObjref")))) { int forward = ACE_OS::atoi (current_arg); @@ -1196,14 +1196,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBAllowZIOPNoServerPolicies")))) { // This option takes a boolean 0 (off/dissallow) or 1 (on/allow) this->orb_params_.allow_ziop_no_server_policies (!!ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDynamicThreadPoolName")))) { this->orb_params_.dynamic_thread_pool_config_name (ACE_TEXT_ALWAYS_CHAR @@ -1222,7 +1222,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Unknown \"-ORB\" option ") ACE_TEXT ("<%s>.\n"), - ((current_arg == 0) ? ACE_TEXT("<NULL>") + ((current_arg == nullptr) ? ACE_TEXT("<NULL>") : current_arg))); } @@ -1247,7 +1247,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) const char *env_endpoint = ACE_OS::getenv ("TAO_ORBENDPOINT"); - if (env_endpoint != 0) + if (env_endpoint != nullptr) { int result = this->orb_params ()->add_endpoints (TAO_DEFAULT_LANE, env_endpoint); @@ -1293,7 +1293,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) // services because we'll load the factory from there. TAO_Resource_Factory *trf = this->resource_factory (); - if (trf == 0) + if (trf == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - %p\n"), @@ -1313,7 +1313,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) // @@ ???? // Make sure the reactor is initialized... ACE_Reactor *reactor = this->reactor (); - if (reactor == 0) + if (reactor == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - %p\n"), @@ -1327,7 +1327,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) TAO_Server_Strategy_Factory *ssf = this->server_factory (); - if (ssf == 0) + if (ssf == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - %p\n"), @@ -1465,7 +1465,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) (this->configuration (), ACE_TEXT_CHAR_TO_TCHAR (protocols_hooks_name)); - if (this->protocols_hooks_ != 0) + if (this->protocols_hooks_ != nullptr) { // Initialize the protocols hooks instance. this->protocols_hooks_->init_hooks (this); @@ -1477,9 +1477,9 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) this->configuration (), this->orb_params ()->poa_factory_name ()); - if (adapter_factory != 0) + if (adapter_factory != nullptr) { - adapter_factory->init (0, 0); + adapter_factory->init (0, nullptr); } // Look in the service repository for an instance of the @@ -1493,7 +1493,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) (this->configuration (), ACE_TEXT_CHAR_TO_TCHAR (network_priority_protocols_hooks_name.c_str())); - if (this->network_priority_protocols_hooks_ != 0) + if (this->network_priority_protocols_hooks_ != nullptr) { // Initialize the protocols hooks instance. this->network_priority_protocols_hooks_->init_hooks (this); @@ -1511,7 +1511,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) int -TAO_ORB_Core::fini (void) +TAO_ORB_Core::fini () { try { @@ -1565,7 +1565,7 @@ TAO_ORB_Core::fini (void) // // @todo Fix potential seg fault in // TAO_ORB_Core::thread_lane_resources_manager(). - if (this->thread_lane_resources_manager_ != 0) + if (this->thread_lane_resources_manager_ != nullptr) this->thread_lane_resources_manager_->finalize (); // Destroy the object_key table @@ -1586,7 +1586,7 @@ TAO_ORB_Core::set_resource_factory (const char *resource_factory_name) void TAO_ORB_Core::set_gui_resource_factory (TAO::GUIResource_Factory *gui_resource_factory) { - if (TAO_TSS_Resources::instance ()->gui_resource_factory_ != 0) + if (TAO_TSS_Resources::instance ()->gui_resource_factory_ != nullptr) { if (TAO_debug_level > 2) { @@ -1606,7 +1606,7 @@ TAO_ORB_Core::dynamic_adapter_name (const char *name) } const char * -TAO_ORB_Core::dynamic_adapter_name (void) +TAO_ORB_Core::dynamic_adapter_name () { return TAO_ORB_Core_Static_Resources::instance ()->dynamic_adapter_name_.c_str(); } @@ -1618,7 +1618,7 @@ TAO_ORB_Core::ifr_client_adapter_name (const char *name) } const char * -TAO_ORB_Core::ifr_client_adapter_name (void) +TAO_ORB_Core::ifr_client_adapter_name () { return TAO_ORB_Core_Static_Resources::instance ()->ifr_client_adapter_name_.c_str(); } @@ -1630,7 +1630,7 @@ TAO_ORB_Core::typecodefactory_adapter_name (const char *name) } const char * -TAO_ORB_Core::typecodefactory_adapter_name (void) +TAO_ORB_Core::typecodefactory_adapter_name () { return TAO_ORB_Core_Static_Resources::instance ()->typecodefactory_adapter_name_.c_str(); } @@ -1642,7 +1642,7 @@ TAO_ORB_Core::iorinterceptor_adapter_factory_name (const char *name) } const char * -TAO_ORB_Core::iorinterceptor_adapter_factory_name (void) +TAO_ORB_Core::iorinterceptor_adapter_factory_name () { return TAO_ORB_Core_Static_Resources::instance ()->iorinterceptor_adapter_factory_name_.c_str(); } @@ -1654,16 +1654,16 @@ TAO_ORB_Core::valuetype_adapter_factory_name (const char *name) } const char * -TAO_ORB_Core::valuetype_adapter_factory_name (void) +TAO_ORB_Core::valuetype_adapter_factory_name () { return TAO_ORB_Core_Static_Resources::instance ()->valuetype_adapter_factory_name_.c_str(); } TAO_Resource_Factory * -TAO_ORB_Core::resource_factory (void) +TAO_ORB_Core::resource_factory () { // Check if there is a cached reference. - if (this->resource_factory_ != 0) + if (this->resource_factory_ != nullptr) { return this->resource_factory_; } @@ -1681,17 +1681,17 @@ TAO_ORB_Core::resource_factory (void) } TAO::GUIResource_Factory * -TAO_ORB_Core::gui_resource_factory (void) +TAO_ORB_Core::gui_resource_factory () { return TAO_TSS_Resources::instance ()->gui_resource_factory_; } TAO_Thread_Lane_Resources_Manager & -TAO_ORB_Core::thread_lane_resources_manager (void) +TAO_ORB_Core::thread_lane_resources_manager () { // Check if there is a cached reference. - if (this->thread_lane_resources_manager_ != 0) + if (this->thread_lane_resources_manager_ != nullptr) return *this->thread_lane_resources_manager_; // If not, lookup the corresponding factory and ask it to make one. @@ -1710,10 +1710,10 @@ TAO_ORB_Core::thread_lane_resources_manager (void) } TAO_Collocation_Resolver & -TAO_ORB_Core::collocation_resolver (void) +TAO_ORB_Core::collocation_resolver () { // Check if there is a cached reference. - if (this->collocation_resolver_ != 0) + if (this->collocation_resolver_ != nullptr) return *this->collocation_resolver_; // If not, lookup it up. @@ -1726,7 +1726,7 @@ TAO_ORB_Core::collocation_resolver (void) } TAO::PolicyFactory_Registry_Adapter * -TAO_ORB_Core::policy_factory_registry_i (void) +TAO_ORB_Core::policy_factory_registry_i () { TAO_PolicyFactory_Registry_Factory *loader = @@ -1734,7 +1734,7 @@ TAO_ORB_Core::policy_factory_registry_i (void) (this->configuration (), ACE_TEXT ("PolicyFactory_Loader")); - if (loader == 0) + if (loader == nullptr) { this->configuration ()->process_directive ( ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("PolicyFactory_Loader", @@ -1748,7 +1748,7 @@ TAO_ORB_Core::policy_factory_registry_i (void) ACE_TEXT ("PolicyFactory_Loader")); } - if (loader != 0) + if (loader != nullptr) { this->policy_factory_registry_ = loader->create (); @@ -1758,10 +1758,10 @@ TAO_ORB_Core::policy_factory_registry_i (void) } TAO_ZIOP_Adapter * -TAO_ORB_Core::ziop_adapter_i (void) +TAO_ORB_Core::ziop_adapter_i () { // Check if there is a cached reference. - if (this->ziop_adapter_ != 0) + if (this->ziop_adapter_ != nullptr) return this->ziop_adapter_; this->ziop_adapter_ = @@ -1773,7 +1773,7 @@ TAO_ORB_Core::ziop_adapter_i (void) } TAO::ORBInitializer_Registry_Adapter * -TAO_ORB_Core::orbinitializer_registry_i (void) +TAO_ORB_Core::orbinitializer_registry_i () { // @todo The ORBInitializer_Registry is supposed to be a singleton. @@ -1787,7 +1787,7 @@ TAO_ORB_Core::orbinitializer_registry_i (void) // In case we build shared, try to load the PI Client library, in a // static build we just can't do this, so don't try it, lower layers // output an error then. - if (this->orbinitializer_registry_ == 0) + if (this->orbinitializer_registry_ == nullptr) { this->configuration ()->process_directive ( ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE ("ORBInitializer_Registry", @@ -1806,10 +1806,10 @@ TAO_ORB_Core::orbinitializer_registry_i (void) } TAO_Stub_Factory * -TAO_ORB_Core::stub_factory (void) +TAO_ORB_Core::stub_factory () { // Check if there is a cached reference. - if (this->stub_factory_ != 0) + if (this->stub_factory_ != nullptr) return this->stub_factory_; // If not, look in the service repository for an instance. @@ -1825,10 +1825,10 @@ TAO_ORB_Core::stub_factory (void) } TAO_Endpoint_Selector_Factory * -TAO_ORB_Core::endpoint_selector_factory (void) +TAO_ORB_Core::endpoint_selector_factory () { // Check if there is a cached reference. - if (this->endpoint_selector_factory_ != 0) + if (this->endpoint_selector_factory_ != nullptr) return this->endpoint_selector_factory_; // If not, look in the service repository for an instance. @@ -1854,7 +1854,7 @@ TAO_ORB_Core::set_network_priority_protocols_hooks ( } void -TAO_ORB_Core::services_callbacks_init (void) +TAO_ORB_Core::services_callbacks_init () { // We (should) know what are the services that would need // callbacks. So, what we do is go through the Service Configurator @@ -1899,9 +1899,9 @@ TAO_ORB_Core::service_raise_transient_failure ( } TAO_Client_Strategy_Factory * -TAO_ORB_Core::client_factory (void) +TAO_ORB_Core::client_factory () { - if (this->client_factory_ == 0) + if (this->client_factory_ == nullptr) { // Look in the service repository for an instance. this->client_factory_ = @@ -1914,9 +1914,9 @@ TAO_ORB_Core::client_factory (void) } TAO_Server_Strategy_Factory * -TAO_ORB_Core::server_factory (void) +TAO_ORB_Core::server_factory () { - if (this->server_factory_ == 0) + if (this->server_factory_ == nullptr) { // Look in the service repository for an instance. this->server_factory_ = @@ -1929,7 +1929,7 @@ TAO_ORB_Core::server_factory (void) } CORBA::Object_ptr -TAO_ORB_Core::root_poa (void) +TAO_ORB_Core::root_poa () { // DCL .. if (CORBA::is_nil (this->root_poa_.in ())) @@ -1943,7 +1943,7 @@ TAO_ORB_Core::root_poa (void) (this->configuration (), this->orb_params ()->poa_factory_name ()); - if (factory == 0) + if (factory == nullptr) { this->configuration()->process_directive ( this->orb_params ()->poa_factory_directive ()); @@ -1954,7 +1954,7 @@ TAO_ORB_Core::root_poa (void) this->orb_params ()->poa_factory_name ()); } - if (factory == 0) + if (factory == nullptr) { return CORBA::Object::_nil (); } @@ -1962,7 +1962,7 @@ TAO_ORB_Core::root_poa (void) ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, monitor, this->open_lock_, - 0); + nullptr); if (CORBA::is_nil (this->root_poa_.in ())) { @@ -1986,12 +1986,12 @@ TAO_ORB_Core::root_poa (void) } TAO_Adapter * -TAO_ORB_Core::poa_adapter (void) +TAO_ORB_Core::poa_adapter () { - if (this->poa_adapter_ == 0) + if (this->poa_adapter_ == nullptr) { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); - if (this->poa_adapter_ == 0) + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); + if (this->poa_adapter_ == nullptr) { this->poa_adapter_ = this->adapter_registry_.find_adapter ("RootPOA"); @@ -2033,7 +2033,7 @@ TAO_ORB_Core::create_stub_object (TAO_MProfile &mprofile, // orbos\98-05-05.pdf Section 5.4) if (policy_list->length () != 0) { - TAO_Profile * profile = 0; + TAO_Profile * profile = nullptr; CORBA::ULong const count = mprofile.profile_count (); for (CORBA::ULong i = 0; i < count; ++i) @@ -2055,7 +2055,7 @@ TAO_ORB_Core::create_stub_object (TAO_MProfile &mprofile, void TAO_ORB_Core::load_policy_validators (TAO_Policy_Validator &validator) { - if (this->bidir_adapter_ == 0) + if (this->bidir_adapter_ == nullptr) { this->bidir_adapter_ = ACE_Dynamic_Service<TAO_BiDir_Adapter>::instance @@ -2085,7 +2085,7 @@ TAO_ORB_Core::create_object (TAO_Stub *stub) // @@ We should thow CORBA::NO_MEMORY in platforms with exceptions, // but we are stuck in platforms without exceptions! TAO_ORB_Core_Auto_Ptr collocated_orb_core; - CORBA::Object_ptr x = 0; + CORBA::Object_ptr x = nullptr; { // Lock the ORB_Table against concurrent modification while we @@ -2123,7 +2123,7 @@ TAO_ORB_Core::create_object (TAO_Stub *stub) // Remote one. ACE_NEW_RETURN (x, CORBA::Object (stub, 0), - 0); + nullptr); } return x; @@ -2198,7 +2198,7 @@ TAO_ORB_Core::is_collocation_enabled (TAO_ORB_Core *orb_core, { TAO_MProfile mp_temp; - TAO_Profile* profile = 0; + TAO_Profile* profile = nullptr; if (this->service_profile_selection(mp, profile) && profile) { if (mp_temp.add_profile(profile) == -1) @@ -2239,13 +2239,13 @@ TAO_ORB_Core::is_collocated (const TAO_MProfile& mprofile) // **************************************************************** TAO_Leader_Follower & -TAO_ORB_Core::leader_follower (void) +TAO_ORB_Core::leader_follower () { return this->lane_resources ().leader_follower (); } TAO_LF_Strategy & -TAO_ORB_Core::lf_strategy (void) +TAO_ORB_Core::lf_strategy () { return this->thread_lane_resources_manager ().lf_strategy (); } @@ -2333,7 +2333,7 @@ TAO_ORB_Core::run (ACE_Time_Value *tv, int perform_work) break; } if (result == 0 - && tv != 0 + && tv != nullptr && *tv == ACE_Time_Value::zero) { // A timeout, terminate the loop... @@ -2352,7 +2352,7 @@ TAO_ORB_Core::run (ACE_Time_Value *tv, int perform_work) // wait only in the parent thread. if (this->has_shutdown () == true && (this->server_factory_->activate_server_connections () || - (this->tm_.task() == 0 && this->tm_.count_threads() > 0) ) ) + (this->tm_.task() == nullptr && this->tm_.count_threads() > 0) ) ) { this->tm_.wait (); } @@ -2415,7 +2415,7 @@ TAO_ORB_Core::shutdown (CORBA::Boolean wait_for_completion) ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_); delete this->valuetype_adapter_; - this->valuetype_adapter_ = 0; + this->valuetype_adapter_ = nullptr; } // Explicitly destroy the object reference table since it @@ -2436,7 +2436,7 @@ TAO_ORB_Core::shutdown (CORBA::Boolean wait_for_completion) } void -TAO_ORB_Core::destroy (void) +TAO_ORB_Core::destroy () { // All destroy() should do is (a) call shutdown() and (b) unbind() // from the ORB table. Nothing else should really be added to this @@ -2472,7 +2472,7 @@ TAO_ORB_Core::destroy (void) } void -TAO_ORB_Core::check_shutdown (void) +TAO_ORB_Core::check_shutdown () { if (this->has_shutdown ()) { @@ -2485,36 +2485,36 @@ TAO_ORB_Core::check_shutdown (void) } void -TAO_ORB_Core::destroy_interceptors (void) +TAO_ORB_Core::destroy_interceptors () { try { ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_); #if TAO_HAS_INTERCEPTORS == 1 - if (this->client_request_interceptor_adapter_ != 0) + if (this->client_request_interceptor_adapter_ != nullptr) { this->client_request_interceptor_adapter_->destroy_interceptors (); delete this->client_request_interceptor_adapter_; - this->client_request_interceptor_adapter_ = 0; + this->client_request_interceptor_adapter_ = nullptr; } - if (this->server_request_interceptor_adapter_ != 0) + if (this->server_request_interceptor_adapter_ != nullptr) { this->server_request_interceptor_adapter_->destroy_interceptors (); delete this->server_request_interceptor_adapter_; - this->server_request_interceptor_adapter_ = 0; + this->server_request_interceptor_adapter_ = nullptr; } #endif /* TAO_HAS_INTERCEPTORS == 1 */ - if (this->ior_interceptor_adapter_ != 0) + if (this->ior_interceptor_adapter_ != nullptr) { this->ior_interceptor_adapter_->destroy_interceptors (); - this->ior_interceptor_adapter_ = 0; + this->ior_interceptor_adapter_ = nullptr; } } @@ -2533,20 +2533,20 @@ TAO_ORB_Core::destroy_interceptors (void) } TAO_Thread_Lane_Resources & -TAO_ORB_Core::lane_resources (void) +TAO_ORB_Core::lane_resources () { return this->thread_lane_resources_manager ().lane_resources (); } void -TAO_ORB_Core::resolve_typecodefactory_i (void) +TAO_ORB_Core::resolve_typecodefactory_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration (), ACE_TEXT ("TypeCodeFactory_Loader")); - if (loader == 0) + if (loader == nullptr) { this->configuration ()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("TypeCodeFactory", @@ -2559,7 +2559,7 @@ TAO_ORB_Core::resolve_typecodefactory_i (void) (this->configuration (), ACE_TEXT ("TypeCodeFactory_Loader")); - if (loader == 0) + if (loader == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) Unable to instantiate ") @@ -2569,18 +2569,18 @@ TAO_ORB_Core::resolve_typecodefactory_i (void) } this->typecode_factory_ = - loader->create_object (this->orb_, 0, 0); + loader->create_object (this->orb_, 0, nullptr); } void -TAO_ORB_Core::resolve_codecfactory_i (void) +TAO_ORB_Core::resolve_codecfactory_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration (), ACE_TEXT ("CodecFactory_Loader")); - if (loader == 0) + if (loader == nullptr) { this->configuration()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("CodecFactory", @@ -2593,22 +2593,22 @@ TAO_ORB_Core::resolve_codecfactory_i (void) (this->configuration (), ACE_TEXT ("CodecFactory_Loader")); } - if (loader != 0) + if (loader != nullptr) { this->codec_factory_ = - loader->create_object (this->orb_, 0, 0); + loader->create_object (this->orb_, 0, nullptr); } } void -TAO_ORB_Core::resolve_compression_manager_i (void) +TAO_ORB_Core::resolve_compression_manager_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration (), ACE_TEXT ("Compression_Loader")); - if (loader == 0) + if (loader == nullptr) { this->configuration()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("Compression", @@ -2621,21 +2621,21 @@ TAO_ORB_Core::resolve_compression_manager_i (void) (this->configuration (), ACE_TEXT ("Compression_Loader")); } - if (loader != 0) + if (loader != nullptr) { - this->compression_manager_ = loader->create_object (this->orb_, 0, 0); + this->compression_manager_ = loader->create_object (this->orb_, 0, nullptr); } } void -TAO_ORB_Core::resolve_poa_current_i (void) +TAO_ORB_Core::resolve_poa_current_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration(), ACE_TEXT ("TAO_POA_Current_Factory")); - if (loader == 0) + if (loader == nullptr) { this->configuration()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("TAO_POA_Current_Factory", @@ -2648,9 +2648,9 @@ TAO_ORB_Core::resolve_poa_current_i (void) (this->configuration(), ACE_TEXT ("TAO_POA_Current_Factory")); } - if (loader != 0) + if (loader != nullptr) { - this->poa_current_ = loader->create_object (this->orb_, 0, 0); + this->poa_current_ = loader->create_object (this->orb_, 0, nullptr); } } @@ -2658,14 +2658,14 @@ TAO_ORB_Core::resolve_poa_current_i (void) #if TAO_HAS_INTERCEPTORS == 1 void -TAO_ORB_Core::resolve_picurrent_i (void) +TAO_ORB_Core::resolve_picurrent_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration (), ACE_TEXT ("PICurrent_Loader")); - if (loader == 0) + if (loader == nullptr) { this->configuration ()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("PICurrent_Loader", @@ -2678,9 +2678,9 @@ TAO_ORB_Core::resolve_picurrent_i (void) (this->configuration (), ACE_TEXT ("PICurrent_Loader")); } - if (loader != 0) + if (loader != nullptr) { - CORBA::Object_ptr pi = loader->create_object (this->orb_, 0, 0); + CORBA::Object_ptr pi = loader->create_object (this->orb_, 0, nullptr); this->pi_current_ = pi; } @@ -2690,14 +2690,14 @@ TAO_ORB_Core::resolve_picurrent_i (void) void -TAO_ORB_Core::resolve_dynanyfactory_i (void) +TAO_ORB_Core::resolve_dynanyfactory_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration (), ACE_TEXT ("DynamicAny_Loader")); - if (loader == 0) + if (loader == nullptr) { this->configuration ()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("DynamicAny_Loader", @@ -2711,21 +2711,21 @@ TAO_ORB_Core::resolve_dynanyfactory_i (void) ACE_TEXT ("DynamicAny_Loader")); } - if (loader != 0) + if (loader != nullptr) { - this->dynany_factory_ = loader->create_object (this->orb_, 0, 0); + this->dynany_factory_ = loader->create_object (this->orb_, 0, nullptr); } } void -TAO_ORB_Core::resolve_iormanipulation_i (void) +TAO_ORB_Core::resolve_iormanipulation_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration (), ACE_TEXT ("IORManip_Loader")); - if (loader == 0) + if (loader == nullptr) { this->configuration()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("IORManip_Loader", @@ -2738,19 +2738,19 @@ TAO_ORB_Core::resolve_iormanipulation_i (void) (this->configuration (), ACE_TEXT ("IORManip_Loader")); } - if (loader != 0) + if (loader != nullptr) { - this->ior_manip_factory_ = loader->create_object (this->orb_, 0, 0); + this->ior_manip_factory_ = loader->create_object (this->orb_, 0, nullptr); } } void -TAO_ORB_Core::resolve_ior_table_i (void) +TAO_ORB_Core::resolve_ior_table_i () { TAO_Adapter_Factory *factory = ACE_Dynamic_Service<TAO_Adapter_Factory>::instance (this->configuration (), ACE_TEXT("TAO_IORTable")); - if (factory == 0) + if (factory == nullptr) { this->configuration ()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("TAO_IORTable", @@ -2763,7 +2763,7 @@ TAO_ORB_Core::resolve_ior_table_i (void) (this->configuration (), ACE_TEXT("TAO_IORTable")); } - if (factory != 0) + if (factory != nullptr) { ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this)); iortable_adapter->open (); @@ -2779,12 +2779,12 @@ TAO_ORB_Core::resolve_ior_table_i (void) } void -TAO_ORB_Core::resolve_async_ior_table_i (void) +TAO_ORB_Core::resolve_async_ior_table_i () { TAO_Adapter_Factory *factory = ACE_Dynamic_Service<TAO_Adapter_Factory>::instance (this->configuration (), ACE_TEXT("TAO_Async_IORTable")); - if (factory == 0) + if (factory == nullptr) { this->configuration ()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("TAO_Async_IORTable", @@ -2797,7 +2797,7 @@ TAO_ORB_Core::resolve_async_ior_table_i (void) (this->configuration (), ACE_TEXT("TAO_Async_IORTable")); } - if (factory != 0) + if (factory != nullptr) { ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this)); iortable_adapter->open (); @@ -2813,14 +2813,14 @@ TAO_ORB_Core::resolve_async_ior_table_i (void) } void -TAO_ORB_Core::resolve_monitor_i (void) +TAO_ORB_Core::resolve_monitor_i () { TAO_Object_Loader *loader = ACE_Dynamic_Service<TAO_Object_Loader>::instance (this->configuration (), ACE_TEXT ("Monitor_Init")); - if (loader == 0) + if (loader == nullptr) { this->configuration ()->process_directive (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("Monitor_Init", @@ -2834,9 +2834,9 @@ TAO_ORB_Core::resolve_monitor_i (void) ACE_TEXT ("Monitor_Init")); } - if (loader != 0) + if (loader != nullptr) { - this->monitor_ = loader->create_object (this->orb_, 0, 0); + this->monitor_ = loader->create_object (this->orb_, 0, nullptr); } } @@ -2918,7 +2918,7 @@ TAO_ORB_Core::resolve_rir (const char *name) } CORBA::ORB::ObjectIdList * -TAO_ORB_Core::list_initial_references (void) +TAO_ORB_Core::list_initial_references () { // Unsupported initial services should NOT be included in the below list! static const char *initial_services[] = { TAO_LIST_OF_INITIAL_SERVICES }; @@ -2933,7 +2933,7 @@ TAO_ORB_Core::list_initial_references (void) + this->init_ref_map_.size () + this->object_ref_table_.current_size (); - CORBA::ORB::ObjectIdList *tmp = 0; + CORBA::ORB::ObjectIdList *tmp = nullptr; ACE_NEW_THROW_EX (tmp, CORBA::ORB::ObjectIdList ( @@ -2976,46 +2976,46 @@ TAO_ORB_Core::list_initial_references (void) // **************************************************************** ACE_Allocator* -TAO_ORB_Core::input_cdr_dblock_allocator (void) +TAO_ORB_Core::input_cdr_dblock_allocator () { return this->lane_resources ().input_cdr_dblock_allocator (); } ACE_Allocator* -TAO_ORB_Core::input_cdr_buffer_allocator (void) +TAO_ORB_Core::input_cdr_buffer_allocator () { return this->lane_resources ().input_cdr_buffer_allocator (); } ACE_Allocator* -TAO_ORB_Core::input_cdr_msgblock_allocator (void) +TAO_ORB_Core::input_cdr_msgblock_allocator () { return this->lane_resources ().input_cdr_msgblock_allocator (); } ACE_Allocator* -TAO_ORB_Core::output_cdr_dblock_allocator (void) +TAO_ORB_Core::output_cdr_dblock_allocator () { return this->lane_resources ().output_cdr_dblock_allocator (); } ACE_Allocator* -TAO_ORB_Core::output_cdr_buffer_allocator (void) +TAO_ORB_Core::output_cdr_buffer_allocator () { return this->lane_resources ().output_cdr_buffer_allocator (); } ACE_Allocator* -TAO_ORB_Core::output_cdr_msgblock_allocator (void) +TAO_ORB_Core::output_cdr_msgblock_allocator () { return this->lane_resources ().output_cdr_msgblock_allocator (); } ACE_Allocator * -TAO_ORB_Core::transport_message_buffer_allocator (void) +TAO_ORB_Core::transport_message_buffer_allocator () { return this->lane_resources ().transport_message_buffer_allocator (); } @@ -3025,15 +3025,15 @@ ACE_Data_Block* TAO_ORB_Core::create_input_cdr_data_block (size_t size) { - ACE_Allocator *dblock_allocator = 0; - ACE_Allocator *buffer_allocator = 0; + ACE_Allocator *dblock_allocator = nullptr; + ACE_Allocator *buffer_allocator = nullptr; dblock_allocator = this->input_cdr_dblock_allocator (); buffer_allocator = this->input_cdr_buffer_allocator (); - ACE_Lock* lock_strategy = 0; + ACE_Lock* lock_strategy = nullptr; if (this->resource_factory ()->use_locked_data_blocks ()) { lock_strategy = &this->data_block_lock_; @@ -3051,7 +3051,7 @@ TAO_ORB_Core::create_data_block_i (size_t size, ACE_Allocator *dblock_allocator, ACE_Lock *lock_strategy) { - ACE_Data_Block *nb = 0; + ACE_Data_Block *nb = nullptr; ACE_NEW_MALLOC_RETURN ( nb, @@ -3059,18 +3059,18 @@ TAO_ORB_Core::create_data_block_i (size_t size, dblock_allocator->malloc (sizeof (ACE_Data_Block))), ACE_Data_Block (size, ACE_Message_Block::MB_DATA, - 0, + nullptr, buffer_allocator, lock_strategy, 0, dblock_allocator), - 0); + nullptr); return nb; } TAO_Connector_Registry * -TAO_ORB_Core::connector_registry (void) +TAO_ORB_Core::connector_registry () { TAO_Connector_Registry *conn = this->lane_resources ().connector_registry (); @@ -3088,13 +3088,13 @@ TAO_ORB_Core::fragmentation_strategy (TAO_Transport * transport) } ACE_Reactor * -TAO_ORB_Core::reactor (void) +TAO_ORB_Core::reactor () { return this->leader_follower ().reactor (); } CORBA::Object_ptr -TAO_ORB_Core::implrepo_service (void) +TAO_ORB_Core::implrepo_service () { if (!this->use_implrepo_) return CORBA::Object::_nil (); @@ -3130,7 +3130,7 @@ TAO_ORB_Core::default_sync_scope_hook (TAO_ORB_Core *oc, Messaging::SyncScope &scope) { has_synchronization = true; - scope = (oc == 0) ? Messaging::SYNC_WITH_TRANSPORT : oc->default_sync_scope_; + scope = (oc == nullptr) ? Messaging::SYNC_WITH_TRANSPORT : oc->default_sync_scope_; } void @@ -3140,7 +3140,7 @@ TAO_ORB_Core::call_sync_scope_hook (TAO_Stub *stub, { Sync_Scope_Hook sync_scope_hook = this->sync_scope_hook_; - if (sync_scope_hook == 0) + if (sync_scope_hook == nullptr) { has_synchronization = false; return; @@ -3176,7 +3176,7 @@ TAO_ORB_Core::get_transport_queueing_strategy (TAO_Stub *, break; default: { - return 0; + return nullptr; } } } @@ -3196,7 +3196,7 @@ TAO_ORB_Core::call_timeout_hook (TAO_Stub *stub, { Timeout_Hook timeout_hook = this->timeout_hook_; - if (timeout_hook == 0) + if (timeout_hook == nullptr) { has_timeout = false; return; @@ -3212,7 +3212,7 @@ TAO_ORB_Core::connection_timeout (TAO_Stub *stub, Timeout_Hook connection_timeout_hook = TAO_ORB_Core_Static_Resources::instance ()->connection_timeout_hook_; - if (connection_timeout_hook == 0) + if (connection_timeout_hook == nullptr) { has_timeout = false; return; @@ -3223,7 +3223,7 @@ TAO_ORB_Core::connection_timeout (TAO_Stub *stub, Timeout_Hook alt_connection_timeout_hook = TAO_ORB_Core_Static_Resources::instance ()->alt_connection_timeout_hook_; - if (alt_connection_timeout_hook == 0) + if (alt_connection_timeout_hook == nullptr) return; if (!has_timeout || time_value == ACE_Time_Value::zero ) @@ -3267,7 +3267,7 @@ TAO_ORB_Core::connection_timeout_hook (Timeout_Hook hook) // keep this code lockless as it always was, assuming no // simultanious overwrite will occur. - if (TOCSRi->connection_timeout_hook_ == 0) + if (TOCSRi->connection_timeout_hook_ == nullptr) { if (TAO_debug_level > 2) { @@ -3278,7 +3278,7 @@ TAO_ORB_Core::connection_timeout_hook (Timeout_Hook hook) TOCSRi->connection_timeout_hook_ = hook; } else if (TOCSRi->connection_timeout_hook_ != hook && - TOCSRi->alt_connection_timeout_hook_ == 0) + TOCSRi->alt_connection_timeout_hook_ == nullptr) { if (TAO_debug_level > 2) { @@ -3308,7 +3308,7 @@ TAO_ORB_Core::get_policy (CORBA::PolicyType type) CORBA::Policy_var result; TAO_Policy_Manager *policy_manager = this->policy_manager (); - if (policy_manager != 0) + if (policy_manager != nullptr) { result = policy_manager->get_policy (type); } @@ -3342,7 +3342,7 @@ TAO_ORB_Core::get_cached_policy (TAO_Cached_Policy_Type type) CORBA::Policy_var result; TAO_Policy_Manager *policy_manager = this->policy_manager (); - if (policy_manager != 0) + if (policy_manager != nullptr) { result = policy_manager->get_cached_policy (type); } @@ -3373,7 +3373,7 @@ TAO_ORB_Core::get_cached_policy_including_current (TAO_Cached_Policy_Type type) #endif /* (TAO_HAS_CORBA_MESSAGING == 1) */ CORBA::Environment * -TAO_ORB_Core::default_environment (void) const +TAO_ORB_Core::default_environment () const { return TAO_TSS_Resources::instance ()->default_environment_; } @@ -3404,16 +3404,16 @@ TAO_ORB_Core::add_interceptor ( } TAO_IORInterceptor_Adapter * -TAO_ORB_Core::ior_interceptor_adapter (void) +TAO_ORB_Core::ior_interceptor_adapter () { - if (this->ior_interceptor_adapter_ == 0) + if (this->ior_interceptor_adapter_ == nullptr) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, - 0); + nullptr); - if (this->ior_interceptor_adapter_ == 0) + if (this->ior_interceptor_adapter_ == nullptr) { try { @@ -3462,16 +3462,16 @@ TAO_ORB_Core::add_interceptor ( } TAO::ClientRequestInterceptor_Adapter * -TAO_ORB_Core::clientrequestinterceptor_adapter_i (void) +TAO_ORB_Core::clientrequestinterceptor_adapter_i () { - if (this->client_request_interceptor_adapter_ == 0) + if (this->client_request_interceptor_adapter_ == nullptr) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, - 0); + nullptr); - if (this->client_request_interceptor_adapter_ == 0) + if (this->client_request_interceptor_adapter_ == nullptr) { TAO_ClientRequestInterceptor_Adapter_Factory *factory = ACE_Dynamic_Service<TAO_ClientRequestInterceptor_Adapter_Factory>::instance @@ -3559,16 +3559,16 @@ TAO_ORB_Core::add_interceptor ( } TAO::ServerRequestInterceptor_Adapter * -TAO_ORB_Core::serverrequestinterceptor_adapter_i (void) +TAO_ORB_Core::serverrequestinterceptor_adapter_i () { - if (this->server_request_interceptor_adapter_ == 0) + if (this->server_request_interceptor_adapter_ == nullptr) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, - 0); + nullptr); - if (this->server_request_interceptor_adapter_ == 0) + if (this->server_request_interceptor_adapter_ == nullptr) { TAO_ServerRequestInterceptor_Adapter_Factory *factory = ACE_Dynamic_Service<TAO_ServerRequestInterceptor_Adapter_Factory>::instance @@ -3589,16 +3589,16 @@ TAO_ORB_Core::serverrequestinterceptor_adapter_i (void) #endif /* TAO_HAS_INTERCEPTORS == 1 */ TAO_Valuetype_Adapter * -TAO_ORB_Core::valuetype_adapter (void) +TAO_ORB_Core::valuetype_adapter () { - if (this->valuetype_adapter_ == 0) + if (this->valuetype_adapter_ == nullptr) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, - 0); + nullptr); - if (this->valuetype_adapter_ == 0) + if (this->valuetype_adapter_ == nullptr) { try { @@ -3618,7 +3618,7 @@ TAO_ORB_Core::valuetype_adapter (void) } } - if (this->valuetype_adapter_ == 0) + if (this->valuetype_adapter_ == nullptr) { throw ::CORBA::INTERNAL (); } @@ -3638,11 +3638,11 @@ TAO_ORB_Core::register_value_factory (const char *repository_id, { if (this->valuetype_adapter ()) { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->valuetype_adapter_ == 0) + if (this->valuetype_adapter_ == nullptr) { - return 0; + return nullptr; } int const result = @@ -3650,7 +3650,7 @@ TAO_ORB_Core::register_value_factory (const char *repository_id, if (result == 0) // No previous factory found { - return 0; + return nullptr; } if (result == -1) @@ -3672,7 +3672,7 @@ TAO_ORB_Core::unregister_value_factory (const char *repository_id) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); - if (this->valuetype_adapter_ == 0) + if (this->valuetype_adapter_ == nullptr) { return; } @@ -3689,34 +3689,34 @@ TAO_ORB_Core::lookup_value_factory (const char *repository_id) { if (this->valuetype_adapter ()) { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->valuetype_adapter_ == 0) + if (this->valuetype_adapter_ == nullptr) { - return 0; + return nullptr; } return this->valuetype_adapter_->vf_map_find (repository_id); } - return 0; + return nullptr; } #endif // **************************************************************** TAO_Export TAO_ORB_Core * -TAO_ORB_Core_instance (void) +TAO_ORB_Core_instance () { // @@ This is a slight violation of layering, we should use // TAO_ORB_Core_instance(), but that breaks during startup. TAO::ORB_Table * const orb_table = TAO::ORB_Table::instance (); - if (orb_table->first_orb () == 0) + if (orb_table->first_orb () == nullptr) { ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX, guard, - *ACE_Static_Object_Lock::instance (), 0)); + *ACE_Static_Object_Lock::instance (), nullptr)); - if (orb_table->first_orb () == 0) + if (orb_table->first_orb () == nullptr) { // Calling CORBA::ORB_init() returns a duplicated ORB // reference, so make sure that reference is stored in an @@ -3729,7 +3729,7 @@ TAO_ORB_Core_instance (void) try { int argc = 0; - ACE_TCHAR **const argv= 0; + ACE_TCHAR **const argv= nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); } diff --git a/TAO/tao/ORB_Core_Auto_Ptr.cpp b/TAO/tao/ORB_Core_Auto_Ptr.cpp index 44b464abf54..e3904b7661e 100644 --- a/TAO/tao/ORB_Core_Auto_Ptr.cpp +++ b/TAO/tao/ORB_Core_Auto_Ptr.cpp @@ -8,9 +8,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_ORB_Core_Auto_Ptr::~TAO_ORB_Core_Auto_Ptr (void) +TAO_ORB_Core_Auto_Ptr::~TAO_ORB_Core_Auto_Ptr () { - if (this->get () != 0) + if (this->get () != nullptr) { this->get ()->_decr_refcnt (); } @@ -19,7 +19,7 @@ TAO_ORB_Core_Auto_Ptr::~TAO_ORB_Core_Auto_Ptr (void) void TAO_ORB_Core_Auto_Ptr::reset (TAO_ORB_Core *p) { - if (this->get () != p && this->get () != 0) + if (this->get () != p && this->get () != nullptr) { this->get ()->_decr_refcnt (); } diff --git a/TAO/tao/ORB_Core_TSS_Resources.cpp b/TAO/tao/ORB_Core_TSS_Resources.cpp index 7e554596102..f59d131c6d6 100644 --- a/TAO/tao/ORB_Core_TSS_Resources.cpp +++ b/TAO/tao/ORB_Core_TSS_Resources.cpp @@ -3,29 +3,29 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_ORB_Core_TSS_Resources::TAO_ORB_Core_TSS_Resources (void) +TAO_ORB_Core_TSS_Resources::TAO_ORB_Core_TSS_Resources () : event_loop_thread_ (0) , client_leader_thread_ (0) - , lane_ (0) + , lane_ (nullptr) , ts_objects_ () , upcalls_temporarily_suspended_on_this_thread_ (false) - , orb_core_ (0) + , orb_core_ (nullptr) { } -TAO_ORB_Core_TSS_Resources::~TAO_ORB_Core_TSS_Resources (void) +TAO_ORB_Core_TSS_Resources::~TAO_ORB_Core_TSS_Resources () { this->fini (); } void -TAO_ORB_Core_TSS_Resources::fini (void) +TAO_ORB_Core_TSS_Resources::fini () { - if (this->orb_core_ != 0) + if (this->orb_core_ != nullptr) { this->orb_core_->tss_cleanup (this->ts_objects_); } - this->orb_core_ = 0; + this->orb_core_ = nullptr; } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/ORB_Table.cpp b/TAO/tao/ORB_Table.cpp index d31aea67b24..174c9272ecf 100644 --- a/TAO/tao/ORB_Table.cpp +++ b/TAO/tao/ORB_Table.cpp @@ -11,11 +11,11 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::ORB_Table::ORB_Table (void) +TAO::ORB_Table::ORB_Table () : lock_ (), first_orb_not_default_ (false), table_ (TAO_DEFAULT_ORB_TABLE_SIZE), - first_orb_ (0) + first_orb_ (nullptr) { } @@ -25,7 +25,7 @@ TAO::ORB_Table::bind (char const * orb_id, { // Make sure that the supplied ORB core pointer is valid, // i.e. non-zero. - if (orb_id == 0 || orb_core == 0) + if (orb_id == nullptr || orb_core == nullptr) { errno = EINVAL; return -1; @@ -46,7 +46,7 @@ TAO::ORB_Table::bind (char const * orb_id, // This is not the first ORB, but if the current default ORB // decided not to be the default and there is more than one ORB // then set this ORB to be the default. - if (this->first_orb_ != 0 + if (this->first_orb_ != nullptr && this->first_orb_not_default_) { this->first_orb_ = orb_core; @@ -55,7 +55,7 @@ TAO::ORB_Table::bind (char const * orb_id, // Set the "first_orb_" member for the first given ORB Core // that was successfully added to the ORB table. - if (this->first_orb_ == 0) + if (this->first_orb_ == nullptr) { this->first_orb_ = orb_core; } @@ -67,12 +67,12 @@ TAO::ORB_Table::bind (char const * orb_id, TAO_ORB_Core * TAO::ORB_Table::find (char const * orb_id) { - TAO_ORB_Core * orb_core = 0; + TAO_ORB_Core * orb_core = nullptr; ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->lock_, - 0); + nullptr); iterator const i = this->table_.find (Table::key_type (orb_id)); @@ -110,7 +110,7 @@ TAO::ORB_Table::unbind (const char *orb_id) } else { - this->first_orb_ = 0; + this->first_orb_ = nullptr; } } } @@ -145,7 +145,7 @@ TAO::ORB_Table::not_default (char const * orb_id) // Check if there is a default ORB already and if it is *not* the // same as the orb_id thats passed in. We don't have to do // anything. - if (this->first_orb_ != 0) + if (this->first_orb_ != nullptr) { if (ACE_OS::strcmp (this->first_orb_->orbid (), orb_id) != 0) { @@ -162,7 +162,7 @@ TAO::ORB_Table::not_default (char const * orb_id) } TAO::ORB_Table * -TAO::ORB_Table::instance (void) +TAO::ORB_Table::instance () { return TAO_Singleton<TAO::ORB_Table, TAO_SYNCH_MUTEX>::instance (); } diff --git a/TAO/tao/ORB_Time_Policy.cpp b/TAO/tao/ORB_Time_Policy.cpp index a8c9fe9672a..242197c6362 100644 --- a/TAO/tao/ORB_Time_Policy.cpp +++ b/TAO/tao/ORB_Time_Policy.cpp @@ -13,13 +13,13 @@ namespace TAO void ORB_Time_Policy::set_time_policy (ACE_Dynamic_Time_Policy_Base const * pol) { - if (pol != 0 ) + if (pol != nullptr ) { active_policy_ = pol; } } - void ORB_Time_Policy::reset_time_policy (void) + void ORB_Time_Policy::reset_time_policy () { active_policy_ = &default_policy_; } diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index ccaf4269378..d89c8df39e3 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -30,7 +30,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -CORBA::Object::~Object (void) +CORBA::Object::~Object () { if (this->protocol_proxy_) (void) this->protocol_proxy_->_decr_refcnt (); @@ -43,16 +43,16 @@ CORBA::Object::Object (TAO_Stub * protocol_proxy, : refcount_ (1) , is_local_ (false) , is_evaluated_ (true) - , ior_ (0) + , ior_ (nullptr) , orb_core_ (orb_core) , protocol_proxy_ (protocol_proxy) { /// This constructor should not be called when the protocol proxy is /// null ie. when the object is a LocalObject. Assert that /// requirement. - ACE_ASSERT (this->protocol_proxy_ != 0); + ACE_ASSERT (this->protocol_proxy_ != nullptr); - if (this->orb_core_ == 0) + if (this->orb_core_ == nullptr) this->orb_core_ = this->protocol_proxy_->orb_core (); // Set the collocation marker on the stub. This may not be news to it. @@ -70,7 +70,7 @@ CORBA::Object::Object (IOP::IOR *ior, , is_evaluated_ (false) , ior_ (ior) , orb_core_ (orb_core) - , protocol_proxy_ (0) + , protocol_proxy_ (nullptr) { } @@ -93,13 +93,13 @@ if (!this->is_evaluated_) \ } void -CORBA::Object::_add_ref (void) +CORBA::Object::_add_ref () { ++this->refcount_; } void -CORBA::Object::_remove_ref (void) +CORBA::Object::_remove_ref () { if (--this->refcount_ == 0) { @@ -108,7 +108,7 @@ CORBA::Object::_remove_ref (void) } CORBA::ULong -CORBA::Object::_refcount_value(void) const +CORBA::Object::_refcount_value() const { #if defined (ACE_HAS_CPP11) return this->refcount_; @@ -134,7 +134,7 @@ CORBA::Object::marshal (TAO_OutputCDR &cdr) /*static*/ CORBA::Boolean CORBA::Object::marshal (const CORBA::Object_ptr x, TAO_OutputCDR &cdr) { - if (x == 0) + if (x == nullptr) { // NIL objrefs ... marshal as empty type hint, no elements. cdr.write_ulong (1); @@ -164,7 +164,7 @@ CORBA::Object::_tao_stream_v (std::ostream &strm) const #endif /* GEN_OSTREAM_OPS */ bool -CORBA::Object::can_convert_to_ior (void) const +CORBA::Object::can_convert_to_ior () const { // By default, objects can not be stringified if they are local return !this->_is_local (); @@ -173,16 +173,16 @@ CORBA::Object::can_convert_to_ior (void) const char* CORBA::Object::convert_to_ior (bool, const char*) const { - return 0; + return nullptr; } TAO_Abstract_ServantBase* -CORBA::Object::_servant (void) const +CORBA::Object::_servant () const { - if (this->protocol_proxy_ == 0) + if (this->protocol_proxy_ == nullptr) { // No stub set. Should not happen. - return 0; + return nullptr; } return this->protocol_proxy_->collocated_servant (); @@ -212,7 +212,7 @@ CORBA::Object::_is_a (const char *type_id) // // XXX if type_id is that of CORBA::Object, "yes, we comply" :-) - if (this->protocol_proxy_ == 0) + if (this->protocol_proxy_ == nullptr) { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -222,7 +222,7 @@ CORBA::Object::_is_a (const char *type_id) throw ::CORBA::NO_IMPLEMENT (); } - if (this->_stubobj ()->type_id.in () != 0 + if (this->_stubobj ()->type_id.in () != nullptr && ACE_OS::strcmp (type_id, this->_stubobj ()->type_id.in ()) == 0) return true; @@ -231,13 +231,13 @@ CORBA::Object::_is_a (const char *type_id) } const char* -CORBA::Object::_interface_repository_id (void) const +CORBA::Object::_interface_repository_id () const { return "IDL:omg.org/CORBA/Object:1.0"; } CORBA::Boolean -CORBA::Object::_is_collocated (void) const +CORBA::Object::_is_collocated () const { if (this->protocol_proxy_) { @@ -248,19 +248,19 @@ CORBA::Object::_is_collocated (void) const } CORBA::Boolean -CORBA::Object::_is_local (void) const +CORBA::Object::_is_local () const { return this->is_local_; } TAO_Stub * -CORBA::Object::_stubobj (void) const +CORBA::Object::_stubobj () const { return this->protocol_proxy_; } TAO_Stub * -CORBA::Object::_stubobj (void) +CORBA::Object::_stubobj () { TAO_OBJECT_IOR_EVALUATE_RETURN; return this->protocol_proxy_; @@ -271,7 +271,7 @@ CORBA::Object::_hash (CORBA::ULong maximum) { TAO_OBJECT_IOR_EVALUATE_RETURN; - if (this->protocol_proxy_ != 0) + if (this->protocol_proxy_ != nullptr) return this->protocol_proxy_->hash (maximum); else { @@ -291,7 +291,7 @@ CORBA::Object::_hash (CORBA::ULong maximum) CORBA::Boolean CORBA::Object::_is_equivalent (CORBA::Object_ptr other_obj) { - if (other_obj == 0) + if (other_obj == nullptr) { return false; } @@ -303,7 +303,7 @@ CORBA::Object::_is_equivalent (CORBA::Object_ptr other_obj) TAO_OBJECT_IOR_EVALUATE_RETURN; - if (this->protocol_proxy_ != 0) + if (this->protocol_proxy_ != nullptr) return this->protocol_proxy_->is_equivalent (other_obj); return false; @@ -312,7 +312,7 @@ CORBA::Object::_is_equivalent (CORBA::Object_ptr other_obj) // TAO's extensions TAO::ObjectKey * -CORBA::Object::_key (void) +CORBA::Object::_key () { TAO_OBJECT_IOR_EVALUATE_RETURN; @@ -373,7 +373,7 @@ CORBA::Object::_create_request (CORBA::Context_ptr ctx, // is a no-no. // Neither can we create a request object from locality constrained // object references. - if (ctx != 0 || this->protocol_proxy_ == 0) + if (ctx != nullptr || this->protocol_proxy_ == nullptr) { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -394,7 +394,7 @@ CORBA::Object::_create_request (CORBA::Context_ptr ctx, operation, arg_list, result, - 0, + nullptr, request, req_flags); } @@ -417,7 +417,7 @@ CORBA::Object::_create_request (CORBA::Context_ptr ctx, // is a no-no. // Neither can we create a request object from locality constrained // object references. - if (ctx != 0 || this->protocol_proxy_ == 0) + if (ctx != nullptr || this->protocol_proxy_ == nullptr) { if (TAO_debug_level > 0) TAOLIB_ERROR ((LM_ERROR, @@ -477,7 +477,7 @@ CORBA::Object::_request (const char *operation) // the latter case, return true. CORBA::Boolean -CORBA::Object::_non_existent (void) +CORBA::Object::_non_existent () { TAO_OBJECT_IOR_EVALUATE_RETURN; @@ -498,14 +498,14 @@ CORBA::Object::_non_existent (void) #if ! defined (CORBA_E_COMPACT) && ! defined (CORBA_E_MICRO) CORBA::InterfaceDef_ptr -CORBA::Object::_get_interface (void) +CORBA::Object::_get_interface () { TAO_OBJECT_IOR_EVALUATE_RETURN; return this->proxy_broker ()->_get_interface (this); } CORBA::Object_ptr -CORBA::Object::_get_component (void) +CORBA::Object::_get_component () { TAO_OBJECT_IOR_EVALUATE_RETURN; return this->proxy_broker ()->_get_component (this); @@ -513,7 +513,7 @@ CORBA::Object::_get_component (void) #endif char* -CORBA::Object::_repository_id (void) +CORBA::Object::_repository_id () { TAO_OBJECT_IOR_EVALUATE_RETURN; return this->proxy_broker ()->_repository_id (this); @@ -597,7 +597,7 @@ CORBA::Object::_set_policy_overrides ( // If the stub is collocated and we don't have a collocated server we need // to reinitialize it to get it. - if (stub->is_collocated () && stub->collocated_servant () == 0) + if (stub->is_collocated () && stub->collocated_servant () == nullptr) { obj->orb_core ()->reinitialize_object (stub); } @@ -629,7 +629,7 @@ CORBA::Object::_validate_connection ( { TAO_OBJECT_IOR_EVALUATE_RETURN; - inconsistent_policies = 0; + inconsistent_policies = nullptr; CORBA::Boolean retval = true; #if (TAO_HAS_MINIMUM_CORBA == 0) @@ -661,9 +661,9 @@ CORBA::Object::_validate_connection ( CORBA::ORB_ptr -CORBA::Object::_get_orb (void) +CORBA::Object::_get_orb () { - if (this->orb_core_ != 0) + if (this->orb_core_ != nullptr) { return CORBA::ORB::_duplicate (this->orb_core_->orb ()); } @@ -684,7 +684,7 @@ CORBA::Object::_get_orb (void) } TAO::Object_Proxy_Broker * -CORBA::Object::proxy_broker (void) const +CORBA::Object::proxy_broker () const { // Paranoid check. We *should* never access the proxy_broker // when the object has not been initialised so there *should* @@ -705,7 +705,7 @@ CORBA::Object::proxy_broker (void) const CORBA::Boolean operator<< (TAO_OutputCDR& cdr, const CORBA::Object* x) { - if (x == 0) + if (x == nullptr) { // NIL objrefs ... marshal as empty type hint, no elements. cdr.write_ulong (1); @@ -724,7 +724,7 @@ operator<< (TAO_OutputCDR& cdr, const CORBA::Object* x) TAO_Stub *stubobj = x->_stubobj (); - if (stubobj == 0) + if (stubobj == nullptr) return false; return (stubobj->marshal (cdr)); @@ -746,7 +746,7 @@ CORBA::Object::tao_object_initialize (CORBA::Object *obj) TAO_MProfile mp (profile_count); TAO_ORB_Core *&orb_core = obj->orb_core_; - if (orb_core == 0) + if (orb_core == nullptr) { orb_core = TAO_ORB_Core_instance (); if (TAO_debug_level > 0) @@ -758,7 +758,7 @@ CORBA::Object::tao_object_initialize (CORBA::Object *obj) } } - TAO_Stub *objdata = 0; + TAO_Stub *objdata = nullptr; try { @@ -784,7 +784,7 @@ CORBA::Object::tao_object_initialize (CORBA::Object *obj) TAO_Profile *pfile = connector_registry->create_profile (cdr); - if (pfile != 0) + if (pfile != nullptr) { if (mp.give_profile (pfile) == -1) { @@ -832,7 +832,7 @@ CORBA::Object::tao_object_initialize (CORBA::Object *obj) obj->is_evaluated_ = true; // Release the contents of the ior to keep memory consumption down. - obj->ior_ = 0; + obj->ior_ = nullptr; // Transfer ownership to the CORBA::Object (void) safe_objdata.release (); @@ -844,7 +844,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x) bool lazy_strategy = false; TAO_ORB_Core *orb_core = cdr.orb_core (); - if (orb_core == 0) + if (orb_core == nullptr) { orb_core = TAO_ORB_Core_instance (); if (TAO_debug_level > 0) @@ -884,7 +884,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x) TAO_MProfile mp (profile_count); TAO_ORB_Core *orb_core = cdr.orb_core (); - if (orb_core == 0) + if (orb_core == nullptr) { orb_core = TAO_ORB_Core_instance (); if (TAO_debug_level > 0) @@ -898,7 +898,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x) // Ownership of type_hint is given to TAO_Stub // TAO_Stub will make a copy of mp! - TAO_Stub *objdata = 0; + TAO_Stub *objdata = nullptr; try { @@ -908,7 +908,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x) for (CORBA::ULong i = 0; i != profile_count && cdr.good_bit (); ++i) { TAO_Profile *pfile = connector_registry->create_profile (cdr); - if (pfile != 0) + if (pfile != nullptr) { if (mp.give_profile (pfile) == -1) { @@ -959,7 +959,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x) else { // Lazy strategy! - IOP::IOR *ior = 0; + IOP::IOR *ior = nullptr; ACE_NEW_RETURN (ior, IOP::IOR (), @@ -976,7 +976,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x) ACE_NEW_NORETURN (x, CORBA::Object (ior, orb_core)); - if (x == 0) + if (x == nullptr) { // Can't allocate a CORBA Object so delete first the // memory we already allocated before we return @@ -1025,7 +1025,7 @@ namespace TAO } CORBA::Object_ptr - Objref_Traits<CORBA::Object>::nil (void) + Objref_Traits<CORBA::Object>::nil () { return CORBA::Object::_nil (); } @@ -1038,6 +1038,6 @@ namespace TAO } } // close TAO namespace -TAO::Object_Proxy_Broker * (*_TAO_Object_Proxy_Broker_Factory_function_pointer) (void) = 0; +TAO::Object_Proxy_Broker * (*_TAO_Object_Proxy_Broker_Factory_function_pointer) () = nullptr; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/ObjectKey_Table.cpp b/TAO/tao/ObjectKey_Table.cpp index 328df7abc63..b6c5474b37f 100644 --- a/TAO/tao/ObjectKey_Table.cpp +++ b/TAO/tao/ObjectKey_Table.cpp @@ -31,19 +31,19 @@ TAO::Less_Than_ObjectKey::operator () (const TAO::ObjectKey &lhs, } /********************************************************/ -TAO::ObjectKey_Table::ObjectKey_Table (void) +TAO::ObjectKey_Table::ObjectKey_Table () : table_ () { } -TAO::ObjectKey_Table::~ObjectKey_Table (void) +TAO::ObjectKey_Table::~ObjectKey_Table () { this->table_.close (); } int -TAO::ObjectKey_Table::destroy (void) +TAO::ObjectKey_Table::destroy () { if (this->table_.current_size ()) { @@ -92,7 +92,7 @@ TAO::ObjectKey_Table::bind_i (const TAO::ObjectKey &key, int TAO::ObjectKey_Table::unbind_i (TAO::Refcounted_ObjectKey *&key_new) { - TAO::Refcounted_ObjectKey *tmp = 0; + TAO::Refcounted_ObjectKey *tmp = nullptr; if (this->table_.unbind (key_new->object_key (), tmp) != -1) { diff --git a/TAO/tao/Object_KeyC.cpp b/TAO/tao/Object_KeyC.cpp index 6f128153b13..dc0c4745f8d 100644 --- a/TAO/tao/Object_KeyC.cpp +++ b/TAO/tao/Object_KeyC.cpp @@ -52,7 +52,7 @@ namespace TAO #if !defined (_TAO_OBJECTKEY_CS_) #define _TAO_OBJECTKEY_CS_ -TAO::ObjectKey::ObjectKey (void) +TAO::ObjectKey::ObjectKey () {} TAO::ObjectKey::ObjectKey ( @@ -76,7 +76,7 @@ TAO::ObjectKey::ObjectKey ( (max, length, buffer, release) {} -TAO::ObjectKey::~ObjectKey (void) +TAO::ObjectKey::~ObjectKey () {} // Hand crafted. @@ -143,7 +143,7 @@ TAO::ObjectKey::decode_string_to_sequence ( TAO::unbounded_value_sequence<CORBA::Octet> & seq, char const * str) { - if (str == 0) + if (str == nullptr) { seq.length (0); return; diff --git a/TAO/tao/Object_Loader.cpp b/TAO/tao/Object_Loader.cpp index 3dc0eb22099..4a1b32c30b6 100644 --- a/TAO/tao/Object_Loader.cpp +++ b/TAO/tao/Object_Loader.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Object_Loader::~TAO_Object_Loader (void) +TAO_Object_Loader::~TAO_Object_Loader () { } diff --git a/TAO/tao/Object_Proxy_Broker.cpp b/TAO/tao/Object_Proxy_Broker.cpp index f5f4c45eff0..0870e737deb 100644 --- a/TAO/tao/Object_Proxy_Broker.cpp +++ b/TAO/tao/Object_Proxy_Broker.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::Object_Proxy_Broker::~Object_Proxy_Broker (void) +TAO::Object_Proxy_Broker::~Object_Proxy_Broker () { } diff --git a/TAO/tao/Object_Ref_Table.cpp b/TAO/tao/Object_Ref_Table.cpp index 3b2bf7360bc..e5268b7612e 100644 --- a/TAO/tao/Object_Ref_Table.cpp +++ b/TAO/tao/Object_Ref_Table.cpp @@ -64,7 +64,7 @@ TAO_Object_Ref_Table::bind_i (const char *id, CORBA::Object_ptr obj) { // Make sure that the supplied Object reference is valid, // i.e. not nil. - if (id == 0 + if (id == nullptr || ACE_OS::strlen (id) == 0 || ::CORBA::is_nil (obj)) { diff --git a/TAO/tao/On_Demand_Fragmentation_Strategy.cpp b/TAO/tao/On_Demand_Fragmentation_Strategy.cpp index e9b790dd6fa..b5261fde697 100644 --- a/TAO/tao/On_Demand_Fragmentation_Strategy.cpp +++ b/TAO/tao/On_Demand_Fragmentation_Strategy.cpp @@ -17,7 +17,7 @@ TAO_On_Demand_Fragmentation_Strategy::TAO_On_Demand_Fragmentation_Strategy ( } TAO_On_Demand_Fragmentation_Strategy::~TAO_On_Demand_Fragmentation_Strategy ( - void) + ) { } @@ -27,7 +27,7 @@ TAO_On_Demand_Fragmentation_Strategy::fragment ( ACE_CDR::ULong pending_alignment, ACE_CDR::ULong pending_length) { - if (this->transport_ == 0) + if (this->transport_ == nullptr) return 0; // No transport. Can't fragment. TAO_GIOP_Message_Version giop_version; @@ -80,7 +80,7 @@ TAO_On_Demand_Fragmentation_Strategy::fragment ( // bit. if (this->transport_->send_message (cdr, cdr.stub (), - 0, + nullptr, cdr.message_semantics (), cdr.timeout ()) == -1 diff --git a/TAO/tao/Parser_Registry.cpp b/TAO/tao/Parser_Registry.cpp index cd35119b474..eed0f04a2cd 100644 --- a/TAO/tao/Parser_Registry.cpp +++ b/TAO/tao/Parser_Registry.cpp @@ -11,13 +11,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Parser_Registry::TAO_Parser_Registry (void) - : parsers_ (0), +TAO_Parser_Registry::TAO_Parser_Registry () + : parsers_ (nullptr), size_ (0) { } -TAO_Parser_Registry::~TAO_Parser_Registry (void) +TAO_Parser_Registry::~TAO_Parser_Registry () { delete [] this->parsers_; } @@ -25,10 +25,10 @@ TAO_Parser_Registry::~TAO_Parser_Registry (void) int TAO_Parser_Registry::open (TAO_ORB_Core *orb_core) { - char **names = 0; + char **names = nullptr; int number_of_names = 0; - if (orb_core->resource_factory () == 0) + if (orb_core->resource_factory () == nullptr) { return -1; } @@ -51,7 +51,7 @@ TAO_Parser_Registry::open (TAO_ORB_Core *orb_core) ACE_Dynamic_Service<TAO_IOR_Parser>::instance (orb_core->configuration (), names [i]); - if (this->parsers_[index] == 0) + if (this->parsers_[index] == nullptr) { --number_of_names; if (TAO_debug_level >= 1) @@ -81,7 +81,7 @@ TAO_Parser_Registry::match_parser (const char *ior_string) } } - return 0; + return nullptr; } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Pluggable_Messaging_Utils.cpp b/TAO/tao/Pluggable_Messaging_Utils.cpp index fd43f298cee..28b548ce1df 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.cpp +++ b/TAO/tao/Pluggable_Messaging_Utils.cpp @@ -8,7 +8,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Pluggable_Reply_Params::TAO_Pluggable_Reply_Params (TAO_Transport *t) - : input_cdr_ (0) + : input_cdr_ (nullptr) , transport_ (t) { } diff --git a/TAO/tao/PolicyFactory_Registry_Adapter.cpp b/TAO/tao/PolicyFactory_Registry_Adapter.cpp index 6c75b805ad4..7ec9258e60c 100644 --- a/TAO/tao/PolicyFactory_Registry_Adapter.cpp +++ b/TAO/tao/PolicyFactory_Registry_Adapter.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::PolicyFactory_Registry_Adapter::~PolicyFactory_Registry_Adapter (void) +TAO::PolicyFactory_Registry_Adapter::~PolicyFactory_Registry_Adapter () { } diff --git a/TAO/tao/PolicyFactory_Registry_Factory.cpp b/TAO/tao/PolicyFactory_Registry_Factory.cpp index 3ba55302382..6bf506d8222 100644 --- a/TAO/tao/PolicyFactory_Registry_Factory.cpp +++ b/TAO/tao/PolicyFactory_Registry_Factory.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_PolicyFactory_Registry_Factory::~TAO_PolicyFactory_Registry_Factory (void) +TAO_PolicyFactory_Registry_Factory::~TAO_PolicyFactory_Registry_Factory () { } diff --git a/TAO/tao/Policy_Current.cpp b/TAO/tao/Policy_Current.cpp index a4ec5b8a0dd..0631b65435d 100644 --- a/TAO/tao/Policy_Current.cpp +++ b/TAO/tao/Policy_Current.cpp @@ -21,7 +21,7 @@ TAO_Policy_Current::implementation (TAO_Policy_Current_Impl ¤t) } TAO_Policy_Current_Impl & -TAO_Policy_Current::implementation (void) const +TAO_Policy_Current::implementation () const { return *TAO_TSS_Resources::instance ()->policy_current_; } diff --git a/TAO/tao/Policy_Manager.cpp b/TAO/tao/Policy_Manager.cpp index fbfaea4a28b..87320fbca67 100644 --- a/TAO/tao/Policy_Manager.cpp +++ b/TAO/tao/Policy_Manager.cpp @@ -11,7 +11,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::PolicyList * TAO_Policy_Manager::get_policy_overrides (const CORBA::PolicyTypeSeq & ts) { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, nullptr); return this->impl_.get_policy_overrides (ts); } diff --git a/TAO/tao/Policy_Set.cpp b/TAO/tao/Policy_Set.cpp index bd3507cfebb..c7e28444dba 100644 --- a/TAO/tao/Policy_Set.cpp +++ b/TAO/tao/Policy_Set.cpp @@ -14,10 +14,10 @@ TAO_Policy_Set::TAO_Policy_Set (TAO_Policy_Scope scope) : scope_ (scope) { for (unsigned int i = 0; i < TAO_CACHED_POLICY_MAX_CACHED; ++i) - this->cached_policies_[i] = 0; + this->cached_policies_[i] = nullptr; } -TAO_Policy_Set::~TAO_Policy_Set (void) +TAO_Policy_Set::~TAO_Policy_Set () { try { @@ -35,7 +35,7 @@ TAO_Policy_Set::TAO_Policy_Set (const TAO_Policy_Set &rhs) // Initialize the cache. for (int i = 0; i < TAO_CACHED_POLICY_MAX_CACHED; ++i) { - this->cached_policies_[i] = 0; + this->cached_policies_[i] = nullptr; } // Copy over the policy list. @@ -78,7 +78,7 @@ TAO_Policy_Set::TAO_Policy_Set (const TAO_Policy_Set &rhs) void TAO_Policy_Set::copy_from (TAO_Policy_Set *source) { - if (source == 0) + if (source == nullptr) { return; } @@ -119,7 +119,7 @@ TAO_Policy_Set::copy_from (TAO_Policy_Set *source) } void -TAO_Policy_Set::cleanup_i (void) +TAO_Policy_Set::cleanup_i () { CORBA::ULong const len = this->policy_list_.length (); // Cleanup the policy list. @@ -134,7 +134,7 @@ TAO_Policy_Set::cleanup_i (void) // Cleanup the cache. for (CORBA::ULong j = 0; j < TAO_CACHED_POLICY_MAX_CACHED; ++j) { - this->cached_policies_[j] = 0; + this->cached_policies_[j] = nullptr; } } @@ -247,7 +247,7 @@ CORBA::PolicyList * TAO_Policy_Set::get_policy_overrides (const CORBA::PolicyTypeSeq &types) { CORBA::ULong const slots = types.length (); - CORBA::PolicyList *policy_list_ptr = 0; + CORBA::PolicyList *policy_list_ptr = nullptr; if (slots == 0) { diff --git a/TAO/tao/Policy_Validator.cpp b/TAO/tao/Policy_Validator.cpp index 8cacaf38dc9..d2580db35b1 100644 --- a/TAO/tao/Policy_Validator.cpp +++ b/TAO/tao/Policy_Validator.cpp @@ -6,11 +6,11 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Policy_Validator::TAO_Policy_Validator (TAO_ORB_Core &orb_core) : orb_core_ (orb_core), - next_ (0) + next_ (nullptr) { } -TAO_Policy_Validator::~TAO_Policy_Validator (void) +TAO_Policy_Validator::~TAO_Policy_Validator () { delete this->next_; } @@ -25,7 +25,7 @@ void TAO_Policy_Validator::add_validator (TAO_Policy_Validator *validator) { // The validator we're adding can't be part of another list - ACE_ASSERT (validator->next_ == 0); + ACE_ASSERT (validator->next_ == nullptr); // Why would we want to add ourself to our list if (this != validator) @@ -33,7 +33,7 @@ TAO_Policy_Validator::add_validator (TAO_Policy_Validator *validator) // Get to the end of the list and make sure that the // new validator isn't already part of our list TAO_Policy_Validator* current = this; - while (current->next_ != 0) + while (current->next_ != nullptr) { if (current->next_ == validator) { @@ -61,7 +61,7 @@ TAO_Policy_Validator::validate (TAO_Policy_Set &policies) { this->validate_impl (policies); - if (this->next_ != 0) + if (this->next_ != nullptr) { this->next_->validate (policies); } @@ -82,7 +82,7 @@ CORBA::Boolean TAO_Policy_Validator::legal_policy (CORBA::PolicyType type) { return (this->legal_policy_impl (type) - || ((this->next_ != 0) + || ((this->next_ != nullptr) && this->next_->legal_policy_impl (type))); } diff --git a/TAO/tao/Principal.cpp b/TAO/tao/Principal.cpp index c7934c3238b..a8710e3b283 100644 --- a/TAO/tao/Principal.cpp +++ b/TAO/tao/Principal.cpp @@ -11,19 +11,19 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -CORBA::Principal::Principal (void) +CORBA::Principal::Principal () : refcount_ (1) { } -CORBA::Principal::~Principal (void) +CORBA::Principal::~Principal () { } CORBA::Boolean operator<< (TAO_OutputCDR & cdr, CORBA::Principal * x) { - if (x != 0) + if (x != nullptr) { CORBA::ULong length = x->id.length (); cdr.write_long (length); @@ -45,7 +45,7 @@ operator>> (TAO_InputCDR & cdr, CORBA::Principal *& x) if (length == 0 || !cdr.good_bit ()) { - x = 0; + x = nullptr; } else { diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp index d7a4376cc73..00b5370e7c6 100644 --- a/TAO/tao/Profile.cpp +++ b/TAO/tao/Profile.cpp @@ -27,11 +27,11 @@ TAO_Profile::TAO_Profile (CORBA::ULong tag, : version_ (version) , are_policies_parsed_ (false) , addressing_mode_ (0) - , tagged_profile_ (0) - , ref_object_key_ (0) + , tagged_profile_ (nullptr) + , ref_object_key_ (nullptr) , tag_ (tag) , orb_core_ (orb_core) - , forward_to_ (0) + , forward_to_ (nullptr) , refcount_ (1) , tagged_profile_lock_ () , tagged_profile_created_ (false) @@ -46,18 +46,18 @@ TAO_Profile::TAO_Profile (CORBA::ULong tag, : version_ (version) , are_policies_parsed_ (false) , addressing_mode_ (0) - , tagged_profile_ (0) - , ref_object_key_ (0) + , tagged_profile_ (nullptr) + , ref_object_key_ (nullptr) , tag_ (tag) , orb_core_ (orb_core) - , forward_to_ (0) + , forward_to_ (nullptr) , refcount_ (1) , tagged_profile_lock_ () , tagged_profile_created_ (false) { } -TAO_Profile::~TAO_Profile (void) +TAO_Profile::~TAO_Profile () { if (this->tagged_profile_) { @@ -86,21 +86,21 @@ TAO_Profile::add_tagged_component (const IOP::TaggedComponent &component) TAO_Endpoint * -TAO_Profile::base_endpoint (void) +TAO_Profile::base_endpoint () { return this->endpoint(); } TAO::ObjectKey * -TAO_Profile::_key (void) const +TAO_Profile::_key () const { - TAO::ObjectKey *key = 0; + TAO::ObjectKey *key = nullptr; if (this->ref_object_key_) { ACE_NEW_RETURN (key, TAO::ObjectKey (this->ref_object_key_->object_key ()), - 0); + nullptr); } return key; } @@ -232,7 +232,7 @@ TAO_Profile::decode (TAO_InputCDR& cdr) } IOP::TaggedProfile * -TAO_Profile::create_tagged_profile (void) +TAO_Profile::create_tagged_profile () { if (this->tagged_profile_created_) return this->tagged_profile_; @@ -247,7 +247,7 @@ TAO_Profile::create_tagged_profile (void) { ACE_NEW_RETURN (this->tagged_profile_, IOP::TaggedProfile, - 0); + nullptr); // As we have not created we will now create the TaggedProfile this->tagged_profile_->tag = this->tag_; @@ -303,7 +303,7 @@ TAO_Profile::set_tagged_components (TAO_OutputCDR &out_cdr) CORBA::Octet *buf = tagged_component.component_data.get_buffer (); for (const ACE_Message_Block *iterator = out_cdr.begin (); - iterator != 0; + iterator != nullptr; iterator = iterator->cont ()) { size_t const i_length = iterator->length (); @@ -321,7 +321,7 @@ TAO_Profile::set_tagged_components (TAO_OutputCDR &out_cdr) void TAO_Profile::policies (CORBA::PolicyList *policy_list) { - if (policy_list == 0) + if (policy_list == nullptr) { if (TAO_debug_level) { @@ -336,7 +336,7 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list) Messaging::PolicyValueSeq policy_value_seq; size_t length = 0; - CORBA::Octet *buf = 0; + CORBA::Octet *buf = nullptr; // This loop iterates through CORBA::PolicyList to convert // each CORBA::Policy into a CORBA::PolicyValue @@ -363,7 +363,7 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list) // Copy the CDR buffer data into the octet sequence buffer. for (const ACE_Message_Block *iterator = out_CDR.begin (); - iterator != 0; + iterator != nullptr; iterator = iterator->cont ()) { ACE_OS::memcpy (buf, iterator->rd_ptr (), iterator->length ()); @@ -390,7 +390,7 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list) buf = tagged_component.component_data.get_buffer (); for (const ACE_Message_Block *iterator = out_cdr.begin (); - iterator != 0; + iterator != nullptr; iterator = iterator->cont ()) { size_t const i_length = iterator->length (); @@ -512,7 +512,7 @@ TAO_Profile::get_policies (CORBA::PolicyList& pl) } void -TAO_Profile::verify_orb_configuration (void) +TAO_Profile::verify_orb_configuration () { // If the ORB isn't configured to support tagged components, then // throw an exception. @@ -545,7 +545,7 @@ TAO_Profile::verify_orb_configuration (void) } void -TAO_Profile::verify_profile_version (void) +TAO_Profile::verify_profile_version () { // GIOP 1.0 does not support tagged components. Throw an exception // if the profile is a GIOP 1.0 profile. @@ -576,14 +576,14 @@ TAO_Profile::verify_profile_version (void) } int -TAO_Profile::supports_multicast (void) const +TAO_Profile::supports_multicast () const { // Most profiles do not support multicast endpoints. return 0; } bool -TAO_Profile::supports_non_blocking_oneways (void) const +TAO_Profile::supports_non_blocking_oneways () const { return !(this->version_.major == 1 && this->version_.minor == 0); } @@ -686,23 +686,23 @@ CORBA::Boolean TAO_Profile::compare_key (const TAO_Profile *other) const { return (this->ref_object_key_ == other->ref_object_key_) || - ((this->ref_object_key_ != 0 && - other->ref_object_key_ != 0 && + ((this->ref_object_key_ != nullptr && + other->ref_object_key_ != nullptr && this->ref_object_key_->object_key() == other->ref_object_key_->object_key())); } TAO_Endpoint * -TAO_Profile::first_filtered_endpoint (void) +TAO_Profile::first_filtered_endpoint () { TAO_Endpoint *ep = this->endpoint(); - return ep == 0 ? 0 : ep->next_filtered(this->orb_core_,0); + return ep == nullptr ? nullptr : ep->next_filtered(this->orb_core_,nullptr); } TAO_Endpoint * TAO_Profile::next_filtered_endpoint (TAO_Endpoint *source) { - if (source == 0) + if (source == nullptr) return this->first_filtered_endpoint(); return source->next_filtered(this->orb_core_,this->endpoint()); } @@ -727,7 +727,7 @@ TAO_Profile::hash_service_i (CORBA::ULong m) } int -TAO_Profile::encode_alternate_endpoints(void) +TAO_Profile::encode_alternate_endpoints() { // this should be a pure virtual, but there are many // existing specializations that would need to be @@ -756,13 +756,13 @@ TAO_Unknown_Profile::TAO_Unknown_Profile (CORBA::ULong tag, } TAO_Endpoint* -TAO_Unknown_Profile::endpoint (void) +TAO_Unknown_Profile::endpoint () { - return 0; + return nullptr; } CORBA::ULong -TAO_Unknown_Profile::endpoint_count (void) const +TAO_Unknown_Profile::endpoint_count () const { return 0; } @@ -780,16 +780,16 @@ TAO_Unknown_Profile::parse_string_i (const char *) } char -TAO_Unknown_Profile::object_key_delimiter (void) const +TAO_Unknown_Profile::object_key_delimiter () const { return 0; } char * -TAO_Unknown_Profile::to_string (void) const +TAO_Unknown_Profile::to_string () const { // @@ THROW something? - return 0; + return nullptr; } int @@ -810,7 +810,7 @@ TAO_Unknown_Profile::decode_profile (TAO_InputCDR &) } int -TAO_Unknown_Profile::decode_endpoints (void) +TAO_Unknown_Profile::decode_endpoints () { return 0; } @@ -823,15 +823,15 @@ TAO_Unknown_Profile::encode (TAO_OutputCDR &stream) const } int -TAO_Unknown_Profile::encode_endpoints (void) +TAO_Unknown_Profile::encode_endpoints () { return 0; } TAO::ObjectKey * -TAO_Unknown_Profile::_key (void) const +TAO_Unknown_Profile::_key () const { - return 0; + return nullptr; } CORBA::Boolean @@ -840,7 +840,7 @@ TAO_Unknown_Profile::do_is_equivalent (const TAO_Profile* other_profile) const TAO_Unknown_Profile * op = dynamic_cast <const TAO_Unknown_Profile *> (other_profile); - return (CORBA::Boolean) (op == 0 ? 0 : this->body_ == op->body_); + return (CORBA::Boolean) (op == nullptr ? 0 : this->body_ == op->body_); } TAO_Service_Callbacks::Profile_Equivalence @@ -880,7 +880,7 @@ operator<< (TAO_OutputCDR& cdr, const TAO_opaque& x) cdr.write_ulong (length); #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - if (x.mb () != 0) + if (x.mb () != nullptr) { cdr.write_octet_array_mb (x.mb ()); } @@ -902,7 +902,7 @@ operator>>(TAO_InputCDR& cdr, TAO_opaque& x) #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) if(ACE_BIT_DISABLED(cdr.start()->flags(), ACE_Message_Block::DONT_DELETE) - && (cdr.orb_core() == 0 + && (cdr.orb_core() == nullptr || 1 == cdr.orb_core()-> resource_factory()-> input_cdr_allocator_type_locked() diff --git a/TAO/tao/Profile_Transport_Resolver.cpp b/TAO/tao/Profile_Transport_Resolver.cpp index 4423d4a25fe..860a3283295 100644 --- a/TAO/tao/Profile_Transport_Resolver.cpp +++ b/TAO/tao/Profile_Transport_Resolver.cpp @@ -28,7 +28,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { - Profile_Transport_Resolver::~Profile_Transport_Resolver (void) + Profile_Transport_Resolver::~Profile_Transport_Resolver () { if (this->profile_) { @@ -82,7 +82,7 @@ namespace TAO // Select the endpoint es->select_endpoint (this, max_time_val); - if (this->transport_.get () == 0) + if (this->transport_.get () == nullptr) { // No useable endpoint could be found. We will not // be able to send the message. Wait to throw an exception until @@ -130,7 +130,7 @@ namespace TAO TAO_Connector_Registry *conn_reg = this->stub_->orb_core ()->connector_registry (); - if (conn_reg == 0) + if (conn_reg == nullptr) { throw ::CORBA::INTERNAL ( CORBA::SystemException::_tao_minor_code ( @@ -148,18 +148,18 @@ namespace TAO } else if (has_con_timeout) { - if (timeout == 0 || connection_timeout < *timeout) + if (timeout == nullptr || connection_timeout < *timeout) timeout = &connection_timeout; else has_con_timeout = false; } else if (!this->blocked_) { - timeout = 0; + timeout = nullptr; } TAO_Connector *con = conn_reg->get_connector (desc->endpoint ()->tag ()); - ACE_ASSERT(con != 0); + ACE_ASSERT(con != nullptr); if (parallel) { this->transport_.set (con->parallel_connect (this, desc, timeout)); @@ -172,7 +172,7 @@ namespace TAO // If the user has set a roundtrip timeout policy, throw a timeout // exception. Otherwise, just fall through and return false to // look at the next endpoint. - if (this->transport_.get () == 0 && + if (this->transport_.get () == nullptr && has_con_timeout == false && errno == ETIME) { @@ -182,7 +182,7 @@ namespace TAO errno), CORBA::COMPLETED_NO); } - else if (this->transport_.get () == 0) + else if (this->transport_.get () == nullptr) { return false; } @@ -200,7 +200,7 @@ namespace TAO } bool - Profile_Transport_Resolver::use_parallel_connect (void) const + Profile_Transport_Resolver::use_parallel_connect () const { TAO_ORB_Core *oc = this->stub_->orb_core(); return (oc->orb_params()->use_parallel_connects() @@ -229,7 +229,7 @@ namespace TAO void - Profile_Transport_Resolver::init_inconsistent_policies (void) + Profile_Transport_Resolver::init_inconsistent_policies () { ACE_NEW_THROW_EX (this->inconsistent_policies_, CORBA::PolicyList (0), diff --git a/TAO/tao/Protocol_Factory.cpp b/TAO/tao/Protocol_Factory.cpp index d8572873fe1..9fd5df93b81 100644 --- a/TAO/tao/Protocol_Factory.cpp +++ b/TAO/tao/Protocol_Factory.cpp @@ -7,12 +7,12 @@ TAO_Protocol_Factory::TAO_Protocol_Factory (CORBA::ULong tag) { } -TAO_Protocol_Factory::~TAO_Protocol_Factory (void) +TAO_Protocol_Factory::~TAO_Protocol_Factory () { } CORBA::ULong -TAO_Protocol_Factory::tag (void) const +TAO_Protocol_Factory::tag () const { return this->tag_; } diff --git a/TAO/tao/Protocols_Hooks.cpp b/TAO/tao/Protocols_Hooks.cpp index cc344282e8d..ad56ce31a3f 100644 --- a/TAO/tao/Protocols_Hooks.cpp +++ b/TAO/tao/Protocols_Hooks.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_IIOP_Protocol_Properties::TAO_IIOP_Protocol_Properties (void) +TAO_IIOP_Protocol_Properties::TAO_IIOP_Protocol_Properties () : send_buffer_size_ (0), recv_buffer_size_ (0), keep_alive_ (0), @@ -14,13 +14,13 @@ TAO_IIOP_Protocol_Properties::TAO_IIOP_Protocol_Properties (void) { } -TAO_UIOP_Protocol_Properties::TAO_UIOP_Protocol_Properties (void) +TAO_UIOP_Protocol_Properties::TAO_UIOP_Protocol_Properties () : send_buffer_size_ (0), recv_buffer_size_ (0) { } -TAO_SHMIOP_Protocol_Properties::TAO_SHMIOP_Protocol_Properties (void) +TAO_SHMIOP_Protocol_Properties::TAO_SHMIOP_Protocol_Properties () : send_buffer_size_ (0), recv_buffer_size_ (0), keep_alive_ (0), @@ -32,7 +32,7 @@ TAO_SHMIOP_Protocol_Properties::TAO_SHMIOP_Protocol_Properties (void) { } -TAO_DIOP_Protocol_Properties::TAO_DIOP_Protocol_Properties (void) +TAO_DIOP_Protocol_Properties::TAO_DIOP_Protocol_Properties () : send_buffer_size_ (0), recv_buffer_size_ (0), enable_network_priority_ (0), @@ -41,7 +41,7 @@ TAO_DIOP_Protocol_Properties::TAO_DIOP_Protocol_Properties (void) { } -TAO_SCIOP_Protocol_Properties::TAO_SCIOP_Protocol_Properties (void) +TAO_SCIOP_Protocol_Properties::TAO_SCIOP_Protocol_Properties () : send_buffer_size_ (0), recv_buffer_size_ (0), keep_alive_ (0), @@ -52,7 +52,7 @@ TAO_SCIOP_Protocol_Properties::TAO_SCIOP_Protocol_Properties (void) { } -TAO_Protocols_Hooks::~TAO_Protocols_Hooks (void) +TAO_Protocols_Hooks::~TAO_Protocols_Hooks () { } diff --git a/TAO/tao/Queued_Data.cpp b/TAO/tao/Queued_Data.cpp index 88806f10973..438f9d8a5c4 100644 --- a/TAO/tao/Queued_Data.cpp +++ b/TAO/tao/Queued_Data.cpp @@ -34,15 +34,15 @@ clone_mb_nocopy_size (ACE_Message_Block *mb, size_t span_size) size_t const aligned_size = ACE_CDR::first_size (span_size + ACE_CDR::MAX_ALIGNMENT); // Get the allocators - ACE_Allocator *data_allocator = 0; - ACE_Allocator *data_block_allocator = 0; - ACE_Allocator *message_block_allocator = 0; + ACE_Allocator *data_allocator = nullptr; + ACE_Allocator *data_block_allocator = nullptr; + ACE_Allocator *message_block_allocator = nullptr; mb->access_allocators (data_allocator, data_block_allocator, message_block_allocator); // Create a new Message Block - ACE_Message_Block *nb = 0; + ACE_Message_Block *nb = nullptr; ACE_NEW_MALLOC_RETURN (nb, static_cast<ACE_Message_Block*> ( message_block_allocator->malloc ( @@ -50,7 +50,7 @@ clone_mb_nocopy_size (ACE_Message_Block *mb, size_t span_size) ACE_Message_Block(aligned_size, mb->msg_type(), mb->cont(), - 0, //we want the data block created + nullptr, //we want the data block created data_allocator, mb->locking_strategy(), mb->msg_priority(), @@ -58,7 +58,7 @@ clone_mb_nocopy_size (ACE_Message_Block *mb, size_t span_size) mb->msg_deadline_time (), data_block_allocator, message_block_allocator), - 0); + nullptr); ACE_CDR::mb_align (nb); @@ -77,7 +77,7 @@ TAO_Queued_Data::make_queued_data (ACE_Allocator *message_buffer_alloc, ACE_Data_Block *db) { // Get a node for the queue.. - TAO_Queued_Data *qd = 0; + TAO_Queued_Data *qd = nullptr; if (message_buffer_alloc) { @@ -85,7 +85,7 @@ TAO_Queued_Data::make_queued_data (ACE_Allocator *message_buffer_alloc, static_cast<TAO_Queued_Data *> ( message_buffer_alloc->malloc (sizeof (TAO_Queued_Data))), TAO_Queued_Data (message_buffer_alloc), - 0); + nullptr); } else @@ -93,20 +93,20 @@ TAO_Queued_Data::make_queued_data (ACE_Allocator *message_buffer_alloc, // No allocator, so use the global pool! ACE_NEW_RETURN (qd, TAO_Queued_Data, - 0); + nullptr); } // Providing an ACE_Data_Block indicates that the caller wants // an aligned ACE_Message_Block added to the TAO_Queued_Data. - if (db != 0) + if (db != nullptr) { // If this allocation fails, the TAO_Queued_Data will be leaked. - if (input_cdr_alloc == 0) + if (input_cdr_alloc == nullptr) ACE_NEW_RETURN (qd->msg_block_, ACE_Message_Block (db, 0, input_cdr_alloc), - 0); + nullptr); else ACE_NEW_MALLOC_RETURN (qd->msg_block_, static_cast<ACE_Message_Block*> ( @@ -114,7 +114,7 @@ TAO_Queued_Data::make_queued_data (ACE_Allocator *message_buffer_alloc, ACE_Message_Block (db, 0, input_cdr_alloc), - 0); + nullptr); ACE_CDR::mb_align (qd->msg_block_); } @@ -168,7 +168,7 @@ TAO_Queued_Data::duplicate (TAO_Queued_Data &sqd) (void) TAO_Queued_Data::replace_data_block (*sqd.msg_block_); - TAO_Queued_Data *qd = 0; + TAO_Queued_Data *qd = nullptr; if (sqd.allocator_) { @@ -176,7 +176,7 @@ TAO_Queued_Data::duplicate (TAO_Queued_Data &sqd) static_cast<TAO_Queued_Data *> ( sqd.allocator_->malloc (sizeof (TAO_Queued_Data))), TAO_Queued_Data (sqd), - 0); + nullptr); return qd; } @@ -193,23 +193,23 @@ TAO_Queued_Data::duplicate (TAO_Queued_Data &sqd) ACE_NEW_RETURN (qd, TAO_Queued_Data (sqd), - 0); + nullptr); return qd; } int -TAO_Queued_Data::consolidate (void) +TAO_Queued_Data::consolidate () { // Is this a chain of fragments? - if (this->state_.more_fragments () && this->msg_block_->cont () != 0) + if (this->state_.more_fragments () && this->msg_block_->cont () != nullptr) { // Create a message block big enough to hold the entire chain ACE_Message_Block *dest = clone_mb_nocopy_size ( this->msg_block_, this->msg_block_->total_length ()); - if (0 == dest) + if (nullptr == dest) { // out of memory return -1; @@ -220,7 +220,7 @@ TAO_Queued_Data::consolidate (void) // Reset the cont() parameter. We have cloned the message // block but not the chain as we will no longer have chain. - dest->cont (0); + dest->cont (nullptr); // Use ACE_CDR to consolidate the chain for us ACE_CDR::consolidate (dest, this->msg_block_); diff --git a/TAO/tao/Queued_Message.cpp b/TAO/tao/Queued_Message.cpp index f279c7b4b57..74e2dd273d0 100644 --- a/TAO/tao/Queued_Message.cpp +++ b/TAO/tao/Queued_Message.cpp @@ -12,12 +12,12 @@ TAO_Queued_Message::TAO_Queued_Message (TAO_ORB_Core *oc, : allocator_ (alloc) , is_heap_created_ (is_heap_allocated) , orb_core_ (oc) - , next_ (0) - , prev_ (0) + , next_ (nullptr) + , prev_ (nullptr) { } -TAO_Queued_Message::~TAO_Queued_Message (void) +TAO_Queued_Message::~TAO_Queued_Message () { } @@ -25,7 +25,7 @@ void TAO_Queued_Message::remove_from_list (TAO_Queued_Message *&head, TAO_Queued_Message *&tail) { - if (this->prev_ != 0) + if (this->prev_ != nullptr) { this->prev_->next_ = this->next_; } @@ -34,7 +34,7 @@ TAO_Queued_Message::remove_from_list (TAO_Queued_Message *&head, head = this->next_; } - if (this->next_ != 0) + if (this->next_ != nullptr) { this->next_->prev_ = this->prev_; } @@ -43,26 +43,26 @@ TAO_Queued_Message::remove_from_list (TAO_Queued_Message *&head, tail = this->prev_; } - this->next_ = 0; - this->prev_ = 0; + this->next_ = nullptr; + this->prev_ = nullptr; } void TAO_Queued_Message::push_back (TAO_Queued_Message *&head, TAO_Queued_Message *&tail) { - if (tail == 0) + if (tail == nullptr) { tail = this; head = this; - this->next_ = 0; - this->prev_ = 0; + this->next_ = nullptr; + this->prev_ = nullptr; } else { tail->next_ = this; this->prev_ = tail; - this->next_ = 0; + this->next_ = nullptr; tail = this; } } @@ -71,18 +71,18 @@ void TAO_Queued_Message::push_front (TAO_Queued_Message *&head, TAO_Queued_Message *&tail) { - if (head == 0) + if (head == nullptr) { tail = this; head = this; - this->next_ = 0; - this->prev_ = 0; + this->next_ = nullptr; + this->prev_ = nullptr; } else { head->prev_ = this; this->next_ = head; - this->prev_ = 0; + this->prev_ = nullptr; head = this; } } diff --git a/TAO/tao/Reactive_Connect_Strategy.cpp b/TAO/tao/Reactive_Connect_Strategy.cpp index db4e03fc623..8593179a35a 100644 --- a/TAO/tao/Reactive_Connect_Strategy.cpp +++ b/TAO/tao/Reactive_Connect_Strategy.cpp @@ -16,7 +16,7 @@ TAO_Reactive_Connect_Strategy::TAO_Reactive_Connect_Strategy ( { } -TAO_Reactive_Connect_Strategy::~TAO_Reactive_Connect_Strategy (void) +TAO_Reactive_Connect_Strategy::~TAO_Reactive_Connect_Strategy () { } @@ -24,7 +24,7 @@ void TAO_Reactive_Connect_Strategy::synch_options (ACE_Time_Value *timeout, ACE_Synch_Options &options) { - if (timeout != 0) + if (timeout != nullptr) { options.set (ACE_Synch_Options::USE_REACTOR, *timeout); @@ -43,7 +43,7 @@ TAO_Reactive_Connect_Strategy::wait_i (TAO_LF_Event *ev, ACE_Time_Value * max_wait_time) { int result = 0; - if (ev == 0) + if (ev == nullptr) return -1; if (TAO_debug_level > 2) @@ -66,7 +66,7 @@ TAO_Reactive_Connect_Strategy::wait_i (TAO_LF_Event *ev, // Did we timeout? If so, stop running the loop. if (result == 0 && - max_wait_time != 0 && + max_wait_time != nullptr && *max_wait_time == ACE_Time_Value::zero) { errno = ETIME; diff --git a/TAO/tao/Reactive_Flushing_Strategy.cpp b/TAO/tao/Reactive_Flushing_Strategy.cpp index 9cd855e8bf0..f7bff78c6c2 100644 --- a/TAO/tao/Reactive_Flushing_Strategy.cpp +++ b/TAO/tao/Reactive_Flushing_Strategy.cpp @@ -34,7 +34,7 @@ TAO_Reactive_Flushing_Strategy::flush_message (TAO_Transport *transport, { result = orb_core->run (max_wait_time, 1); - if (max_wait_time != 0) { + if (max_wait_time != nullptr) { if (*max_wait_time <= ACE_Time_Value::zero) { errno = ETIME; result = -1; @@ -63,7 +63,7 @@ TAO_Reactive_Flushing_Strategy::flush_transport (TAO_Transport *transport if (orb_core->run (max_wait_time, 1) == -1) return -1; - if (max_wait_time != 0) { + if (max_wait_time != nullptr) { if (*max_wait_time <= ACE_Time_Value::zero) { errno = ETIME; return -1; diff --git a/TAO/tao/Refcounted_ObjectKey.cpp b/TAO/tao/Refcounted_ObjectKey.cpp index 4290884211a..64f765258d5 100644 --- a/TAO/tao/Refcounted_ObjectKey.cpp +++ b/TAO/tao/Refcounted_ObjectKey.cpp @@ -14,7 +14,7 @@ TAO::Refcounted_ObjectKey::Refcounted_ObjectKey (const TAO::ObjectKey &key) { } -TAO::Refcounted_ObjectKey::~Refcounted_ObjectKey (void) +TAO::Refcounted_ObjectKey::~Refcounted_ObjectKey () { } diff --git a/TAO/tao/Remote_Invocation.cpp b/TAO/tao/Remote_Invocation.cpp index cb8ed85c6a5..8245c697236 100644 --- a/TAO/tao/Remote_Invocation.cpp +++ b/TAO/tao/Remote_Invocation.cpp @@ -70,7 +70,7 @@ namespace TAO // IOP::IOR info, the call would create the info and return the // index that we need. CORBA::ULong index = 0; - IOP::IOR *ior_info = 0; + IOP::IOR *ior_info = nullptr; if (this->resolver_.stub ()->create_ior_info (ior_info, index) == -1) { @@ -94,7 +94,7 @@ namespace TAO void Remote_Invocation::write_header (TAO_OutputCDR &out_stream) { - this->resolver_.transport ()->clear_translators (0, &out_stream); + this->resolver_.transport ()->clear_translators (nullptr, &out_stream); TAO_Target_Specification spec; this->init_target_spec (spec, out_stream); @@ -107,7 +107,7 @@ namespace TAO throw ::CORBA::MARSHAL (); } - this->resolver_.transport ()->assign_translators (0, &out_stream); + this->resolver_.transport ()->assign_translators (nullptr, &out_stream); } Invocation_Status @@ -125,7 +125,7 @@ namespace TAO TAO_Connection_Handler *connection_handler = this->resolver_.transport ()->connection_handler (); - if (nph != 0) + if (nph != nullptr) { // nph = 0, means DiffServ library is not used // nph = 0, means DiffServ library is used, and @@ -138,7 +138,7 @@ namespace TAO this->resolver_.object ()); connection_handler->set_dscp_codepoint (dscp); } - else if (tph != 0) + else if (tph != nullptr) { // If we execute this code, DiffServ library is not used, // but RTCORBA could be used. diff --git a/TAO/tao/Remote_Object_Proxy_Broker.cpp b/TAO/tao/Remote_Object_Proxy_Broker.cpp index 390d2d7c1b4..38a1cc996d5 100644 --- a/TAO/tao/Remote_Object_Proxy_Broker.cpp +++ b/TAO/tao/Remote_Object_Proxy_Broker.cpp @@ -34,7 +34,7 @@ namespace TAO 5, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY); - tao_call.invoke (0, 0); + tao_call.invoke (nullptr, 0); return _tao_retval.retn (); } @@ -58,7 +58,7 @@ namespace TAO 13, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY); - _tao_call.invoke (0, 0); + _tao_call.invoke (nullptr, 0); return _tao_retval.retn (); } @@ -80,7 +80,7 @@ namespace TAO 10, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY); - _tao_call.invoke (0, 0); + _tao_call.invoke (nullptr, 0); return _tao_retval.retn (); } @@ -93,7 +93,7 @@ namespace TAO TAO_ORB_Core::ifr_client_adapter_name () ); - if (adapter == 0) + if (adapter == nullptr) { throw ::CORBA::INTF_REPOS (); } @@ -118,7 +118,7 @@ namespace TAO 14, TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY); - _tao_call.invoke (0, 0); + _tao_call.invoke (nullptr, 0); return _tao_retval.retn (); } @@ -128,7 +128,7 @@ namespace TAO // ----------------------------------------------------- TAO::Remote_Object_Proxy_Broker * -the_tao_remote_object_proxy_broker (void) +the_tao_remote_object_proxy_broker () { static TAO::Remote_Object_Proxy_Broker the_broker; return &the_broker; diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp index 620f87f65e2..230b4c623e1 100644 --- a/TAO/tao/Reply_Dispatcher.cpp +++ b/TAO/tao/Reply_Dispatcher.cpp @@ -17,7 +17,7 @@ TAO_Reply_Dispatcher::TAO_Reply_Dispatcher (ACE_Allocator *allocator) } // Destructor. -TAO_Reply_Dispatcher::~TAO_Reply_Dispatcher (void) +TAO_Reply_Dispatcher::~TAO_Reply_Dispatcher () { } @@ -25,7 +25,7 @@ TAO_Reply_Dispatcher::~TAO_Reply_Dispatcher (void) void TAO_Reply_Dispatcher::intrusive_add_ref (TAO_Reply_Dispatcher* rd) { - if (rd != 0) + if (rd != nullptr) { ++rd->refcount_; } @@ -34,7 +34,7 @@ TAO_Reply_Dispatcher::intrusive_add_ref (TAO_Reply_Dispatcher* rd) void TAO_Reply_Dispatcher::intrusive_remove_ref (TAO_Reply_Dispatcher* rd) { - if (rd != 0) + if (rd != nullptr) { long const tmp = --rd->refcount_; if (tmp <= 0) diff --git a/TAO/tao/RequestInterceptor_Adapter.cpp b/TAO/tao/RequestInterceptor_Adapter.cpp index c19df8e51df..171df98cd94 100644 --- a/TAO/tao/RequestInterceptor_Adapter.cpp +++ b/TAO/tao/RequestInterceptor_Adapter.cpp @@ -13,7 +13,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::RequestInterceptor_Adapter::~RequestInterceptor_Adapter (void) +TAO::RequestInterceptor_Adapter::~RequestInterceptor_Adapter () { } diff --git a/TAO/tao/Request_Dispatcher.cpp b/TAO/tao/Request_Dispatcher.cpp index 16a77d9459c..b7c031f1eee 100644 --- a/TAO/tao/Request_Dispatcher.cpp +++ b/TAO/tao/Request_Dispatcher.cpp @@ -4,7 +4,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Request_Dispatcher::~TAO_Request_Dispatcher (void) +TAO_Request_Dispatcher::~TAO_Request_Dispatcher () { } diff --git a/TAO/tao/Resource_Factory.cpp b/TAO/tao/Resource_Factory.cpp index 46dc712b08a..9a7299be1a6 100644 --- a/TAO/tao/Resource_Factory.cpp +++ b/TAO/tao/Resource_Factory.cpp @@ -7,25 +7,25 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Protocol_Item::TAO_Protocol_Item (const ACE_CString &name) : name_ (name), - factory_ (0), + factory_ (nullptr), factory_owner_ (0) { } -TAO_Protocol_Item::~TAO_Protocol_Item (void) +TAO_Protocol_Item::~TAO_Protocol_Item () { if (this->factory_owner_ == 1) delete this->factory_; } const ACE_CString & -TAO_Protocol_Item::protocol_name (void) +TAO_Protocol_Item::protocol_name () { return this->name_; } TAO_Protocol_Factory * -TAO_Protocol_Item::factory (void) +TAO_Protocol_Item::factory () { return this->factory_; } @@ -42,24 +42,24 @@ TAO_Protocol_Item::factory (TAO_Protocol_Factory *factory, // ******************************************************************** -TAO_Resource_Factory::TAO_Resource_Factory (void) +TAO_Resource_Factory::TAO_Resource_Factory () { } -TAO_Resource_Factory::~TAO_Resource_Factory (void) +TAO_Resource_Factory::~TAO_Resource_Factory () { } int -TAO_Resource_Factory::use_locked_data_blocks (void) const +TAO_Resource_Factory::use_locked_data_blocks () const { return 0; } ACE_Reactor * -TAO_Resource_Factory::get_reactor (void) +TAO_Resource_Factory::get_reactor () { - return 0; + return nullptr; } void @@ -69,15 +69,15 @@ TAO_Resource_Factory::reclaim_reactor (ACE_Reactor *) } TAO_Connector_Registry * -TAO_Resource_Factory::get_connector_registry (void) +TAO_Resource_Factory::get_connector_registry () { - return 0; + return nullptr; } TAO_Acceptor_Registry * -TAO_Resource_Factory::get_acceptor_registry (void) +TAO_Resource_Factory::get_acceptor_registry () { - return 0; + return nullptr; } void @@ -86,91 +86,91 @@ TAO_Resource_Factory::use_local_memory_pool (bool) } ACE_Allocator * -TAO_Resource_Factory::input_cdr_dblock_allocator (void) +TAO_Resource_Factory::input_cdr_dblock_allocator () { - return 0; + return nullptr; } ACE_Allocator * -TAO_Resource_Factory::input_cdr_buffer_allocator (void) +TAO_Resource_Factory::input_cdr_buffer_allocator () { - return 0; + return nullptr; } ACE_Allocator * -TAO_Resource_Factory::input_cdr_msgblock_allocator (void) +TAO_Resource_Factory::input_cdr_msgblock_allocator () { - return 0; + return nullptr; } int -TAO_Resource_Factory::input_cdr_allocator_type_locked (void) +TAO_Resource_Factory::input_cdr_allocator_type_locked () { return -1; } ACE_Allocator * -TAO_Resource_Factory::output_cdr_dblock_allocator (void) +TAO_Resource_Factory::output_cdr_dblock_allocator () { - return 0; + return nullptr; } ACE_Allocator * -TAO_Resource_Factory::output_cdr_buffer_allocator (void) +TAO_Resource_Factory::output_cdr_buffer_allocator () { - return 0; + return nullptr; } ACE_Allocator * -TAO_Resource_Factory::output_cdr_msgblock_allocator (void) +TAO_Resource_Factory::output_cdr_msgblock_allocator () { - return 0; + return nullptr; } ACE_Allocator * -TAO_Resource_Factory::amh_response_handler_allocator (void) +TAO_Resource_Factory::amh_response_handler_allocator () { - return 0; + return nullptr; } ACE_Allocator * -TAO_Resource_Factory::ami_response_handler_allocator (void) +TAO_Resource_Factory::ami_response_handler_allocator () { - return 0; + return nullptr; } TAO_ProtocolFactorySet * -TAO_Resource_Factory::get_protocol_factories (void) +TAO_Resource_Factory::get_protocol_factories () { - return 0; + return nullptr; } int -TAO_Resource_Factory::init_protocol_factories (void) +TAO_Resource_Factory::init_protocol_factories () { return -1; } TAO_Codeset_Manager * -TAO_Resource_Factory::codeset_manager (void) +TAO_Resource_Factory::codeset_manager () { - return 0; + return nullptr; } int -TAO_Resource_Factory::cache_maximum (void) const +TAO_Resource_Factory::cache_maximum () const { return TAO_CONNECTION_CACHE_MAXIMUM; } int -TAO_Resource_Factory::purge_percentage (void) const +TAO_Resource_Factory::purge_percentage () const { return 0; } int -TAO_Resource_Factory::max_muxed_connections (void) const +TAO_Resource_Factory::max_muxed_connections () const { return 0; } @@ -183,19 +183,19 @@ TAO_Resource_Factory::get_parser_names (char **&, int &) } ACE_Lock * -TAO_Resource_Factory::create_cached_connection_lock (void) +TAO_Resource_Factory::create_cached_connection_lock () { - return 0; + return nullptr; } int -TAO_Resource_Factory::locked_transport_cache (void) +TAO_Resource_Factory::locked_transport_cache () { return 0; } int -TAO_Resource_Factory::load_default_protocols (void) +TAO_Resource_Factory::load_default_protocols () { return 0; } diff --git a/TAO/tao/Resume_Handle.cpp b/TAO/tao/Resume_Handle.cpp index 48318ca247c..9340184e28b 100644 --- a/TAO/tao/Resume_Handle.cpp +++ b/TAO/tao/Resume_Handle.cpp @@ -12,7 +12,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL void -TAO_Resume_Handle::resume_handle (void) +TAO_Resume_Handle::resume_handle () { // If we have a complete message, just resume the handler // Resume the handler. diff --git a/TAO/tao/ServerRequestInterceptor_Adapter.cpp b/TAO/tao/ServerRequestInterceptor_Adapter.cpp index ff032bbdb59..32a4eb26a2d 100644 --- a/TAO/tao/ServerRequestInterceptor_Adapter.cpp +++ b/TAO/tao/ServerRequestInterceptor_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::ServerRequestInterceptor_Adapter::~ServerRequestInterceptor_Adapter (void) +TAO::ServerRequestInterceptor_Adapter::~ServerRequestInterceptor_Adapter () { } diff --git a/TAO/tao/ServerRequestInterceptor_Adapter_Factory.cpp b/TAO/tao/ServerRequestInterceptor_Adapter_Factory.cpp index be5ff8d08c5..148cc664a82 100644 --- a/TAO/tao/ServerRequestInterceptor_Adapter_Factory.cpp +++ b/TAO/tao/ServerRequestInterceptor_Adapter_Factory.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_ServerRequestInterceptor_Adapter_Factory::~TAO_ServerRequestInterceptor_Adapter_Factory (void) +TAO_ServerRequestInterceptor_Adapter_Factory::~TAO_ServerRequestInterceptor_Adapter_Factory () { } diff --git a/TAO/tao/Server_Strategy_Factory.cpp b/TAO/tao/Server_Strategy_Factory.cpp index 94b91cbaf42..a0cdd404f4a 100644 --- a/TAO/tao/Server_Strategy_Factory.cpp +++ b/TAO/tao/Server_Strategy_Factory.cpp @@ -3,22 +3,22 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Server_Strategy_Factory::TAO_Server_Strategy_Factory (void) +TAO_Server_Strategy_Factory::TAO_Server_Strategy_Factory () : active_object_map_creation_parameters_ () { } -TAO_Server_Strategy_Factory::~TAO_Server_Strategy_Factory(void) +TAO_Server_Strategy_Factory::~TAO_Server_Strategy_Factory() { } const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters & -TAO_Server_Strategy_Factory::active_object_map_creation_parameters (void) const +TAO_Server_Strategy_Factory::active_object_map_creation_parameters () const { return this->active_object_map_creation_parameters_; } -TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::Active_Object_Map_Creation_Parameters (void) +TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::Active_Object_Map_Creation_Parameters () : active_object_map_size_ (TAO_DEFAULT_SERVER_ACTIVE_OBJECT_MAP_SIZE), object_lookup_strategy_for_user_id_policy_ (TAO_DYNAMIC_HASH), object_lookup_strategy_for_system_id_policy_ (TAO_ACTIVE_DEMUX), diff --git a/TAO/tao/Service_Callbacks.cpp b/TAO/tao/Service_Callbacks.cpp index ac33d59c6a5..bf71128e2ae 100644 --- a/TAO/tao/Service_Callbacks.cpp +++ b/TAO/tao/Service_Callbacks.cpp @@ -5,7 +5,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Service_Callbacks::~TAO_Service_Callbacks (void) +TAO_Service_Callbacks::~TAO_Service_Callbacks () { } diff --git a/TAO/tao/Service_Context.cpp b/TAO/tao/Service_Context.cpp index f39f2ce2a88..7f29afdd6bc 100644 --- a/TAO/tao/Service_Context.cpp +++ b/TAO/tao/Service_Context.cpp @@ -22,7 +22,7 @@ TAO_Service_Context::set_context_i (IOP::ServiceId id, TAO_OutputCDR &cdr) CORBA::Octet *buf = context.context_data.get_buffer (); for (const ACE_Message_Block *i = cdr.begin (); - i != 0; + i != nullptr; i = i->cont ()) { ACE_OS::memcpy (buf, i->rd_ptr (), i->length ()); @@ -42,7 +42,7 @@ TAO_Service_Context::set_context_i (IOP::ServiceContext &context, CORBA::Octet *buf = context.context_data.get_buffer (); for (const ACE_Message_Block *i = cdr.begin (); - i != 0; + i != nullptr; i = i->cont ()) { ACE_OS::memcpy (buf, i->rd_ptr (), i->length ()); diff --git a/TAO/tao/Service_Context_Handler.cpp b/TAO/tao/Service_Context_Handler.cpp index b6d2800fd34..1f80a63dcf2 100644 --- a/TAO/tao/Service_Context_Handler.cpp +++ b/TAO/tao/Service_Context_Handler.cpp @@ -3,11 +3,11 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Service_Context_Handler::TAO_Service_Context_Handler (void) +TAO_Service_Context_Handler::TAO_Service_Context_Handler () { } -TAO_Service_Context_Handler::~TAO_Service_Context_Handler (void) +TAO_Service_Context_Handler::~TAO_Service_Context_Handler () { } diff --git a/TAO/tao/Service_Context_Handler_Registry.cpp b/TAO/tao/Service_Context_Handler_Registry.cpp index 7cf3a049332..550056efe2e 100644 --- a/TAO/tao/Service_Context_Handler_Registry.cpp +++ b/TAO/tao/Service_Context_Handler_Registry.cpp @@ -49,7 +49,7 @@ TAO_Service_Context_Registry::generate_service_context ( return result; } -TAO_Service_Context_Registry::~TAO_Service_Context_Registry (void) +TAO_Service_Context_Registry::~TAO_Service_Context_Registry () { for (Table::iterator x = this->registry_.begin (); x != this->registry_.end (); diff --git a/TAO/tao/Services_Activate.cpp b/TAO/tao/Services_Activate.cpp index 6fffafa3c84..97f5307725c 100644 --- a/TAO/tao/Services_Activate.cpp +++ b/TAO/tao/Services_Activate.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Services_Activate::~TAO_Services_Activate (void) +TAO_Services_Activate::~TAO_Services_Activate () { } diff --git a/TAO/tao/Storable_Base.cpp b/TAO/tao/Storable_Base.cpp index 083199b8bf7..a04f09d1564 100644 --- a/TAO/tao/Storable_Base.cpp +++ b/TAO/tao/Storable_Base.cpp @@ -20,7 +20,7 @@ bool TAO::Storable_Base::use_backup_default = false; bool TAO::Storable_Base::retry_on_ebadf_default = false; void -TAO::Storable_Base::remove (void) +TAO::Storable_Base::remove () { if (this->use_backup_) { diff --git a/TAO/tao/Storable_Factory.cpp b/TAO/tao/Storable_Factory.cpp index 624f7200e00..41b99d0dbc1 100644 --- a/TAO/tao/Storable_Factory.cpp +++ b/TAO/tao/Storable_Factory.cpp @@ -12,11 +12,11 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO::Storable_Factory::Storable_Factory (void) +TAO::Storable_Factory::Storable_Factory () { } -TAO::Storable_Factory::~Storable_Factory (void) +TAO::Storable_Factory::~Storable_Factory () { } diff --git a/TAO/tao/Storable_File_Guard.cpp b/TAO/tao/Storable_File_Guard.cpp index 09a4b60f57e..b428fe67121 100644 --- a/TAO/tao/Storable_File_Guard.cpp +++ b/TAO/tao/Storable_File_Guard.cpp @@ -15,7 +15,7 @@ TAO::Storable_File_Guard:: Storable_File_Guard (bool redundant, bool use_backup) - : fl_(0) + : fl_(nullptr) , redundant_(redundant) , closed_(1) , rwflags_(0) @@ -69,7 +69,7 @@ TAO::Storable_File_Guard::init_no_load(Method_Type method_type) } void -TAO::Storable_File_Guard::reload (void) +TAO::Storable_File_Guard::reload () { if (redundant_) { @@ -145,21 +145,21 @@ TAO::Storable_File_Guard::init(Method_Type method_type) } bool -TAO::Storable_File_Guard::object_obsolete (void) +TAO::Storable_File_Guard::object_obsolete () { // Default implementation uses time to determine // if obsolete. return (fl_->last_changed () > this->get_object_last_changed ()); } void -TAO::Storable_File_Guard::mark_object_current (void) +TAO::Storable_File_Guard::mark_object_current () { // Default implementation is to set the last changed // time to that of the file lock. this->set_object_last_changed (fl_->last_changed ()); } void -TAO::Storable_File_Guard::release (void) +TAO::Storable_File_Guard::release () { if ( ! closed_ ) { diff --git a/TAO/tao/Storable_FlatFileStream.cpp b/TAO/tao/Storable_FlatFileStream.cpp index a95c5063fc0..2cb1951cc3a 100644 --- a/TAO/tao/Storable_FlatFileStream.cpp +++ b/TAO/tao/Storable_FlatFileStream.cpp @@ -41,7 +41,7 @@ namespace char buf[BUFSIZ]; char * result = fgets (buf, BUFSIZ, fl); - if (result == 0) + if (result == nullptr) { if (feof (fl)) { @@ -59,7 +59,7 @@ namespace result = fgets (buf, BUFSIZ, fl); } - if (result == 0) + if (result == nullptr) { if (feof (fl)) { @@ -131,18 +131,18 @@ TAO::Storable_FlatFileStream::Storable_FlatFileStream (const ACE_CString & file, bool retry_on_ebadf) : Storable_Base(use_backup, retry_on_ebadf) , filelock_ () - , fl_ (0) + , fl_ (nullptr) , file_(file) , mode_(mode) { // filelock_ will be completely initialized in call to init (). filelock_.handle_ = ACE_INVALID_HANDLE; - filelock_.lockname_ = 0; + filelock_.lockname_ = nullptr; } TAO::Storable_FlatFileStream::~Storable_FlatFileStream () { - if ( fl_ != 0 ) + if ( fl_ != nullptr ) this->close(); } @@ -178,7 +178,7 @@ TAO::Storable_FlatFileStream::open() { // For now, three flags exist "r", "w", and "c" int flags = 0; - const char *fdmode = 0; + const char *fdmode = nullptr; if( ACE_OS::strchr(mode_.c_str(), 'r') ) if( ACE_OS::strchr(mode_.c_str(), 'w') ) flags = O_RDWR, fdmode = "w+"; @@ -206,14 +206,14 @@ TAO::Storable_FlatFileStream::open() -1); #endif - this->fl_ = 0; + this->fl_ = nullptr; for (int attempts = this->retry_on_ebadf_ ? 2 : 1; - attempts > 0 && this->fl_ == 0; + attempts > 0 && this->fl_ == nullptr; attempts--) { this->fl_ = ACE_OS::fdopen(filelock_.handle_, ACE_TEXT_CHAR_TO_TCHAR (fdmode)); - if (this->fl_ == 0) + if (this->fl_ == nullptr) { if (TAO_debug_level > 0) { @@ -228,7 +228,7 @@ TAO::Storable_FlatFileStream::open() } } } - return this->fl_ == 0 ? -1 : 0; + return this->fl_ == nullptr ? -1 : 0; } int @@ -241,7 +241,7 @@ TAO::Storable_FlatFileStream::close() ACE_OS::fclose (fl_); // even though flock_destroy closes the handle // we still need to destroy the FILE* - fl_ = 0; + fl_ = nullptr; return 0; } @@ -331,7 +331,7 @@ TAO::Storable_FlatFileStream::funlock (int whence, int start, int len) } time_t -TAO::Storable_FlatFileStream::last_changed(void) +TAO::Storable_FlatFileStream::last_changed() { ACE_stat st; int result = 0; @@ -384,19 +384,19 @@ TAO::Storable_FlatFileStream::last_changed(void) } void -TAO::Storable_FlatFileStream::rewind (void) +TAO::Storable_FlatFileStream::rewind () { ACE_OS::rewind(this->fl_); } bool -TAO::Storable_FlatFileStream::flush (void) +TAO::Storable_FlatFileStream::flush () { return ACE_OS::fflush(this->fl_); } int -TAO::Storable_FlatFileStream::sync (void) +TAO::Storable_FlatFileStream::sync () { return ACE_OS::fsync (this->filelock_.handle_); } @@ -441,12 +441,12 @@ TAO::Storable_FlatFileStream::operator >> (ACE_CString& str) str_array[0] = '\0'; if (ACE_OS::fgets (str_array.get (), strSize, - this->fl_) == 0 + this->fl_) == nullptr && bufSize != 0) { this->throw_on_read_error (badbit); } - str = ACE_CString (str_array.get (), 0, false); + str = ACE_CString (str_array.get (), nullptr, false); } return *this; @@ -539,7 +539,7 @@ TAO::Storable_FlatFileStream::operator << (const TAO_OutputCDR & cdr) unsigned int const length = ACE_Utils::truncate_cast<unsigned int> (cdr.total_length ()); *this << length; - for (const ACE_Message_Block *i = cdr.begin (); i != 0; i = i->cont ()) + for (const ACE_Message_Block *i = cdr.begin (); i != nullptr; i = i->cont ()) { const char *bytes = i->rd_ptr (); size_t const len = i->length (); @@ -569,7 +569,7 @@ TAO::Storable_FlatFileStream::backup_file_name () int TAO::Storable_FlatFileStream::create_backup () { - if (this->fl_ == 0) + if (this->fl_ == nullptr) { return 0; } @@ -634,7 +634,7 @@ TAO::Storable_FlatFileStream::restore_backup () if (ACE_OS::access (backup_name.c_str (), F_OK)) return -1; - if (ACE_OS::strchr (this->mode_.c_str(),'w') == 0) + if (ACE_OS::strchr (this->mode_.c_str(),'w') == nullptr) { this->mode_ += 'w'; } @@ -704,7 +704,7 @@ TAO::Storable_FlatFileFactory::is_nfs (const ACE_CString& directory) if (*dir != '/') { rpath[0] = 0; - if (ACE_OS::getcwd (rpath, PATH_MAX) == 0) + if (ACE_OS::getcwd (rpath, PATH_MAX) == nullptr) { if (TAO_debug_level > 0) { @@ -734,10 +734,10 @@ TAO::Storable_FlatFileFactory::is_nfs (const ACE_CString& directory) } size_t match = 0; size_t dirlen = ACE_OS::strlen(dir); - struct mntent *ent = 0; + struct mntent *ent = nullptr; const char *fname = "/etc/mtab"; FILE *mt = ::setmntent(fname,"r"); - if (mt == 0) + if (mt == nullptr) { if (TAO_debug_level > 0) { @@ -748,7 +748,7 @@ TAO::Storable_FlatFileFactory::is_nfs (const ACE_CString& directory) } return ret; } - while ((ent = ::getmntent(mt)) != 0) + while ((ent = ::getmntent(mt)) != nullptr) { size_t len = ACE_OS::strlen(ent->mnt_dir); @@ -788,14 +788,14 @@ TAO::Storable_FlatFileFactory::create_stream (const ACE_CString & file, const char * mode, bool ) { - TAO::Storable_Base *stream = 0; + TAO::Storable_Base *stream = nullptr; ACE_CString path = this->directory_ + "/" + file; ACE_NEW_RETURN (stream, TAO::Storable_FlatFileStream(path, mode, this->use_backup_, this->retry_on_ebadf_), - 0); + nullptr); return stream; } diff --git a/TAO/tao/String_Alloc.cpp b/TAO/tao/String_Alloc.cpp index 7b6edfaac05..91935ce80a1 100644 --- a/TAO/tao/String_Alloc.cpp +++ b/TAO/tao/String_Alloc.cpp @@ -22,7 +22,7 @@ CORBA::string_dup (const char *str) if (!str) { errno = EINVAL; - return 0; + return nullptr; } #ifndef TAO_NO_SHARED_NULL_CORBA_STRING @@ -47,10 +47,10 @@ char * CORBA::string_alloc (CORBA::ULong len) { // Allocate 1 + strlen to accomodate the null terminating character. - char *s = 0; + char *s = nullptr; ACE_NEW_RETURN (s, char[size_t (len + 1)], - 0); + nullptr); s[0]= '\0'; return s; @@ -73,7 +73,7 @@ CORBA::wstring_dup (const WChar *const str) if (!str) { errno = EINVAL; - return 0; + return nullptr; } #ifndef TAO_NO_SHARED_NULL_CORBA_STRING @@ -83,10 +83,10 @@ CORBA::wstring_dup (const WChar *const str) CORBA::WChar* retval = CORBA::wstring_alloc (static_cast <CORBA::ULong> (ACE_OS::strlen (str))); - if (retval == 0) + if (retval == nullptr) { // The wscpy() below assumes that the destination is a valid buffer. - return 0; + return nullptr; } return ACE_OS::wscpy (retval, str); @@ -95,10 +95,10 @@ CORBA::wstring_dup (const WChar *const str) CORBA::WChar* CORBA::wstring_alloc (CORBA::ULong len) { - CORBA::WChar *s = 0; + CORBA::WChar *s = nullptr; ACE_NEW_RETURN (s, CORBA::WChar [(size_t) (len + 1)], - 0); + nullptr); return s; } diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp index 5f5a645e70e..1be51e3c49c 100644 --- a/TAO/tao/Stub.cpp +++ b/TAO/tao/Stub.cpp @@ -35,23 +35,23 @@ TAO_Stub::TAO_Stub (const char *repository_id, , orb_ () , is_collocated_ (false) , servant_orb_ () - , collocated_servant_ (0) + , collocated_servant_ (nullptr) , object_proxy_broker_ (the_tao_remote_object_proxy_broker ()) , base_profiles_ ((CORBA::ULong) 0) - , forward_profiles_ (0) - , forward_profiles_perm_ (0) - , profile_in_use_ (0) + , forward_profiles_ (nullptr) + , forward_profiles_perm_ (nullptr) + , profile_in_use_ (nullptr) , profile_success_ (false) , refcount_ (1) #if (TAO_HAS_CORBA_MESSAGING == 1) - , policies_ (0) + , policies_ (nullptr) #endif - , ior_info_ (0) - , forwarded_ior_info_ (0) + , ior_info_ (nullptr) + , forwarded_ior_info_ (nullptr) , collocation_opt_ (orb_core->optimize_collocation_objects ()) , forwarded_on_exception_ (false) { - if (this->orb_core_.get() == 0) + if (this->orb_core_.get() == nullptr) { if (TAO_debug_level > 0) { @@ -79,7 +79,7 @@ TAO_Stub::TAO_Stub (const char *repository_id, this->base_profiles (profiles); } -TAO_Stub::~TAO_Stub (void) +TAO_Stub::~TAO_Stub () { ACE_ASSERT (this->refcount_ == 0); @@ -89,11 +89,11 @@ TAO_Stub::~TAO_Stub (void) // reset_profiles doesn't delete forward_profiles_perm_. delete this->forward_profiles_perm_; - if (this->profile_in_use_ != 0) + if (this->profile_in_use_ != nullptr) { // decrease reference count on profile this->profile_in_use_->_decr_refcnt (); - this->profile_in_use_ = 0; + this->profile_in_use_ = nullptr; } #if (TAO_HAS_CORBA_MESSAGING == 1) @@ -125,13 +125,13 @@ TAO_Stub::add_forward_profiles (const TAO_MProfile &mprofiles, if (permanent_forward) { // paranoid, reset the bookmark, then clear the forward-stack - this->forward_profiles_perm_ = 0; + this->forward_profiles_perm_ = nullptr; this->reset_forward (); } TAO_MProfile *now_pfiles = this->forward_profiles_; - if (now_pfiles == 0) + if (now_pfiles == nullptr) now_pfiles = &this->base_profiles_; ACE_NEW (this->forward_profiles_, @@ -175,11 +175,11 @@ TAO_Stub::create_ior_info (IOP::IOR *&ior_info, CORBA::ULong &index) } - IOP::IOR *tmp_info = 0; + IOP::IOR *tmp_info = nullptr; - if (this->forward_profiles_ != 0) + if (this->forward_profiles_ != nullptr) { - if (this->forwarded_ior_info_ == 0) + if (this->forwarded_ior_info_ == nullptr) { this->get_profile_ior_info (*this->forward_profiles_, tmp_info); @@ -203,7 +203,7 @@ TAO_Stub::create_ior_info (IOP::IOR *&ior_info, CORBA::ULong &index) } // Else we look at the base profiles - if (this->ior_info_ == 0) + if (this->ior_info_ == nullptr) { this->get_profile_ior_info (this->base_profiles_, tmp_info); @@ -228,7 +228,7 @@ TAO_Stub::create_ior_info (IOP::IOR *&ior_info, CORBA::ULong &index) } const TAO::ObjectKey & -TAO_Stub::object_key (void) const +TAO_Stub::object_key () const { // Return the profile in use's object key if you see one. if (this->profile_in_use_) @@ -242,7 +242,7 @@ TAO_Stub::object_key (void) const const_cast <TAO_SYNCH_MUTEX&>(this->profile_lock_)); // FUZZ: enable check_for_ACE_Guard - if (obj.locked () != 0 && this->forward_profiles_ != 0) + if (obj.locked () != 0 && this->forward_profiles_ != nullptr) return this->forward_profiles_->get_profile (0)->object_key (); } @@ -271,7 +271,7 @@ TAO_Stub::get_profile_ior_info (TAO_MProfile &profiles, IOP::IOR *&ior_info) IOP::TaggedProfile *tp = prof->create_tagged_profile (); - if (tp == 0) + if (tp == nullptr) throw ::CORBA::NO_MEMORY (); ior_info->profiles[index] = *tp; } @@ -285,7 +285,7 @@ TAO_Stub::is_collocated (CORBA::Boolean collocated) if (this->is_collocated_ != collocated) { if (collocated && - _TAO_Object_Proxy_Broker_Factory_function_pointer != 0) + _TAO_Object_Proxy_Broker_Factory_function_pointer != nullptr) { this->object_proxy_broker_ = _TAO_Object_Proxy_Broker_Factory_function_pointer (); @@ -327,7 +327,7 @@ TAO_Stub::is_equivalent (CORBA::Object_ptr other_obj) TAO_Profile * const other_profile = other_obj->_stubobj ()->profile_in_use_; TAO_Profile * const this_profile = this->profile_in_use_; - if (other_profile == 0 || this_profile == 0) + if (other_profile == nullptr || this_profile == nullptr) return false; // Compare the profiles @@ -359,7 +359,7 @@ TAO_Stub::set_profile_in_use_i (TAO_Profile *pfile) } void -TAO_Stub::forward_back_one (void) +TAO_Stub::forward_back_one () { TAO_MProfile *from = forward_profiles_->forward_from (); @@ -371,12 +371,12 @@ TAO_Stub::forward_back_one (void) // longer being forwarded, so set the reference to zero. if (from == &this->base_profiles_) { - this->base_profiles_.get_current_profile ()->forward_to (0); - this->forward_profiles_ = 0; + this->base_profiles_.get_current_profile ()->forward_to (nullptr); + this->forward_profiles_ = nullptr; } else { - from->get_current_profile ()->forward_to (0); + from->get_current_profile ()->forward_to (nullptr); this->forward_profiles_ = from; } } @@ -418,7 +418,7 @@ TAO_Stub::get_policy (CORBA::PolicyType type) // construction time... CORBA::Policy_var result; - if (this->policies_ != 0) + if (this->policies_ != nullptr) { result = this->policies_->get_policy (type); } @@ -438,7 +438,7 @@ TAO_Stub::get_cached_policy (TAO_Cached_Policy_Type type) // construction time... CORBA::Policy_var result; - if (this->policies_ != 0) + if (this->policies_ != nullptr) { result = this->policies_->get_cached_policy (type); } @@ -466,7 +466,7 @@ TAO_Stub::set_policy_overrides (const CORBA::PolicyList & policies, { policy_manager->set_policy_overrides (policies, set_add); } - else if (this->policies_ == 0) + else if (this->policies_ == nullptr) { policy_manager->set_policy_overrides (policies, CORBA::SET_OVERRIDE); } @@ -491,9 +491,9 @@ TAO_Stub::set_policy_overrides (const CORBA::PolicyList & policies, CORBA::PolicyList * TAO_Stub::get_policy_overrides (const CORBA::PolicyTypeSeq &types) { - if (this->policies_ == 0) + if (this->policies_ == nullptr) { - CORBA::PolicyList *policy_list_ptr = 0; + CORBA::PolicyList *policy_list_ptr = nullptr; ACE_NEW_THROW_EX (policy_list_ptr, CORBA::PolicyList (), CORBA::NO_MEMORY ()); @@ -548,7 +548,7 @@ TAO_Stub::marshal (TAO_OutputCDR &cdr) } - ACE_ASSERT(this->forward_profiles_ !=0); + ACE_ASSERT(this->forward_profiles_ !=nullptr); // paranoid - in case of FT the basic_profiles_ would do, too, // but might be dated diff --git a/TAO/tao/Stub_Factory.cpp b/TAO/tao/Stub_Factory.cpp index 7a29fd40e4d..e6ac07d53a6 100644 --- a/TAO/tao/Stub_Factory.cpp +++ b/TAO/tao/Stub_Factory.cpp @@ -3,7 +3,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Stub_Factory::~TAO_Stub_Factory (void) +TAO_Stub_Factory::~TAO_Stub_Factory () { } diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp index 6e1c38b22e9..69e7f948fac 100644 --- a/TAO/tao/Synch_Invocation.cpp +++ b/TAO/tao/Synch_Invocation.cpp @@ -75,7 +75,7 @@ namespace TAO resolver, detail, response_expected) - , retry_state_ (0) + , retry_state_ (nullptr) { } @@ -90,7 +90,7 @@ namespace TAO { TAO::ORB_Countdown_Time countdown (max_wait_time); - TAO_Synch_Reply_Dispatcher *rd_p = 0; + TAO_Synch_Reply_Dispatcher *rd_p = nullptr; ACE_NEW_NORETURN (rd_p, TAO_Synch_Reply_Dispatcher (this->resolver_.stub ()->orb_core (), this->details_.reply_service_info ())); if (!rd_p) @@ -398,7 +398,7 @@ namespace TAO } catch (const ::CORBA::Exception&) { - if (this->retry_state_ == 0 || + if (this->retry_state_ == nullptr || !this->retry_state_->forward_on_exception_limit_used ()) { this->resolver_.stub ()->reset_profiles (); @@ -426,7 +426,7 @@ namespace TAO TAO_InputCDR &cdr = rd.reply_cdr (); // Set the translators - this->resolver_.transport ()->assign_translators (&cdr, 0); + this->resolver_.transport ()->assign_translators (&cdr, nullptr); // At this point it can be assumed that the GIOP/whatever protocol // header and the reply header are already handled. Further it @@ -718,7 +718,7 @@ namespace TAO CORBA::SystemException *ex = TAO::create_system_exception (type_id.in ()); - if (ex == 0) + if (ex == nullptr) { // @@ We should raise a CORBA::NO_MEMORY, but we ran out // of memory already. We need a pre-allocated, TSS, diff --git a/TAO/tao/Synch_Queued_Message.cpp b/TAO/tao/Synch_Queued_Message.cpp index f4ed2276cec..fb5122c0aea 100644 --- a/TAO/tao/Synch_Queued_Message.cpp +++ b/TAO/tao/Synch_Queued_Message.cpp @@ -20,24 +20,24 @@ TAO_Synch_Queued_Message::TAO_Synch_Queued_Message ( { } -TAO_Synch_Queued_Message::~TAO_Synch_Queued_Message (void) +TAO_Synch_Queued_Message::~TAO_Synch_Queued_Message () { - if (this->own_contents_ && this->contents_ != 0) + if (this->own_contents_ && this->contents_ != nullptr) { ACE_Message_Block::release (this->contents_); } } const ACE_Message_Block * -TAO_Synch_Queued_Message::current_block (void) const +TAO_Synch_Queued_Message::current_block () const { return this->current_block_; } size_t -TAO_Synch_Queued_Message::message_length (void) const +TAO_Synch_Queued_Message::message_length () const { - if (this->current_block_ == 0) + if (this->current_block_ == nullptr) { return 0; } @@ -46,9 +46,9 @@ TAO_Synch_Queued_Message::message_length (void) const } int -TAO_Synch_Queued_Message::all_data_sent (void) const +TAO_Synch_Queued_Message::all_data_sent () const { - return this->current_block_ == 0; + return this->current_block_ == nullptr; } void @@ -59,7 +59,7 @@ TAO_Synch_Queued_Message::fill_iov (int iovcnt_max, ACE_ASSERT (iovcnt_max > iovcnt); for (const ACE_Message_Block *message_block = this->current_block_; - message_block != 0 && iovcnt < iovcnt_max; + message_block != nullptr && iovcnt < iovcnt_max; message_block = message_block->cont ()) { size_t const message_block_length = message_block->length (); @@ -82,7 +82,7 @@ TAO_Synch_Queued_Message::bytes_transferred (size_t &byte_count) { this->state_changed_i (TAO_LF_Event::LFS_ACTIVE); - while (this->current_block_ != 0 && byte_count > 0) + while (this->current_block_ != nullptr && byte_count > 0) { size_t const l = this->current_block_->length (); @@ -97,14 +97,14 @@ TAO_Synch_Queued_Message::bytes_transferred (size_t &byte_count) this->current_block_->rd_ptr (l); this->current_block_ = this->current_block_->cont (); - while (this->current_block_ != 0 + while (this->current_block_ != nullptr && this->current_block_->length () == 0) { this->current_block_ = this->current_block_->cont (); } } - if (this->current_block_ == 0) + if (this->current_block_ == nullptr) this->state_changed (TAO_LF_Event::LFS_SUCCESS, this->orb_core_->leader_follower ()); } @@ -112,7 +112,7 @@ TAO_Synch_Queued_Message::bytes_transferred (size_t &byte_count) TAO_Queued_Message * TAO_Synch_Queued_Message::clone (ACE_Allocator *alloc) { - TAO_Synch_Queued_Message *qm = 0; + TAO_Synch_Queued_Message *qm = nullptr; // Clone the message block. // NOTE: We wantedly do the cloning from <current_block_> instead of @@ -130,26 +130,26 @@ TAO_Synch_Queued_Message::clone (ACE_Allocator *alloc) this->orb_core_, alloc, true), - 0); + nullptr); } else { ACE_NEW_RETURN (qm, - TAO_Synch_Queued_Message (mb, this->orb_core_, 0, true), - 0); + TAO_Synch_Queued_Message (mb, this->orb_core_, nullptr, true), + nullptr); } return qm; } void -TAO_Synch_Queued_Message::destroy (void) +TAO_Synch_Queued_Message::destroy () { if (this->own_contents_) { ACE_Message_Block::release (this->contents_); - this->current_block_ = 0; - this->contents_ = 0; + this->current_block_ = nullptr; + this->contents_ = nullptr; } if (this->is_heap_created_) @@ -176,7 +176,7 @@ TAO_Synch_Queued_Message::copy_if_necessary (const ACE_Message_Block* chain) { // Go through the message block chain looking for the message block // that matches our "current" message block. - for (const ACE_Message_Block* mb = chain; mb != 0; mb = mb->cont ()) + for (const ACE_Message_Block* mb = chain; mb != nullptr; mb = mb->cont ()) { if (mb == this->current_block_) { diff --git a/TAO/tao/Synch_Reply_Dispatcher.cpp b/TAO/tao/Synch_Reply_Dispatcher.cpp index 3043fd45ce0..a63bcad601c 100644 --- a/TAO/tao/Synch_Reply_Dispatcher.cpp +++ b/TAO/tao/Synch_Reply_Dispatcher.cpp @@ -31,18 +31,18 @@ TAO_Synch_Reply_Dispatcher::TAO_Synch_Reply_Dispatcher ( } // Destructor. -TAO_Synch_Reply_Dispatcher::~TAO_Synch_Reply_Dispatcher (void) +TAO_Synch_Reply_Dispatcher::~TAO_Synch_Reply_Dispatcher () { } TAO_InputCDR & -TAO_Synch_Reply_Dispatcher::reply_cdr (void) +TAO_Synch_Reply_Dispatcher::reply_cdr () { return this->reply_cdr_; } void -TAO_Synch_Reply_Dispatcher::reply_timed_out (void) +TAO_Synch_Reply_Dispatcher::reply_timed_out () { // noop } @@ -51,7 +51,7 @@ int TAO_Synch_Reply_Dispatcher::dispatch_reply ( TAO_Pluggable_Reply_Params ¶ms) { - if (params.input_cdr_ == 0) + if (params.input_cdr_ == nullptr) return -1; this->reply_status_ = params.reply_status (); @@ -67,7 +67,7 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply ( if (this->reply_service_info_.length() > 0) { orb_core_->service_context_registry (). - process_service_contexts (this->reply_service_info_, *(params.transport_), 0); + process_service_contexts (this->reply_service_info_, *(params.transport_), nullptr); } // Must reset the message state, it is possible that the same reply @@ -86,7 +86,7 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply ( { ACE_Data_Block *db = this->reply_cdr_.clone_from (*params.input_cdr_); - if (db == 0) + if (db == nullptr) { if (TAO_debug_level > 2) { @@ -116,7 +116,7 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply ( } void -TAO_Synch_Reply_Dispatcher::connection_closed (void) +TAO_Synch_Reply_Dispatcher::connection_closed () { this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED, this->orb_core_->leader_follower ()); diff --git a/TAO/tao/SystemException.cpp b/TAO/tao/SystemException.cpp index d966dbd8b0b..7dc23aa3e40 100644 --- a/TAO/tao/SystemException.cpp +++ b/TAO/tao/SystemException.cpp @@ -55,7 +55,7 @@ const CORBA::ULong TAO_ENOTSUP_MINOR_CODE = 0x14U; // **************************************************************** -CORBA::SystemException::SystemException (void) +CORBA::SystemException::SystemException () : minor_ (0), completed_ (CORBA::COMPLETED_NO) { @@ -86,7 +86,7 @@ CORBA::SystemException::SystemException (const CORBA::SystemException &src) { } -CORBA::SystemException::~SystemException (void) +CORBA::SystemException::~SystemException () { } @@ -197,9 +197,9 @@ CORBA::SystemException::_tao_errno (int errno_value) } CORBA::Exception * -CORBA::SystemException::_tao_duplicate (void) const +CORBA::SystemException::_tao_duplicate () const { - return 0; + return nullptr; } CORBA::ULong @@ -220,7 +220,7 @@ CORBA::SystemException::_tao_print_system_exception (FILE *) const } ACE_CString -CORBA::SystemException::_info (void) const +CORBA::SystemException::_info () const { // @@ there are a few other "user exceptions" in the CORBA scope, // they're not all standard/system exceptions ... really need to @@ -241,7 +241,7 @@ CORBA::SystemException::_info (void) const if (VMCID == TAO::VMCID) { // @@ Move the following code to a subroutine, it is too long already! - const char *location = 0; + const char *location = nullptr; switch (this->minor () & 0x00000F80u) { case TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE: @@ -308,7 +308,7 @@ CORBA::SystemException::_info (void) const location = "unknown location"; } - const char *errno_indication = 0; + const char *errno_indication = nullptr; char unknown_errno [255]; CORBA::ULong minor_code = this->minor () & 0x7FU; switch (minor_code) @@ -410,7 +410,7 @@ CORBA::SystemException::_info (void) const { CORBA::ULong const minor_code = this->minor () & 0xFFFU; - const char *minor_description = 0; + const char *minor_description = nullptr; if (minor_code > 0) minor_description = @@ -697,133 +697,133 @@ CORBA::SystemException::_tao_get_omg_exception_description ( CORBA::UNKNOWN const * unknown_exception = dynamic_cast <const CORBA::UNKNOWN *> (&exc); - if (unknown_exception != 0 + if (unknown_exception != nullptr && minor_code < sizeof UNKNOWN_TABLE / sizeof (char *)) return UNKNOWN_TABLE[minor_code]; CORBA::BAD_PARAM const * bad_param__exception = dynamic_cast <const CORBA::BAD_PARAM *> (&exc); - if (bad_param__exception != 0 + if (bad_param__exception != nullptr && minor_code < sizeof BAD_PARAM_TABLE / sizeof (char *)) return BAD_PARAM_TABLE[minor_code]; CORBA::IMP_LIMIT const * imp_limit_exception = dynamic_cast <const CORBA::IMP_LIMIT *> (&exc); - if (imp_limit_exception != 0 + if (imp_limit_exception != nullptr && minor_code < sizeof IMP_LIMIT_TABLE / sizeof (char *)) return IMP_LIMIT_TABLE[minor_code]; CORBA::INITIALIZE const * initialize_exception = dynamic_cast <const CORBA::INITIALIZE *> (&exc); - if (initialize_exception != 0 + if (initialize_exception != nullptr && minor_code < sizeof INITIALIZE_TABLE / sizeof (char *)) return INITIALIZE_TABLE[minor_code]; CORBA::INV_OBJREF const * inv_objref_exception = dynamic_cast <const CORBA::INV_OBJREF *> (&exc); - if (inv_objref_exception != 0 + if (inv_objref_exception != nullptr && minor_code < sizeof INV_OBJREF_TABLE / sizeof (char *)) return INV_OBJREF_TABLE[minor_code]; CORBA::MARSHAL const * marshal_exception = dynamic_cast <const CORBA::MARSHAL *> (&exc); - if (marshal_exception != 0 + if (marshal_exception != nullptr && minor_code < sizeof MARSHAL_TABLE / sizeof (char *)) return MARSHAL_TABLE[minor_code]; CORBA::BAD_TYPECODE const * bad_typecode_exception = dynamic_cast <const CORBA::BAD_TYPECODE *> (&exc); - if (bad_typecode_exception != 0 + if (bad_typecode_exception != nullptr && minor_code < sizeof BAD_TYPECODE_TABLE / sizeof (char *)) return BAD_TYPECODE_TABLE[minor_code]; CORBA::NO_IMPLEMENT const * no_implement_exception = dynamic_cast <const CORBA::NO_IMPLEMENT *> (&exc); - if (no_implement_exception != 0 + if (no_implement_exception != nullptr && minor_code < sizeof NO_IMPLEMENT_TABLE / sizeof (char *)) return NO_IMPLEMENT_TABLE[minor_code]; CORBA::NO_RESOURCES const * no_resource_exception = dynamic_cast <const CORBA::NO_RESOURCES *> (&exc); - if (no_resource_exception != 0 + if (no_resource_exception != nullptr && minor_code < sizeof NO_RESOURCES_TABLE / sizeof (char *)) return NO_RESOURCES_TABLE[minor_code]; CORBA::BAD_INV_ORDER const * bad_inv_order_exception = dynamic_cast <const CORBA::BAD_INV_ORDER *> (&exc); - if (bad_inv_order_exception != 0 + if (bad_inv_order_exception != nullptr && minor_code < sizeof BAD_INV_ORDER_TABLE / sizeof (char *)) return BAD_INV_ORDER_TABLE[minor_code]; CORBA::TRANSIENT const * transient_exception = dynamic_cast <const CORBA::TRANSIENT *> (&exc); - if (transient_exception != 0 + if (transient_exception != nullptr && minor_code < sizeof TRANSIENT_TABLE / sizeof (char *)) return TRANSIENT_TABLE[minor_code]; CORBA::OBJ_ADAPTER const * obj_adapter_exception = dynamic_cast <const CORBA::OBJ_ADAPTER *> (&exc); - if (obj_adapter_exception != 0 + if (obj_adapter_exception != nullptr && minor_code < sizeof OBJ_ADAPTER_TABLE / sizeof (char *)) return OBJ_ADAPTER_TABLE[minor_code]; CORBA::DATA_CONVERSION const * data_conversion_exception = dynamic_cast <const CORBA::DATA_CONVERSION *> (&exc); - if (data_conversion_exception != 0 + if (data_conversion_exception != nullptr && minor_code < sizeof DATA_CONVERSION_TABLE / sizeof (char *)) return DATA_CONVERSION_TABLE[minor_code]; CORBA::OBJECT_NOT_EXIST const * object_not_exist_exception = dynamic_cast <const CORBA::OBJECT_NOT_EXIST *> (&exc); - if (object_not_exist_exception != 0 + if (object_not_exist_exception != nullptr && minor_code < sizeof OBJECT_NOT_EXIST_TABLE / sizeof (char *)) return OBJECT_NOT_EXIST_TABLE[minor_code]; CORBA::INV_POLICY const * inv_policy_exception = dynamic_cast <const CORBA::INV_POLICY *> (&exc); - if (inv_policy_exception != 0 + if (inv_policy_exception != nullptr && minor_code < sizeof INV_POLICY_TABLE / sizeof (char *)) return INV_POLICY_TABLE[minor_code]; CORBA::ACTIVITY_COMPLETED const * activity_completed_exception = dynamic_cast <const CORBA::ACTIVITY_COMPLETED *> (&exc); - if (activity_completed_exception != 0 + if (activity_completed_exception != nullptr && minor_code < sizeof ACTIVITY_COMPLETED_TABLE / sizeof (char *)) return ACTIVITY_COMPLETED_TABLE[minor_code]; CORBA::ACTIVITY_REQUIRED const * activity_required_exception = dynamic_cast <const CORBA::ACTIVITY_REQUIRED *> (&exc); - if (activity_required_exception != 0 + if (activity_required_exception != nullptr && minor_code < sizeof ACTIVITY_REQUIRED_TABLE / sizeof (char *)) return ACTIVITY_REQUIRED_TABLE[minor_code]; CORBA::BAD_OPERATION const * bad_operation_exception = dynamic_cast <const CORBA::BAD_OPERATION *> (&exc); - if (bad_operation_exception != 0 + if (bad_operation_exception != nullptr && minor_code < sizeof BAD_OPERATION_TABLE / sizeof (char *)) return BAD_OPERATION_TABLE[minor_code]; CORBA::BAD_CONTEXT const * bad_context_exception = dynamic_cast <const CORBA::BAD_CONTEXT *> (&exc); - if (bad_context_exception != 0 + if (bad_context_exception != nullptr && minor_code < sizeof BAD_CONTEXT_TABLE / sizeof (char *)) return BAD_CONTEXT_TABLE[minor_code]; CORBA::CODESET_INCOMPATIBLE const * codeset_incompatible_exception = dynamic_cast <const CORBA::CODESET_INCOMPATIBLE *> (&exc); - if (codeset_incompatible_exception != 0 + if (codeset_incompatible_exception != nullptr && minor_code < sizeof CODESET_INCOMPATIBLE_TABLE / sizeof (char *)) return CODESET_INCOMPATIBLE_TABLE[minor_code]; CORBA::INTF_REPOS const * intf_repos_exception = dynamic_cast <const CORBA::INTF_REPOS *> (&exc); - if (intf_repos_exception != 0 + if (intf_repos_exception != nullptr && minor_code < sizeof INTF_REPOS_TABLE / sizeof (char *)) return INTF_REPOS_TABLE[minor_code]; CORBA::TIMEOUT const * timeout_exception = dynamic_cast <const CORBA::TIMEOUT *> (&exc); - if (timeout_exception != 0 + if (timeout_exception != nullptr && minor_code < sizeof TIMEOUT_TABLE / sizeof (char *)) return TIMEOUT_TABLE[minor_code]; @@ -893,7 +893,7 @@ static const char *repo_id_array[] = { (char *) "IDL:omg.org/CORBA/" #name ":1.0", STANDARD_EXCEPTION_LIST #undef TAO_SYSTEM_EXCEPTION - 0 + nullptr }; // Since we add an extra element subtract 1 @@ -907,7 +907,7 @@ TAO::excp_factory excp_array [] = { &CORBA::name::_tao_create, STANDARD_EXCEPTION_LIST #undef TAO_SYSTEM_EXCEPTION - 0 + nullptr }; // Concrete SystemException constructors @@ -963,7 +963,7 @@ TAO::create_system_exception (const char *id) return (*(excp_array[i])) (); } - return 0; + return nullptr; } #define TAO_SYSTEM_EXCEPTION(name) \ diff --git a/TAO/tao/System_Time_Policy_Strategy.cpp b/TAO/tao/System_Time_Policy_Strategy.cpp index 30255432059..7f72324b906 100644 --- a/TAO/tao/System_Time_Policy_Strategy.cpp +++ b/TAO/tao/System_Time_Policy_Strategy.cpp @@ -13,15 +13,15 @@ TAO_System_Time_Policy_Strategy::~TAO_System_Time_Policy_Strategy () { } -ACE_Timer_Queue * TAO_System_Time_Policy_Strategy::create_timer_queue (void) +ACE_Timer_Queue * TAO_System_Time_Policy_Strategy::create_timer_queue () { - ACE_Timer_Queue * tmq = 0; + ACE_Timer_Queue * tmq = nullptr; typedef ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall, ACE_SYNCH_RECURSIVE_MUTEX, ACE_System_Time_Policy> timer_queue_type; - ACE_NEW_RETURN (tmq, timer_queue_type (), 0); + ACE_NEW_RETURN (tmq, timer_queue_type (), nullptr); return tmq; } @@ -32,7 +32,7 @@ TAO_System_Time_Policy_Strategy::destroy_timer_queue (ACE_Timer_Queue *tmq) delete tmq; } -ACE_Dynamic_Time_Policy_Base * TAO_System_Time_Policy_Strategy::get_time_policy (void) +ACE_Dynamic_Time_Policy_Base * TAO_System_Time_Policy_Strategy::get_time_policy () { return &time_policy_; } diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp index 9e324aec423..2bdb10bdcbe 100644 --- a/TAO/tao/TAO_Internal.cpp +++ b/TAO/tao/TAO_Internal.cpp @@ -191,13 +191,13 @@ class TAO_Ubergestalt_Ready_Condition : public ACE_SYNCH_RECURSIVE_CONDITION { public: - static TAO_Ubergestalt_Ready_Condition* instance (void) + static TAO_Ubergestalt_Ready_Condition* instance () { return TAO_Singleton <TAO_Ubergestalt_Ready_Condition, TAO_SYNCH_RECURSIVE_MUTEX>::instance (); } - TAO_Ubergestalt_Ready_Condition (void) + TAO_Ubergestalt_Ready_Condition () : ACE_SYNCH_RECURSIVE_CONDITION (mutex_) { } @@ -260,7 +260,7 @@ TAO::ORB::open_global_services (int argc, ACE_TCHAR **argv) // has something to skip! ACE_ARGV global_svc_config_argv (true); // only this ctor allows // subsequent use of add()! - global_svc_config_argv.add ((argc <= 0 || argv == 0) ? + global_svc_config_argv.add ((argc <= 0 || argv == nullptr) ? ACE_TEXT ("") : argv[0], true); // Will expand the environment variables, if any were used. @@ -428,7 +428,7 @@ TAO::ORB::open_services (ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> pcfg, // has something to skip! ACE_ARGV svc_config_argv (true); // only this ctor allows subsequent // use of add()! - svc_config_argv.add ((argc <= 0 || argv == 0) ? ACE_TEXT ("") : argv[0], + svc_config_argv.add ((argc <= 0 || argv == nullptr) ? ACE_TEXT ("") : argv[0], true); // Should we skip the ACE_Service_Config::open() method?, @@ -587,7 +587,7 @@ namespace return pcfg->open (command_line.get_argc (), command_line.get_TCHAR_argv (), - 0, + nullptr, false, // Don't ignore static services. ignore_default_svc_conf_file); } @@ -606,7 +606,7 @@ namespace ACE_Dynamic_Service<TAO_Codeset_Manager_Factory_Base>::instance ( "TAO_Codeset"); - if (factory == 0 || factory->is_default ()) + if (factory == nullptr || factory->is_default ()) { #if !defined (TAO_AS_STATIC_LIBS) && !(defined (ACE_VXWORKS) && !defined (__RTP__)) // only for dynamic libs, check to see if default factory @@ -629,7 +629,7 @@ namespace #endif /* !TAO_AS_STATIC_LIBS && !(ACE_VXWORKS && !__RTP__) */ } - if (factory == 0) + if (factory == nullptr) { if (TAO_debug_level > 0) { @@ -703,19 +703,19 @@ namespace // @@ They are needed for platforms that have no file system, // like VxWorks. - if (resource_factory_args != 0) + if (resource_factory_args != nullptr) { pcfg->process_directive( ACE_TEXT_CHAR_TO_TCHAR (resource_factory_args)); } - if (client_strategy_factory_args != 0) + if (client_strategy_factory_args != nullptr) { pcfg->process_directive (ACE_TEXT_CHAR_TO_TCHAR (client_strategy_factory_args)); } - if (server_strategy_factory_args != 0) + if (server_strategy_factory_args != nullptr) { pcfg->process_directive (ACE_TEXT_CHAR_TO_TCHAR (server_strategy_factory_args)); @@ -726,9 +726,9 @@ namespace pcfg, "PI_Server_Loader"); - if (pi_server_loader != 0) + if (pi_server_loader != nullptr) { - pi_server_loader->init (0, 0); + pi_server_loader->init (0, nullptr); } ACE_Service_Object * const bidir_loader = @@ -736,9 +736,9 @@ namespace pcfg, "BiDirGIOP_Loader"); - if (bidir_loader != 0) + if (bidir_loader != nullptr) { - bidir_loader->init (0, 0); + bidir_loader->init (0, nullptr); } #if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP == 1 @@ -747,9 +747,9 @@ namespace pcfg, "ZIOP_Loader"); - if (ziop_loader != 0) + if (ziop_loader != nullptr) { - ziop_loader->init (0, 0); + ziop_loader->init (0, nullptr); } #endif @@ -758,9 +758,9 @@ namespace pcfg, "Messaging_Loader"); - if (messaging_loader != 0) + if (messaging_loader != nullptr) { - messaging_loader->init (0, 0); + messaging_loader->init (0, nullptr); } // Handle RTCORBA library special case. Since RTCORBA needs @@ -771,9 +771,9 @@ namespace pcfg, "RT_ORB_Loader"); - if (rt_loader != 0) + if (rt_loader != nullptr) { - rt_loader->init (0, 0); + rt_loader->init (0, nullptr); } ACE_Service_Object * const rtscheduler_loader = @@ -781,9 +781,9 @@ namespace pcfg, "RTScheduler_Loader"); - if (rtscheduler_loader != 0) + if (rtscheduler_loader != nullptr) { - rtscheduler_loader->init (0, 0); + rtscheduler_loader->init (0, nullptr); } ACE_Service_Object * const csd_framework_loader = @@ -791,9 +791,9 @@ namespace pcfg, "CSD_Framework_Loader"); - if (csd_framework_loader != 0) + if (csd_framework_loader != nullptr) { - csd_framework_loader->init (0, 0); + csd_framework_loader->init (0, nullptr); } ACE_Service_Object * const endpoint_policy_loader = @@ -801,9 +801,9 @@ namespace pcfg, "EndpointPolicy_Initializer"); - if (endpoint_policy_loader != 0) + if (endpoint_policy_loader != nullptr) { - endpoint_policy_loader->init (0, 0); + endpoint_policy_loader->init (0, nullptr); } ACE_Service_Object * const diffserv_policy_loader = @@ -811,9 +811,9 @@ namespace pcfg, "DiffservPolicy_Initializer"); - if (diffserv_policy_loader != 0) + if (diffserv_policy_loader != nullptr) { - diffserv_policy_loader->init (0, 0); + diffserv_policy_loader->init (0, nullptr); } } /* register_additional_services_i */ @@ -838,7 +838,7 @@ namespace // Proceeds only if the configuration file exists. FILE * const conf_file = ACE_OS::fopen (current_arg, ACE_TEXT ("r")); - if (0 == conf_file) + if (nullptr == conf_file) { // Assigning EINVAL to errno to make an exception // thrown. calling code does not throw an exception if @@ -898,7 +898,7 @@ namespace while (arg_shifter.is_anything_left ()) { - const ACE_TCHAR *current_arg = 0; + const ACE_TCHAR *current_arg = nullptr; if (0 == arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBSkipServiceConfigOpen"))) { @@ -913,7 +913,7 @@ namespace arg_shifter.consume_arg (); } - else if (0 != (current_arg = arg_shifter.get_the_parameter + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBServiceConfigLoggerKey")))) { svc_config_argv.add (ACE_TEXT ("-k")); @@ -930,12 +930,12 @@ namespace // Don't consume, the ORB_Core::init will use it again. arg_shifter.ignore_arg(); - if (0 != (current_arg = arg_shifter.get_current())) + if (nullptr != (current_arg = arg_shifter.get_current())) negotiate_codesets = (ACE_OS::atoi (current_arg)); arg_shifter.ignore_arg(); } - else if (0 != (current_arg = + else if (nullptr != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBDebugLevel")))) { @@ -1044,7 +1044,7 @@ namespace // This should set current_arg to the value of ORBGestalt option. const ACE_TCHAR *current_arg = arg_shifter.get_current (); - if (0 != current_arg && + if (nullptr != current_arg && ACE_OS::strcasecmp (current_arg, ACE_TEXT("GLOBAL")) != 0) { with_global_gestalt = false; diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp index 81c8828191f..52578239720 100644 --- a/TAO/tao/TAO_Server_Request.cpp +++ b/TAO/tao/TAO_Server_Request.cpp @@ -49,7 +49,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, TAO_Transport *transport, TAO_ORB_Core *orb_core) : mesg_base_ (mesg_base), - operation_ (0), + operation_ (nullptr), operation_len_ (0), release_operation_ (false), is_forwarded_ (false), @@ -65,14 +65,14 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, orb_core_ (orb_core), request_id_ (0), profile_ (orb_core), - requesting_principal_ (0), + requesting_principal_ (nullptr), dsi_nvlist_align_ (0), - operation_details_ (0), + operation_details_ (nullptr), argument_flag_ (true) #if TAO_HAS_INTERCEPTORS == 1 , interceptor_count_ (0) - , rs_pi_current_ (0) - , caught_exception_ (0) + , rs_pi_current_ (nullptr) + , caught_exception_ (nullptr) , pi_reply_status_ (-1) #endif /* TAO_HAS_INTERCEPTORS == 1 */ , transport_(transport) //already duplicated in TAO_Transport::process_parsed_messages () @@ -94,10 +94,10 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, int &parse_error) : mesg_base_ (mesg_base), operation_ (CORBA::string_dup (operation)), - operation_len_ (operation == 0 ? 0 : ACE_OS::strlen (operation)), + operation_len_ (operation == nullptr ? 0 : ACE_OS::strlen (operation)), release_operation_ (true), is_forwarded_ (false), - incoming_ (0), + incoming_ (nullptr), outgoing_ (&output), response_expected_ (response_expected), deferred_reply_ (deferred_reply), @@ -108,14 +108,14 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, orb_core_ (orb_core), request_id_ (request_id), profile_ (orb_core), - requesting_principal_ (0), + requesting_principal_ (nullptr), dsi_nvlist_align_ (0), - operation_details_ (0), + operation_details_ (nullptr), argument_flag_ (true) #if TAO_HAS_INTERCEPTORS == 1 , interceptor_count_ (0) - , rs_pi_current_ (0) - , caught_exception_ (0) + , rs_pi_current_ (nullptr) + , caught_exception_ (nullptr) , pi_reply_status_ (-1) #endif /* TAO_HAS_INTERCEPTORS == 1 */ , transport_(transport) //already duplicated in TAO_Transport::process_parsed_messages () @@ -128,13 +128,13 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, TAO_ServerRequest::TAO_ServerRequest (TAO_ORB_Core * orb_core, TAO_Operation_Details const & details, CORBA::Object_ptr target) - : mesg_base_ (0), + : mesg_base_ (nullptr), operation_ (details.opname ()), operation_len_ (details.opname_len ()), release_operation_ (false), is_forwarded_ (false), - incoming_ (0), - outgoing_ (0), + incoming_ (nullptr), + outgoing_ (nullptr), response_expected_ (details.response_flags () == TAO_TWOWAY_RESPONSE_FLAG || details.response_flags () == static_cast<CORBA::Octet> (Messaging::SYNC_WITH_SERVER) || details.response_flags () == static_cast<CORBA::Octet> (Messaging::SYNC_WITH_TARGET)), @@ -146,17 +146,17 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_ORB_Core * orb_core, orb_core_ (orb_core), request_id_ (0), profile_ (orb_core), - requesting_principal_ (0), + requesting_principal_ (nullptr), dsi_nvlist_align_ (0), operation_details_ (&details), argument_flag_ (false) #if TAO_HAS_INTERCEPTORS == 1 , interceptor_count_ (0) - , rs_pi_current_ (0) - , caught_exception_ (0) + , rs_pi_current_ (nullptr) + , caught_exception_ (nullptr) , pi_reply_status_ (-1) #endif /* TAO_HAS_INTERCEPTORS == 1 */ - , transport_ (0) + , transport_ (nullptr) { // Have to use a const_cast<>. *sigh* this->profile_.object_key ( @@ -180,7 +180,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_ORB_Core * orb_core, // then the operation details don't get the reply service context } -TAO_ServerRequest::~TAO_ServerRequest (void) +TAO_ServerRequest::~TAO_ServerRequest () { #if TAO_HAS_INTERCEPTORS == 1 if (this->rs_pi_current_) @@ -200,13 +200,13 @@ TAO_ServerRequest::~TAO_ServerRequest (void) } CORBA::ORB_ptr -TAO_ServerRequest::orb (void) +TAO_ServerRequest::orb () { return this->orb_core_->orb (); } TAO_Service_Context & -TAO_ServerRequest::reply_service_context (void) +TAO_ServerRequest::reply_service_context () { if (!operation_details_) { @@ -221,7 +221,7 @@ TAO_ServerRequest::reply_service_context (void) void -TAO_ServerRequest::init_reply (void) +TAO_ServerRequest::init_reply () { if (!this->outgoing_) return; // Collocated @@ -266,9 +266,9 @@ TAO_ServerRequest::init_reply (void) } this->outgoing_->message_attributes (this->request_id_, - 0, + nullptr, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY), - 0); + nullptr); // Construct a REPLY header. this->mesg_base_->generate_reply_header (*this->outgoing_, reply_params); @@ -288,11 +288,11 @@ TAO_ServerRequest::init_reply (void) ACE_TEXT ("marshal encoding forwarded objref failed\n"))); } } - this->transport_->assign_translators (0, this->outgoing_); + this->transport_->assign_translators (nullptr, this->outgoing_); } void -TAO_ServerRequest::send_no_exception_reply (void) +TAO_ServerRequest::send_no_exception_reply () { // Construct our reply generator. TAO_Pluggable_Reply_Params_Base reply_params; @@ -313,9 +313,9 @@ TAO_ServerRequest::send_no_exception_reply (void) reply_params.argument_flag_ = false; this->outgoing_->message_attributes (this->request_id_, - 0, + nullptr, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY), - 0); + nullptr); // Construct a REPLY header. this->mesg_base_->generate_reply_header (*this->outgoing_, reply_params); @@ -324,7 +324,7 @@ TAO_ServerRequest::send_no_exception_reply (void) // Send the message. int const result = this->transport_->send_message (*this->outgoing_, - 0, + nullptr, this, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)); @@ -344,7 +344,7 @@ TAO_ServerRequest::send_no_exception_reply (void) } void -TAO_ServerRequest::tao_send_reply (void) +TAO_ServerRequest::tao_send_reply () { if (this->collocated ()) return; // No transport in the collocated case. @@ -352,7 +352,7 @@ TAO_ServerRequest::tao_send_reply (void) this->outgoing_->more_fragments (false); int const result = this->transport_->send_message (*this->outgoing_, - 0, + nullptr, this, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)); if (result == -1) @@ -388,7 +388,7 @@ TAO_ServerRequest::tao_send_reply_exception (const CORBA::Exception &ex) // Make a default reply status // Check whether we are able to downcast the exception - if (CORBA::SystemException::_downcast (&ex) != 0) + if (CORBA::SystemException::_downcast (&ex) != nullptr) { reply_params.reply_status (GIOP::SYSTEM_EXCEPTION); } @@ -422,7 +422,7 @@ TAO_ServerRequest::tao_send_reply_exception (const CORBA::Exception &ex) gv.major, gv.minor); - this->transport_->assign_translators (0, &output); + this->transport_->assign_translators (nullptr, &output); try { @@ -441,7 +441,7 @@ TAO_ServerRequest::tao_send_reply_exception (const CORBA::Exception &ex) // Send the message if (this->transport_->send_message (*this->outgoing_, - 0, + nullptr, this, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)) == -1) { @@ -503,7 +503,7 @@ TAO_ServerRequest::send_cached_reply (CORBA::OctetSeq &s) gv.major, gv.minor); - this->transport_->assign_translators (0, &output); + this->transport_->assign_translators (nullptr, &output); // A copy of the reply parameters TAO_Pluggable_Reply_Params_Base reply_params; @@ -522,9 +522,9 @@ TAO_ServerRequest::send_cached_reply (CORBA::OctetSeq &s) reply_params.reply_status (GIOP::NO_EXCEPTION); this->outgoing_->message_attributes (this->request_id_, - 0, + nullptr, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY), - 0); + nullptr); // Make the reply message if (this->mesg_base_->generate_reply_header (*this->outgoing_, @@ -552,7 +552,7 @@ TAO_ServerRequest::send_cached_reply (CORBA::OctetSeq &s) // Send the message if (this->transport_->send_message (*this->outgoing_, - 0, + nullptr, this, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)) == -1) { @@ -565,16 +565,16 @@ TAO_ServerRequest::send_cached_reply (CORBA::OctetSeq &s) void TAO_ServerRequest::caught_exception (CORBA::Exception *exception) { - if (CORBA::SystemException::_downcast (exception) != 0) + if (CORBA::SystemException::_downcast (exception) != nullptr) this->pi_reply_status_ = PortableInterceptor::SYSTEM_EXCEPTION; - else if (CORBA::UserException::_downcast (exception) != 0) + else if (CORBA::UserException::_downcast (exception) != nullptr) this->pi_reply_status_ = PortableInterceptor::USER_EXCEPTION; this->caught_exception_ = exception; } TAO::PICurrent_Impl * -TAO_ServerRequest::rs_pi_current (void) +TAO_ServerRequest::rs_pi_current () { if (!this->rs_pi_current_) { diff --git a/TAO/tao/TAO_Singleton_Manager.cpp b/TAO/tao/TAO_Singleton_Manager.cpp index c928a30d204..60ca39a7d95 100644 --- a/TAO/tao/TAO_Singleton_Manager.cpp +++ b/TAO/tao/TAO_Singleton_Manager.cpp @@ -13,7 +13,7 @@ namespace { // Singleton instance pointer. - TAO_Singleton_Manager * the_instance = 0; + TAO_Singleton_Manager * the_instance = nullptr; } #if (defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1) @@ -38,9 +38,9 @@ TAO_SINGLETON_MANAGER_CLEANUP_DESTROYER_NAME (void *, void *) } #if (ACE_HAS_GCC_DESTRUCTOR_ATTRIBUTE == 1) -static void TAO_SINGLETON_MANAGER_FINI_NAME (void) ACE_GCC_DESTRUCTOR_ATTRIBUTE; +static void TAO_SINGLETON_MANAGER_FINI_NAME () ACE_GCC_DESTRUCTOR_ATTRIBUTE; -void TAO_SINGLETON_MANAGER_FINI_NAME (void) +void TAO_SINGLETON_MANAGER_FINI_NAME () { #if defined (TAO_HAS_VERSIONED_NAMESPACE) \ && TAO_HAS_VERSIONED_NAMESPACE == 1 @@ -55,13 +55,13 @@ void TAO_SINGLETON_MANAGER_FINI_NAME (void) TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Singleton_Manager::TAO_Singleton_Manager (void) - : default_mask_ (0), - thread_hook_ (0), +TAO_Singleton_Manager::TAO_Singleton_Manager () + : default_mask_ (nullptr), + thread_hook_ (nullptr), exit_info_ (), registered_with_object_manager_ (-1) #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - , internal_lock_ (0) + , internal_lock_ (nullptr) # endif /* ACE_MT_SAFE */ { #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) @@ -69,7 +69,7 @@ TAO_Singleton_Manager::TAO_Singleton_Manager (void) TAO_SYNCH_RECURSIVE_MUTEX); # endif /* ACE_MT_SAFE */ // Be sure that no further instances are created via instance (). - if (the_instance == 0) + if (the_instance == nullptr) { the_instance = this; } @@ -82,25 +82,25 @@ TAO_Singleton_Manager::TAO_Singleton_Manager (void) (void) this->init (register_with_object_manager); } -TAO_Singleton_Manager::~TAO_Singleton_Manager (void) +TAO_Singleton_Manager::~TAO_Singleton_Manager () { this->dynamically_allocated_ = false; // Don't delete this again in fini() (void) this->fini (); #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) delete this->internal_lock_; - this->internal_lock_ = 0; + this->internal_lock_ = nullptr; #endif /* ACE_MT_SAFE */ } sigset_t * -TAO_Singleton_Manager::default_mask (void) +TAO_Singleton_Manager::default_mask () { return TAO_Singleton_Manager::instance ()->default_mask_; } ACE_Thread_Hook * -TAO_Singleton_Manager::thread_hook (void) +TAO_Singleton_Manager::thread_hook () { return TAO_Singleton_Manager::instance ()->thread_hook_; } @@ -115,18 +115,18 @@ TAO_Singleton_Manager::thread_hook (ACE_Thread_Hook *new_thread_hook) } TAO_Singleton_Manager * -TAO_Singleton_Manager::instance (void) +TAO_Singleton_Manager::instance () { // This function should be called during construction of static // instances, or before any other threads have been created in the // process. So, it's not thread safe. - if (the_instance == 0) + if (the_instance == nullptr) { - TAO_Singleton_Manager *instance_pointer = 0; + TAO_Singleton_Manager *instance_pointer = nullptr; ACE_NEW_RETURN (instance_pointer, TAO_Singleton_Manager, - 0); + nullptr); ACE_ASSERT (instance_pointer == the_instance); instance_pointer->dynamically_allocated_ = true; @@ -140,7 +140,7 @@ TAO_Singleton_Manager::instance (void) } int -TAO_Singleton_Manager::init (void) +TAO_Singleton_Manager::init () { if (this->registered_with_object_manager_ == -1) { @@ -203,7 +203,7 @@ TAO_Singleton_Manager::init (int register_with_object_manager) && ACE_Object_Manager::at_exit ( this, (ACE_CLEANUP_FUNC) TAO_SINGLETON_MANAGER_CLEANUP_DESTROYER_NAME, - 0, + nullptr, typeid (*this).name ()) != 0) return -1; @@ -219,9 +219,9 @@ TAO_Singleton_Manager::init (int register_with_object_manager) // reason. All objects clean up their per-object information and managed // objects, but only The Instance cleans up the static preallocated objects. int -TAO_Singleton_Manager::fini (void) +TAO_Singleton_Manager::fini () { - if (the_instance == 0 || this->shutting_down_i ()) + if (the_instance == nullptr || this->shutting_down_i ()) { // Too late. Or, maybe too early. Either fini () has already // been called, or init () was never called. @@ -240,7 +240,7 @@ TAO_Singleton_Manager::fini (void) if (this->next_) { this->next_->fini (); - this->next_ = 0; // Protect against recursive calls. + this->next_ = nullptr; // Protect against recursive calls. } // Call all registered cleanup hooks, in reverse order of @@ -254,13 +254,13 @@ TAO_Singleton_Manager::fini (void) } delete this->default_mask_; - this->default_mask_ = 0; + this->default_mask_ = nullptr; // Indicate that this TAO_Singleton_Manager instance has been shut down. this->object_manager_state_ = OBJ_MAN_SHUT_DOWN; if (this == the_instance) - the_instance = 0; + the_instance = nullptr; if (this->dynamically_allocated_) { @@ -271,7 +271,7 @@ TAO_Singleton_Manager::fini (void) } int -TAO_Singleton_Manager::starting_up (void) +TAO_Singleton_Manager::starting_up () { return the_instance @@ -280,7 +280,7 @@ TAO_Singleton_Manager::starting_up (void) } int -TAO_Singleton_Manager::shutting_down (void) +TAO_Singleton_Manager::shutting_down () { return the_instance diff --git a/TAO/tao/TSS_Resources.cpp b/TAO/tao/TSS_Resources.cpp index 9f1d44141a6..2e13d8d2271 100644 --- a/TAO/tao/TSS_Resources.cpp +++ b/TAO/tao/TSS_Resources.cpp @@ -4,10 +4,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_TSS_Resources::TAO_TSS_Resources (void) - : poa_current_impl_ (0) - , rtscheduler_current_impl_ (0) - , rtscheduler_previous_current_impl_ (0) +TAO_TSS_Resources::TAO_TSS_Resources () + : poa_current_impl_ (nullptr) + , rtscheduler_current_impl_ (nullptr) + , rtscheduler_previous_current_impl_ (nullptr) , rtcorba_current_priority_ (-1) // RTCORBA::minPriority - 1 , default_environment_ (&tss_environment_) @@ -16,20 +16,20 @@ TAO_TSS_Resources::TAO_TSS_Resources (void) , policy_current_ (&initial_policy_current_) #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ - , gui_resource_factory_ (0) + , gui_resource_factory_ (nullptr) #if (TAO_HAS_TRANSPORT_CURRENT == 1) - , tsg_ (0) + , tsg_ (nullptr) #endif /* TAO_HAS_TRANSPORT_CURRENT */ { } -TAO_TSS_Resources::~TAO_TSS_Resources (void) +TAO_TSS_Resources::~TAO_TSS_Resources () { delete this->gui_resource_factory_; } TAO_TSS_Resources * -TAO_TSS_Resources::instance (void) +TAO_TSS_Resources::instance () { // Hide the template instantiation to prevent multiple instances // from being created. diff --git a/TAO/tao/Tagged_Components.cpp b/TAO/tao/Tagged_Components.cpp index b95b4a0cae9..a93161ce9fe 100644 --- a/TAO/tao/Tagged_Components.cpp +++ b/TAO/tao/Tagged_Components.cpp @@ -77,7 +77,7 @@ TAO_Tagged_Components::set_component_i (IOP::ComponentId tag, CORBA::Octet *buf = component.component_data.get_buffer (); for (const ACE_Message_Block *i = cdr.begin (); - i != 0; + i != nullptr; i = i->cont ()) { ACE_OS::memcpy (buf, i->rd_ptr (), i->length ()); diff --git a/TAO/tao/Thread_Lane_Resources.cpp b/TAO/tao/Thread_Lane_Resources.cpp index edd83b85c5f..32bc8c072df 100644 --- a/TAO/tao/Thread_Lane_Resources.cpp +++ b/TAO/tao/Thread_Lane_Resources.cpp @@ -18,20 +18,20 @@ TAO_Thread_Lane_Resources::TAO_Thread_Lane_Resources ( TAO_ORB_Core &orb_core, TAO_New_Leader_Generator *new_leader_generator) : orb_core_ (orb_core), - acceptor_registry_ (0), - connector_registry_ (0), - transport_cache_ (0), - leader_follower_ (0), + acceptor_registry_ (nullptr), + connector_registry_ (nullptr), + transport_cache_ (nullptr), + leader_follower_ (nullptr), new_leader_generator_ (new_leader_generator), - input_cdr_dblock_allocator_ (0), - input_cdr_buffer_allocator_ (0), - input_cdr_msgblock_allocator_ (0), - transport_message_buffer_allocator_ (0), - output_cdr_dblock_allocator_ (0), - output_cdr_buffer_allocator_ (0), - output_cdr_msgblock_allocator_ (0), - amh_response_handler_allocator_ (0), - ami_response_handler_allocator_ (0) + input_cdr_dblock_allocator_ (nullptr), + input_cdr_buffer_allocator_ (nullptr), + input_cdr_msgblock_allocator_ (nullptr), + transport_message_buffer_allocator_ (nullptr), + output_cdr_dblock_allocator_ (nullptr), + output_cdr_buffer_allocator_ (nullptr), + output_cdr_msgblock_allocator_ (nullptr), + amh_response_handler_allocator_ (nullptr), + ami_response_handler_allocator_ (nullptr) { // Create the transport cache. ACE_NEW (this->transport_cache_, @@ -43,20 +43,20 @@ TAO_Thread_Lane_Resources::TAO_Thread_Lane_Resources ( orb_core.orbid ())); } -TAO_Thread_Lane_Resources::~TAO_Thread_Lane_Resources (void) +TAO_Thread_Lane_Resources::~TAO_Thread_Lane_Resources () { } TAO::Transport_Cache_Manager & -TAO_Thread_Lane_Resources::transport_cache (void) +TAO_Thread_Lane_Resources::transport_cache () { return *this->transport_cache_; } int -TAO_Thread_Lane_Resources::has_acceptor_registry_been_created (void) const +TAO_Thread_Lane_Resources::has_acceptor_registry_been_created () const { - return this->acceptor_registry_ != 0; + return this->acceptor_registry_ != nullptr; } int @@ -71,10 +71,10 @@ TAO_Thread_Lane_Resources::is_collocated (const TAO_MProfile& mprofile) } TAO_Acceptor_Registry & -TAO_Thread_Lane_Resources::acceptor_registry (void) +TAO_Thread_Lane_Resources::acceptor_registry () { // Double check. - if (this->acceptor_registry_ == 0) + if (this->acceptor_registry_ == nullptr) { // @todo: Wouldnt this crash big time if you happen to // dereference a null-pointer? Needs fixing. @@ -83,7 +83,7 @@ TAO_Thread_Lane_Resources::acceptor_registry (void) this->lock_, *this->acceptor_registry_); - if (this->acceptor_registry_ == 0) + if (this->acceptor_registry_ == nullptr) { // @@ Not exception safe code // Get the resource factory. @@ -100,23 +100,23 @@ TAO_Thread_Lane_Resources::acceptor_registry (void) } TAO_Connector_Registry * -TAO_Thread_Lane_Resources::connector_registry (void) +TAO_Thread_Lane_Resources::connector_registry () { // Double check. - if (this->connector_registry_ == 0) + if (this->connector_registry_ == nullptr) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, - 0); + nullptr); - if (this->connector_registry_ == 0) + if (this->connector_registry_ == nullptr) { // Ask it to create a new acceptor registry. TAO_Connector_Registry *connector_registry = this->orb_core_.resource_factory ()->get_connector_registry (); - if (connector_registry == 0) + if (connector_registry == nullptr) { throw ::CORBA::INITIALIZE ( CORBA::SystemException::_tao_minor_code ( @@ -146,17 +146,17 @@ TAO_Thread_Lane_Resources::connector_registry (void) TAO_Leader_Follower & -TAO_Thread_Lane_Resources::leader_follower (void) +TAO_Thread_Lane_Resources::leader_follower () { // Double check. - if (this->leader_follower_ == 0) + if (this->leader_follower_ == nullptr) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, *this->leader_follower_); - if (this->leader_follower_ == 0) + if (this->leader_follower_ == nullptr) { // Create a new Leader Follower object. ACE_NEW_RETURN (this->leader_follower_, @@ -171,14 +171,14 @@ TAO_Thread_Lane_Resources::leader_follower (void) ACE_Allocator* -TAO_Thread_Lane_Resources::input_cdr_dblock_allocator (void) +TAO_Thread_Lane_Resources::input_cdr_dblock_allocator () { - if (this->input_cdr_dblock_allocator_ == 0) + if (this->input_cdr_dblock_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->input_cdr_dblock_allocator_ == 0) + if (this->input_cdr_dblock_allocator_ == nullptr) { this->input_cdr_dblock_allocator_ = this->resource_factory ()->input_cdr_dblock_allocator (); @@ -190,14 +190,14 @@ TAO_Thread_Lane_Resources::input_cdr_dblock_allocator (void) ACE_Allocator* -TAO_Thread_Lane_Resources::input_cdr_buffer_allocator (void) +TAO_Thread_Lane_Resources::input_cdr_buffer_allocator () { - if (this->input_cdr_buffer_allocator_ == 0) + if (this->input_cdr_buffer_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->input_cdr_buffer_allocator_ == 0) + if (this->input_cdr_buffer_allocator_ == nullptr) { this->input_cdr_buffer_allocator_ = this->resource_factory ()->input_cdr_buffer_allocator (); @@ -209,14 +209,14 @@ TAO_Thread_Lane_Resources::input_cdr_buffer_allocator (void) ACE_Allocator* -TAO_Thread_Lane_Resources::input_cdr_msgblock_allocator (void) +TAO_Thread_Lane_Resources::input_cdr_msgblock_allocator () { - if (this->input_cdr_msgblock_allocator_ == 0) + if (this->input_cdr_msgblock_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->input_cdr_msgblock_allocator_ == 0) + if (this->input_cdr_msgblock_allocator_ == nullptr) { this->input_cdr_msgblock_allocator_ = this->resource_factory ()->input_cdr_msgblock_allocator (); @@ -227,14 +227,14 @@ TAO_Thread_Lane_Resources::input_cdr_msgblock_allocator (void) } ACE_Allocator* -TAO_Thread_Lane_Resources::transport_message_buffer_allocator (void) +TAO_Thread_Lane_Resources::transport_message_buffer_allocator () { - if (this->transport_message_buffer_allocator_ == 0) + if (this->transport_message_buffer_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->transport_message_buffer_allocator_ == 0) + if (this->transport_message_buffer_allocator_ == nullptr) { this->transport_message_buffer_allocator_ = this->resource_factory ()->input_cdr_dblock_allocator (); @@ -246,14 +246,14 @@ TAO_Thread_Lane_Resources::transport_message_buffer_allocator (void) ACE_Allocator* -TAO_Thread_Lane_Resources::output_cdr_dblock_allocator (void) +TAO_Thread_Lane_Resources::output_cdr_dblock_allocator () { - if (this->output_cdr_dblock_allocator_ == 0) + if (this->output_cdr_dblock_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->output_cdr_dblock_allocator_ == 0) + if (this->output_cdr_dblock_allocator_ == nullptr) { this->output_cdr_dblock_allocator_ = this->resource_factory ()->output_cdr_dblock_allocator (); @@ -265,14 +265,14 @@ TAO_Thread_Lane_Resources::output_cdr_dblock_allocator (void) ACE_Allocator* -TAO_Thread_Lane_Resources::output_cdr_buffer_allocator (void) +TAO_Thread_Lane_Resources::output_cdr_buffer_allocator () { - if (this->output_cdr_buffer_allocator_ == 0) + if (this->output_cdr_buffer_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->output_cdr_buffer_allocator_ == 0) + if (this->output_cdr_buffer_allocator_ == nullptr) { this->output_cdr_buffer_allocator_ = this->resource_factory ()->output_cdr_buffer_allocator (); @@ -284,14 +284,14 @@ TAO_Thread_Lane_Resources::output_cdr_buffer_allocator (void) ACE_Allocator* -TAO_Thread_Lane_Resources::output_cdr_msgblock_allocator (void) +TAO_Thread_Lane_Resources::output_cdr_msgblock_allocator () { - if (this->output_cdr_msgblock_allocator_ == 0) + if (this->output_cdr_msgblock_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->output_cdr_msgblock_allocator_ == 0) + if (this->output_cdr_msgblock_allocator_ == nullptr) { this->output_cdr_msgblock_allocator_ = this->resource_factory ()->output_cdr_msgblock_allocator (); @@ -302,14 +302,14 @@ TAO_Thread_Lane_Resources::output_cdr_msgblock_allocator (void) } ACE_Allocator* -TAO_Thread_Lane_Resources::amh_response_handler_allocator (void) +TAO_Thread_Lane_Resources::amh_response_handler_allocator () { - if (this->amh_response_handler_allocator_ == 0) + if (this->amh_response_handler_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->amh_response_handler_allocator_ == 0) + if (this->amh_response_handler_allocator_ == nullptr) { this->amh_response_handler_allocator_ = this->resource_factory ()->amh_response_handler_allocator (); @@ -320,14 +320,14 @@ TAO_Thread_Lane_Resources::amh_response_handler_allocator (void) } ACE_Allocator* -TAO_Thread_Lane_Resources::ami_response_handler_allocator (void) +TAO_Thread_Lane_Resources::ami_response_handler_allocator () { - if (this->ami_response_handler_allocator_ == 0) + if (this->ami_response_handler_allocator_ == nullptr) { // Double checked locking - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, nullptr); - if (this->ami_response_handler_allocator_ == 0) + if (this->ami_response_handler_allocator_ == nullptr) { this->ami_response_handler_allocator_ = this->resource_factory ()->ami_response_handler_allocator (); @@ -352,29 +352,29 @@ TAO_Thread_Lane_Resources::open_acceptor_registry (const TAO_EndpointSet &endpoi } TAO_Resource_Factory * -TAO_Thread_Lane_Resources::resource_factory (void) +TAO_Thread_Lane_Resources::resource_factory () { return this->orb_core_.resource_factory (); } void -TAO_Thread_Lane_Resources::finalize (void) +TAO_Thread_Lane_Resources::finalize () { // Close connectors before acceptors! // Ask the registry to close all registered connectors. - if (this->connector_registry_ != 0) + if (this->connector_registry_ != nullptr) { this->connector_registry_->close_all (); delete this->connector_registry_; - this->connector_registry_ = 0; + this->connector_registry_ = nullptr; } // Ask the registry to close all registered acceptors. - if (this->acceptor_registry_ != 0) + if (this->acceptor_registry_ != nullptr) { this->acceptor_registry_->close_all (); delete this->acceptor_registry_; - this->acceptor_registry_ = 0; + this->acceptor_registry_ = nullptr; } // Set of handlers still in the connection cache. @@ -389,7 +389,7 @@ TAO_Thread_Lane_Resources::finalize (void) // Go through the handler set, closing the connections and removing // the references. - TAO_Connection_Handler **handler = 0; + TAO_Connection_Handler **handler = nullptr; for (TAO::Connection_Handler_Set::iterator iter (handlers); iter.next (handler); @@ -403,80 +403,80 @@ TAO_Thread_Lane_Resources::finalize (void) } delete this->transport_cache_; - this->transport_cache_ = 0; + this->transport_cache_ = nullptr; delete this->leader_follower_; - this->leader_follower_ = 0; + this->leader_follower_ = nullptr; // Delete all the allocators here.. They shouldnt be done earlier, // lest some of the contents in the above, say reactor or acceptor // may use memory from the pool.. - if (this->input_cdr_dblock_allocator_ != 0) + if (this->input_cdr_dblock_allocator_ != nullptr) { this->input_cdr_dblock_allocator_->remove (); delete this->input_cdr_dblock_allocator_; - this->input_cdr_dblock_allocator_ = 0; + this->input_cdr_dblock_allocator_ = nullptr; } - if (this->input_cdr_buffer_allocator_ != 0) + if (this->input_cdr_buffer_allocator_ != nullptr) { this->input_cdr_buffer_allocator_->remove (); delete this->input_cdr_buffer_allocator_; - this->input_cdr_buffer_allocator_ = 0; + this->input_cdr_buffer_allocator_ = nullptr; } - if (this->input_cdr_msgblock_allocator_ != 0) + if (this->input_cdr_msgblock_allocator_ != nullptr) { this->input_cdr_msgblock_allocator_->remove (); delete this->input_cdr_msgblock_allocator_; - this->input_cdr_msgblock_allocator_ = 0; + this->input_cdr_msgblock_allocator_ = nullptr; } - if (this->transport_message_buffer_allocator_ != 0) + if (this->transport_message_buffer_allocator_ != nullptr) { this->transport_message_buffer_allocator_->remove (); delete this->transport_message_buffer_allocator_; - this->transport_message_buffer_allocator_ = 0; + this->transport_message_buffer_allocator_ = nullptr; } - if (this->output_cdr_dblock_allocator_ != 0) + if (this->output_cdr_dblock_allocator_ != nullptr) { this->output_cdr_dblock_allocator_->remove (); delete this->output_cdr_dblock_allocator_; - this->output_cdr_dblock_allocator_ = 0; + this->output_cdr_dblock_allocator_ = nullptr; } - if (this->output_cdr_buffer_allocator_ != 0) + if (this->output_cdr_buffer_allocator_ != nullptr) { this->output_cdr_buffer_allocator_->remove (); delete this->output_cdr_buffer_allocator_; - this->output_cdr_buffer_allocator_ = 0; + this->output_cdr_buffer_allocator_ = nullptr; } - if (this->output_cdr_msgblock_allocator_ != 0) + if (this->output_cdr_msgblock_allocator_ != nullptr) { this->output_cdr_msgblock_allocator_->remove (); delete this->output_cdr_msgblock_allocator_; - this->output_cdr_msgblock_allocator_ = 0; + this->output_cdr_msgblock_allocator_ = nullptr; } - if (this->amh_response_handler_allocator_ != 0) + if (this->amh_response_handler_allocator_ != nullptr) { this->amh_response_handler_allocator_->remove (); delete this->amh_response_handler_allocator_; - this->amh_response_handler_allocator_ = 0; + this->amh_response_handler_allocator_ = nullptr; } - if (this->ami_response_handler_allocator_ != 0) + if (this->ami_response_handler_allocator_ != nullptr) { this->ami_response_handler_allocator_->remove (); delete this->ami_response_handler_allocator_; - this->ami_response_handler_allocator_ = 0; + this->ami_response_handler_allocator_ = nullptr; } } void -TAO_Thread_Lane_Resources::shutdown_reactor (void) +TAO_Thread_Lane_Resources::shutdown_reactor () { TAO_Leader_Follower &leader_follower = this->leader_follower (); @@ -508,11 +508,11 @@ TAO_Thread_Lane_Resources::shutdown_reactor (void) } void -TAO_Thread_Lane_Resources::close_all_transports (void) +TAO_Thread_Lane_Resources::close_all_transports () { // If we have no-drop-reply strategy or already fininalized simply return. if (!this->orb_core_.resource_factory ()->drop_replies_during_shutdown () || - this->transport_cache_ == 0) + this->transport_cache_ == nullptr) return; // Set of handlers still in the connection cache. @@ -527,7 +527,7 @@ TAO_Thread_Lane_Resources::close_all_transports (void) // Go through the handler set, closing the connections and removing // the references. - TAO_Connection_Handler **handler = 0; + TAO_Connection_Handler **handler = nullptr; for (TAO::Connection_Handler_Set::iterator iter (handlers); iter.next (handler); diff --git a/TAO/tao/Thread_Lane_Resources_Manager.cpp b/TAO/tao/Thread_Lane_Resources_Manager.cpp index feac67c8c5f..9a8cc6b6f19 100644 --- a/TAO/tao/Thread_Lane_Resources_Manager.cpp +++ b/TAO/tao/Thread_Lane_Resources_Manager.cpp @@ -9,24 +9,24 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Thread_Lane_Resources_Manager::TAO_Thread_Lane_Resources_Manager (TAO_ORB_Core &orb_core) : orb_core_ (&orb_core), - lf_strategy_ (0) + lf_strategy_ (nullptr) { this->lf_strategy_ = this->orb_core_->resource_factory ()->create_lf_strategy (); } -TAO_Thread_Lane_Resources_Manager::~TAO_Thread_Lane_Resources_Manager (void) +TAO_Thread_Lane_Resources_Manager::~TAO_Thread_Lane_Resources_Manager () { delete this->lf_strategy_; } TAO_LF_Strategy & -TAO_Thread_Lane_Resources_Manager::lf_strategy (void) +TAO_Thread_Lane_Resources_Manager::lf_strategy () { return *this->lf_strategy_; } -TAO_Thread_Lane_Resources_Manager_Factory::~TAO_Thread_Lane_Resources_Manager_Factory (void) +TAO_Thread_Lane_Resources_Manager_Factory::~TAO_Thread_Lane_Resources_Manager_Factory () { } diff --git a/TAO/tao/Thread_Per_Connection_Handler.cpp b/TAO/tao/Thread_Per_Connection_Handler.cpp index c665403fc14..0b81e5e3a52 100644 --- a/TAO/tao/Thread_Per_Connection_Handler.cpp +++ b/TAO/tao/Thread_Per_Connection_Handler.cpp @@ -16,14 +16,14 @@ TAO_Thread_Per_Connection_Handler::TAO_Thread_Per_Connection_Handler ( this->ch_->transport ()->add_reference (); } -TAO_Thread_Per_Connection_Handler::~TAO_Thread_Per_Connection_Handler (void) +TAO_Thread_Per_Connection_Handler::~TAO_Thread_Per_Connection_Handler () { this->ch_->close_connection (); this->ch_->transport ()->remove_reference (); } int -TAO_Thread_Per_Connection_Handler::svc (void) +TAO_Thread_Per_Connection_Handler::svc () { ACE::clr_flags (this->ch_->transport ()->event_handler_i ()->get_handle (), ACE_NONBLOCK); diff --git a/TAO/tao/Time_Policy_Manager.cpp b/TAO/tao/Time_Policy_Manager.cpp index 8d03150147d..2a4e674dfdb 100644 --- a/TAO/tao/Time_Policy_Manager.cpp +++ b/TAO/tao/Time_Policy_Manager.cpp @@ -11,7 +11,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Time_Policy_Manager::TAO_Time_Policy_Manager () - : time_policy_strategy_ (0) + : time_policy_strategy_ (nullptr) #if defined(TAO_USE_HR_TIME_POLICY_STRATEGY) , time_policy_setting_ (TAO_HR_TIME_POLICY) #else @@ -68,17 +68,17 @@ TAO_Time_Policy_Manager::parse_args (int argc, ACE_TCHAR* argv[]) return 0; } -ACE_Timer_Queue * TAO_Time_Policy_Manager::create_timer_queue (void) +ACE_Timer_Queue * TAO_Time_Policy_Manager::create_timer_queue () { // locking scope { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, monitor, this->lock_, - 0); + nullptr); // check if time policy strategy has already been initialized - if (this->time_policy_strategy_ == 0) + if (this->time_policy_strategy_ == nullptr) { // load strategy if (this->time_policy_setting_ == TAO_OS_TIME_POLICY) @@ -92,13 +92,13 @@ ACE_Timer_Queue * TAO_Time_Policy_Manager::create_timer_queue (void) this->time_policy_strategy_ = ACE_Dynamic_Service<TAO_Time_Policy_Strategy>::instance ( this->time_policy_name_.c_str ()); - if (this->time_policy_strategy_ == 0) + if (this->time_policy_strategy_ == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - TAO_Time_Policy_Manager: ") ACE_TEXT ("FAILED to load time policy strategy '%C'\n"), this->time_policy_name_.c_str ())); - return 0; + return nullptr; } if (TAO_debug_level > 1) @@ -128,7 +128,7 @@ TAO_Time_Policy_Manager::destroy_timer_queue (ACE_Timer_Queue *tmq) this->lock_); // check if time policy strategy has been initialized - if (this->time_policy_strategy_ == 0) + if (this->time_policy_strategy_ == nullptr) { return; } diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 6978e847a7b..13bfa7174f7 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -118,13 +118,13 @@ TAO_Transport::TAO_Transport (CORBA::ULong tag, size_t input_cdr_size) : tag_ (tag) , orb_core_ (orb_core) - , cache_map_entry_ (0) - , tms_ (0) - , ws_ (0) + , cache_map_entry_ (nullptr) + , tms_ (nullptr) + , ws_ (nullptr) , bidirectional_flag_ (-1) , opening_connection_role_ (TAO::TAO_UNSPECIFIED_ROLE) - , head_ (0) - , tail_ (0) + , head_ (nullptr) + , tail_ (nullptr) , incoming_message_queue_ (orb_core) , current_deadline_ (ACE_Time_Value::zero) , flush_timer_id_ (-1) @@ -136,12 +136,12 @@ TAO_Transport::TAO_Transport (CORBA::ULong tag, , sent_byte_count_ (0) , is_connected_ (false) , connection_closed_on_read_ (false) - , messaging_object_ (0) - , char_translator_ (0) - , wchar_translator_ (0) + , messaging_object_ (nullptr) + , char_translator_ (nullptr) + , wchar_translator_ (nullptr) , tcs_set_ (0) , first_request_ (true) - , partial_message_ (0) + , partial_message_ (nullptr) #if TAO_HAS_SENDFILE == 1 // The ORB has been configured to use the MMAP allocator, meaning // we could/should use sendfile() to send data. Cast once rather @@ -153,7 +153,7 @@ TAO_Transport::TAO_Transport (CORBA::ULong tag, orb_core->output_cdr_buffer_allocator ())) #endif /* TAO_HAS_SENDFILE==1 */ #if TAO_HAS_TRANSPORT_CURRENT == 1 - , stats_ (0) + , stats_ (nullptr) #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */ , flush_in_post_open_ (false) { @@ -179,7 +179,7 @@ TAO_Transport::TAO_Transport (CORBA::ULong tag, #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */ } -TAO_Transport::~TAO_Transport (void) +TAO_Transport::~TAO_Transport () { if (TAO_debug_level > 9) { @@ -213,7 +213,7 @@ TAO_Transport::~TAO_Transport (void) // The following assert is needed for the test "Bug_2494_Regression". // See the bugzilla bug #2494 for details. ACE_ASSERT (this->queue_is_empty_i ()); - ACE_ASSERT (this->cache_map_entry_ == 0); + ACE_ASSERT (this->cache_map_entry_ == nullptr); #if TAO_HAS_TRANSPORT_CURRENT == 1 delete this->stats_; @@ -243,13 +243,13 @@ TAO_Transport::provide_blockable_handler (TAO::Connection_Handler_Set &h) } bool -TAO_Transport::idle_after_send (void) +TAO_Transport::idle_after_send () { return this->tms ()->idle_after_send (); } bool -TAO_Transport::idle_after_reply (void) +TAO_Transport::idle_after_reply () { return this->tms ()->idle_after_reply (); } @@ -289,13 +289,13 @@ TAO_Transport::send_message_shared (TAO_Stub *stub, } bool -TAO_Transport::post_connect_hook (void) +TAO_Transport::post_connect_hook () { return true; } bool -TAO_Transport::register_if_necessary (void) +TAO_Transport::register_if_necessary () { if (this->is_connected_ && this->wait_strategy ()->register_handler () == -1) @@ -323,13 +323,13 @@ TAO_Transport::register_if_necessary (void) } void -TAO_Transport::close_connection (void) +TAO_Transport::close_connection () { this->connection_handler_i ()->close_connection (); } int -TAO_Transport::register_handler (void) +TAO_Transport::register_handler () { if (TAO_debug_level > 4) { @@ -381,7 +381,7 @@ TAO_Transport::register_handler (void) } int -TAO_Transport::remove_handler (void) +TAO_Transport::remove_handler () { if (TAO_debug_level > 4) { @@ -400,7 +400,7 @@ TAO_Transport::remove_handler (void) false); - if (this->event_handler_i ()->reactor () == 0) + if (this->event_handler_i ()->reactor () == nullptr) { return 0; } @@ -433,7 +433,7 @@ TAO_Transport::remove_handler (void) // reset the reactor property of the event handler or // Transport::register_handler() will not re-register // when called after us again. - this->event_handler_i ()->reactor (0); + this->event_handler_i ()->reactor (nullptr); return 0; } } @@ -519,7 +519,7 @@ TAO_Transport::recache_transport (TAO_Transport_Descriptor_Interface *desc) } int -TAO_Transport::purge_entry (void) +TAO_Transport::purge_entry () { if (TAO_debug_level > 3) { @@ -533,13 +533,13 @@ TAO_Transport::purge_entry (void) } bool -TAO_Transport::can_be_purged (void) +TAO_Transport::can_be_purged () { return !this->tms_->has_request (); } int -TAO_Transport::make_idle (void) +TAO_Transport::make_idle () { if (TAO_debug_level > 3) { @@ -552,7 +552,7 @@ TAO_Transport::make_idle (void) } int -TAO_Transport::update_transport (void) +TAO_Transport::update_transport () { return this->transport_cache_manager ().update_entry (this->cache_map_entry_); } @@ -597,7 +597,7 @@ TAO_Transport::format_queue_message (TAO_OutputCDR &stream, ACE_Time_Value *max_wait_time, TAO_Stub* stub) { - if (this->messaging_object ()->format_message (stream, stub, 0) != 0) + if (this->messaging_object ()->format_message (stream, stub, nullptr) != 0) return -1; if (this->queue_message_i (stream.begin (), max_wait_time) != 0) @@ -814,7 +814,7 @@ TAO_Transport::send_reply_message_i (const ACE_Message_Block *mb, typedef ACE_Reverse_Lock<ACE_Lock> TAO_REVERSE_LOCK; TAO_REVERSE_LOCK reverse (*this->handler_lock_); ACE_GUARD_RETURN (TAO_REVERSE_LOCK, ace_mon, reverse, -1); - (void) flushing_strategy->flush_transport (this, 0); + (void) flushing_strategy->flush_transport (this, nullptr); } return 1; @@ -848,12 +848,12 @@ TAO_Transport::send_synch_message_helper_i (TAO_Synch_Queued_Message &synch_mess } int -TAO_Transport::schedule_output_i (void) +TAO_Transport::schedule_output_i () { ACE_Event_Handler * const eh = this->event_handler_i (); ACE_Reactor * const reactor = eh->reactor (); - if (reactor == 0) + if (reactor == nullptr) { if (TAO_debug_level > 1) { @@ -902,7 +902,7 @@ TAO_Transport::schedule_output_i (void) } int -TAO_Transport::cancel_output_i (void) +TAO_Transport::cancel_output_i () { ACE_Event_Handler * const eh = this->event_handler_i (); ACE_Reactor *const reactor = eh->reactor (); @@ -949,7 +949,7 @@ TAO_Transport::handle_timeout (const ACE_Time_Value & /* current_time */, typedef ACE_Reverse_Lock<ACE_Lock> TAO_REVERSE_LOCK; TAO_REVERSE_LOCK reverse (*this->handler_lock_); ACE_GUARD_RETURN (TAO_REVERSE_LOCK, ace_mon, reverse, -1); - if (flushing_strategy->flush_transport (this, 0) == -1) { + if (flushing_strategy->flush_transport (this, nullptr) == -1) { return -1; } } @@ -1072,7 +1072,7 @@ TAO_Transport::drain_queue_i (TAO::Transport::Drain_Constraints const & dc) // sent int iovcnt = 0; #if defined (ACE_INITIALIZE_MEMORY_BEFORE_USE) - iovec iov[ACE_IOV_MAX] = { { 0 , 0 } }; + iovec iov[ACE_IOV_MAX] = { { nullptr , 0 } }; #else iovec iov[ACE_IOV_MAX]; #endif /* ACE_INITIALIZE_MEMORY_BEFORE_USE */ @@ -1089,7 +1089,7 @@ TAO_Transport::drain_queue_i (TAO::Transport::Drain_Constraints const & dc) // If we are forced to send in the loop then we'll recompute the time. ACE_Time_Value now = ACE_High_Res_Timer::gettimeofday_hr (); - while (i != 0) + while (i != nullptr) { if (i->is_expired (now)) { @@ -1273,7 +1273,7 @@ TAO_Transport::check_buffering_constraints_i (TAO_Stub *stub, bool &must_flush) size_t msg_count = 0; size_t total_bytes = 0; - for (TAO_Queued_Message *i = this->head_; i != 0; i = i->next ()) + for (TAO_Queued_Message *i = this->head_; i != nullptr; i = i->next ()) { ++msg_count; total_bytes += i->message_length (); @@ -1341,7 +1341,7 @@ TAO_Transport::report_invalid_event_handler (const char *caller) } void -TAO_Transport::send_connection_closed_notifications (void) +TAO_Transport::send_connection_closed_notifications () { { ACE_MT (ACE_GUARD (ACE_Lock, guard, *this->handler_lock_)); @@ -1353,7 +1353,7 @@ TAO_Transport::send_connection_closed_notifications (void) } void -TAO_Transport::send_connection_closed_notifications_i (void) +TAO_Transport::send_connection_closed_notifications_i () { this->cleanup_queue_i (); } @@ -1389,7 +1389,7 @@ TAO_Transport::send_message_shared_i (TAO_Stub *stub, #if TAO_HAS_TRANSPORT_CURRENT == 1 // "Count" the message, only if no error was encountered. - if (ret != -1 && this->stats_ != 0) + if (ret != -1 && this->stats_ != nullptr) this->stats_->messages_sent (message_length); #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */ @@ -1523,7 +1523,7 @@ TAO_Transport::send_asynchronous_message_i (TAO_Stub *stub, // ... part of the data was sent, need to figure out what piece // of the message block chain must be queued ... - while (message_block != 0 && message_block->length () == 0) + while (message_block != nullptr && message_block->length () == 0) { message_block = message_block->cont (); } @@ -1535,7 +1535,7 @@ TAO_Transport::send_asynchronous_message_i (TAO_Stub *stub, // ... either the message must be queued or we need to queue it // because it was not completely sent out ... - ACE_Time_Value *wait_time = (partially_sent ? 0: max_wait_time); + ACE_Time_Value *wait_time = (partially_sent ? nullptr: max_wait_time); if (this->queue_message_i (message_block, wait_time, !partially_sent) == -1) { @@ -1651,12 +1651,12 @@ int TAO_Transport::queue_message_i (const ACE_Message_Block *message_block, ACE_Time_Value *max_wait_time, bool back) { - TAO_Queued_Message *queued_message = 0; + TAO_Queued_Message *queued_message = nullptr; ACE_NEW_RETURN (queued_message, TAO_Asynch_Queued_Message (message_block, this->orb_core_, max_wait_time, - 0, + nullptr, true), -1); if (back) { @@ -1711,7 +1711,7 @@ TAO_Transport::handle_input (TAO_Resume_Handle &rh, } } - TAO_Queued_Data *q_data = 0; + TAO_Queued_Data *q_data = nullptr; if (this->incoming_message_stack_.top (q_data) != -1 && q_data->missing_data () != TAO_MISSING_DATA_UNDEFINED) @@ -1768,7 +1768,7 @@ TAO_Transport::consolidate_process_message (TAO_Queued_Data *q_data, q_data->msg_type () == GIOP::Fragment) { // consolidate message on top of stack, only for fragmented messages - TAO_Queued_Data *new_q_data = 0; + TAO_Queued_Data *new_q_data = nullptr; switch (this->messaging_object()->consolidate_fragmented_message (q_data, new_q_data)) { @@ -1848,7 +1848,7 @@ TAO_Transport::consolidate_enqueue_message (TAO_Queued_Data *q_data) if (q_data->more_fragments () || q_data->msg_type () == GIOP::Fragment) { - TAO_Queued_Data *new_q_data = 0; + TAO_Queued_Data *new_q_data = nullptr; switch (this->messaging_object()->consolidate_fragmented_message (q_data, new_q_data)) { @@ -1897,7 +1897,7 @@ TAO_Transport::handle_input_missing_data (TAO_Resume_Handle &rh, TAO_Queued_Data *q_data) { // paranoid check - if (q_data == 0) + if (q_data == nullptr) { return -1; } @@ -1978,7 +1978,7 @@ TAO_Transport::handle_input_parse_extra_messages ( // parsed int buf_status = 0; - TAO_Queued_Data *q_data = 0; // init + TAO_Queued_Data *q_data = nullptr; // init // parse buffer until all messages have been extracted, consolidate // and enqueue complete messages, if the last message being parsed @@ -1986,7 +1986,7 @@ TAO_Transport::handle_input_parse_extra_messages ( while (message_block.length () > 0 && (buf_status = this->messaging_object ()->extract_next_message (message_block, q_data)) != -1 && - q_data != 0) // paranoid check + q_data != nullptr) // paranoid check { if (q_data->missing_data () == 0) { @@ -2001,7 +2001,7 @@ TAO_Transport::handle_input_parse_extra_messages ( this->incoming_message_stack_.push (q_data); } - q_data = 0; // reset + q_data = nullptr; // reset } // while if (buf_status == -1) @@ -2056,7 +2056,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, size_t recv_size = 0; // Note: unsigned integer // Pointer to newly parsed message - TAO_Queued_Data *q_data = 0; + TAO_Queued_Data *q_data = nullptr; // Optimizing access of constants size_t const header_length = this->messaging_object ()->header_length (); @@ -2099,7 +2099,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, // If we have a partial message, copy it into our message block and // clear out the partial message. - if (this->partial_message_ != 0 && this->partial_message_->length () > 0) + if (this->partial_message_ != nullptr && this->partial_message_->length () > 0) { // (*) Copy back the partial message into current read-buffer, // verify that the read-strategy of "recv_size" bytes is not @@ -2136,7 +2136,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, ACE_TEXT ("Error - endless loop detection, closing connection"), this->id ())); } - if (this->partial_message_ != 0 && this->partial_message_->length () > 0) + if (this->partial_message_ != nullptr && this->partial_message_->length () > 0) { this->partial_message_->reset (); } @@ -2162,7 +2162,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, if (n <= 0) { if ((n < 0) && - (this->partial_message_ != 0 && this->partial_message_->length () > 0)) + (this->partial_message_ != nullptr && this->partial_message_->length () > 0)) { this->partial_message_->reset (); } @@ -2170,7 +2170,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, return ACE_Utils::truncate_cast<int> (n); } - if (this->partial_message_ != 0 && this->partial_message_->length () > 0) + if (this->partial_message_ != nullptr && this->partial_message_->length () > 0) { this->partial_message_->reset (); } @@ -2279,7 +2279,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, // Dealing with a fragment TAO_Queued_Data *nqd = TAO_Queued_Data::duplicate (qd); - if (nqd == 0) + if (nqd == nullptr) { return -1; } @@ -2328,7 +2328,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, TAO_Queued_Data *nqd = TAO_Queued_Data::duplicate (qd); - if (nqd == 0) + if (nqd == nullptr) { return -1; } @@ -2428,12 +2428,12 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, // in buffer that needs to be safed for next "handle_input" invocations. if (message_block.length () > 0) { - if (this->partial_message_ == 0) + if (this->partial_message_ == nullptr) { this->allocate_partial_message_block (); } - if (this->partial_message_ != 0 && + if (this->partial_message_ != nullptr && this->partial_message_->copy (message_block.rd_ptr (), message_block.length ()) == 0) { @@ -2463,7 +2463,7 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, #if TAO_HAS_TRANSPORT_CURRENT == 1 // Update stats, if any - if (this->stats_ != 0) + if (this->stats_ != nullptr) this->stats_->messages_received (qd->msg_block ()->length ()); #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */ @@ -2636,7 +2636,7 @@ TAO_Transport::process_queue_head (TAO_Resume_Handle &rh) } int -TAO_Transport::notify_reactor_now (void) +TAO_Transport::notify_reactor_now () { ACE_Event_Handler *eh = this->event_handler_i (); @@ -2668,7 +2668,7 @@ TAO_Transport::notify_reactor_now (void) } TAO::Transport_Cache_Manager & -TAO_Transport::transport_cache_manager (void) +TAO_Transport::transport_cache_manager () { return this->orb_core_->lane_resources ().transport_cache (); } @@ -2693,36 +2693,36 @@ TAO_Transport::clear_translators (TAO_InputCDR *inp, TAO_OutputCDR *outp) { if (inp) { - inp->char_translator (0); - inp->wchar_translator (0); + inp->char_translator (nullptr); + inp->wchar_translator (nullptr); } if (outp) { - outp->char_translator (0); - outp->wchar_translator (0); + outp->char_translator (nullptr); + outp->wchar_translator (nullptr); } } ACE_Event_Handler::Reference_Count -TAO_Transport::add_reference (void) +TAO_Transport::add_reference () { return this->event_handler_i ()->add_reference (); } ACE_Event_Handler::Reference_Count -TAO_Transport::remove_reference (void) +TAO_Transport::remove_reference () { return this->event_handler_i ()->remove_reference (); } TAO_OutputCDR & -TAO_Transport::out_stream (void) +TAO_Transport::out_stream () { return this->messaging_object ()->out_stream (); } TAO_SYNCH_MUTEX & -TAO_Transport::output_cdr_lock (void) +TAO_Transport::output_cdr_lock () { return this->output_cdr_mutex_; } @@ -2734,7 +2734,7 @@ TAO_Transport::messaging_init (TAO_GIOP_Message_Version const &version) } void -TAO_Transport::pre_close (void) +TAO_Transport::pre_close () { if (TAO_debug_level > 9) { @@ -2780,7 +2780,7 @@ TAO_Transport::post_open (size_t id) TAO_Flushing_Strategy *flushing_strategy = this->orb_core ()->flushing_strategy (); - if (flushing_strategy == 0) + if (flushing_strategy == nullptr) throw CORBA::INTERNAL (); this->flush_in_post_open_ = false; @@ -2834,9 +2834,9 @@ TAO_Transport::post_open (size_t id) } void -TAO_Transport::allocate_partial_message_block (void) +TAO_Transport::allocate_partial_message_block () { - if (this->partial_message_ == 0) + if (this->partial_message_ == nullptr) { // This value must be at least large enough to hold a GIOP message // header plus a GIOP fragment header @@ -2865,13 +2865,13 @@ TAO_Transport::io_timeout( } if (this->wait_strategy()->can_process_upcalls()) { - return 0; + return nullptr; } return dc.timeout(); } bool -TAO_Transport::using_blocking_io_for_synch_messages (void) const +TAO_Transport::using_blocking_io_for_synch_messages () const { if (this->wait_strategy()->can_process_upcalls()) { @@ -2881,13 +2881,13 @@ TAO_Transport::using_blocking_io_for_synch_messages (void) const } bool -TAO_Transport::using_blocking_io_for_asynch_messages (void) const +TAO_Transport::using_blocking_io_for_asynch_messages () const { return false; } bool -TAO_Transport::connection_closed_on_read (void) const +TAO_Transport::connection_closed_on_read () const { return connection_closed_on_read_; } diff --git a/TAO/tao/Transport_Acceptor.cpp b/TAO/tao/Transport_Acceptor.cpp index 1a1a9a5577d..bdf634c708b 100644 --- a/TAO/tao/Transport_Acceptor.cpp +++ b/TAO/tao/Transport_Acceptor.cpp @@ -15,7 +15,7 @@ TAO_Acceptor::TAO_Acceptor (CORBA::ULong tag) { } -TAO_Acceptor::~TAO_Acceptor (void) +TAO_Acceptor::~TAO_Acceptor () { } @@ -37,7 +37,7 @@ TAO_Acceptor::handle_accept_error (ACE_Event_Handler* base_acceptor) // Get the reactor. If there isn't one, which isn't very likely, // then just return -1. ACE_Reactor* reactor = base_acceptor->reactor (); - if (reactor == 0) + if (reactor == nullptr) return -1; // So that the reactor doesn't completely remove this handler from @@ -55,7 +55,7 @@ TAO_Acceptor::handle_accept_error (ACE_Event_Handler* base_acceptor) // Schedule a timer so that we can resume the handler in hopes // that some file handles have freed up. ACE_Time_Value timeout (this->error_retry_delay_); - reactor->schedule_timer (base_acceptor, 0, timeout); + reactor->schedule_timer (base_acceptor, nullptr, timeout); } // We want to keep accepting in all other situations. @@ -68,7 +68,7 @@ TAO_Acceptor::handle_expiration (ACE_Event_Handler* base_acceptor) // Get the reactor. If there isn't one, which isn't very likely, then // just return -1; ACE_Reactor* reactor = base_acceptor->reactor (); - if (reactor == 0) + if (reactor == nullptr) return -1; if (TAO_debug_level > 0) diff --git a/TAO/tao/Transport_Connector.cpp b/TAO/tao/Transport_Connector.cpp index 5dbd85887e6..4e4961b1f90 100644 --- a/TAO/tao/Transport_Connector.cpp +++ b/TAO/tao/Transport_Connector.cpp @@ -65,13 +65,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Connector TAO_Connector::TAO_Connector (CORBA::ULong tag) - : active_connect_strategy_ (0), + : active_connect_strategy_ (nullptr), tag_ (tag), - orb_core_ (0) + orb_core_ (nullptr) { } -TAO_Connector::~TAO_Connector (void) +TAO_Connector::~TAO_Connector () { delete this->active_connect_strategy_; } @@ -80,14 +80,14 @@ TAO_Profile * TAO_Connector::corbaloc_scan (const char *str, size_t &len) { if (this->check_prefix (str) != 0) - return 0; + return nullptr; const char *comma_pos = ACE_OS::strchr (str,','); const char *slash_pos = ACE_OS::strchr (str,'/'); - if (comma_pos == 0 && slash_pos == 0) + if (comma_pos == nullptr && slash_pos == nullptr) { len = ACE_OS::strlen (str); } - else if (comma_pos == 0 || comma_pos > slash_pos) + else if (comma_pos == nullptr || comma_pos > slash_pos) len = (slash_pos - str); else len = comma_pos - str; return this->make_profile(); @@ -263,7 +263,7 @@ TAO_Connector::make_mprofile (const char *string, TAO_MProfile &mprofile) } int -TAO_Connector::supports_parallel_connects(void) const +TAO_Connector::supports_parallel_connects() const { return 0; // by default, we don't support parallel connection attempts; } @@ -273,7 +273,7 @@ TAO_Connector::make_parallel_connection (TAO::Profile_Transport_Resolver *, TAO_Transport_Descriptor_Interface &, ACE_Time_Value *) { - return 0; + return nullptr; } @@ -285,14 +285,14 @@ TAO_Connector::parallel_connect (TAO::Profile_Transport_Resolver *r, if (this->supports_parallel_connects() == 0) { errno = ENOTSUP; - return 0; + return nullptr; } errno = 0; // need to clear errno to ensure a stale enotsup is not set - if (desc == 0) - return 0; + if (desc == nullptr) + return nullptr; TAO_Endpoint *root_ep = desc->endpoint(); - TAO_Transport *base_transport = 0; + TAO_Transport *base_transport = nullptr; TAO::Transport_Cache_Manager &tcm = this->orb_core ()->lane_resources ().transport_cache (); @@ -300,8 +300,8 @@ TAO_Connector::parallel_connect (TAO::Profile_Transport_Resolver *r, // Iterate through the endpoints. Since find_transport takes a // Transport Descriptor rather than an endpoint, we must create a // local TDI for each endpoint. The first one found will be used. - for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),0); - ep != 0; + for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),nullptr); + ep != nullptr; ep = ep->next_filtered(this->orb_core(),root_ep)) { TAO_Base_Transport_Property desc2(ep,0); @@ -329,13 +329,13 @@ TAO_Connector::parallel_connect (TAO::Profile_Transport_Resolver *r, // when one succeeds the rest are cancelled or closed. unsigned int endpoint_count = 0; - for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),0); - ep != 0; + for (TAO_Endpoint *ep = root_ep->next_filtered (this->orb_core(),nullptr); + ep != nullptr; ep = ep->next_filtered(this->orb_core(),root_ep)) if (this->set_validate_endpoint (ep) == 0) ++endpoint_count; if (endpoint_count == 0) - return 0; + return nullptr; return this->make_parallel_connection (r,*desc,timeout); } @@ -404,7 +404,7 @@ TAO_Connector::wait_for_transport (TAO::Profile_Transport_Resolver *r, // connection, the wait() call will block forever (or until the ORB // thread leaves the reactor, which may not happen). int result = 0; - if (timeout == 0 && !r->blocked_connect ()) + if (timeout == nullptr && !r->blocked_connect ()) { ACE_Time_Value tv (0, 500); result = this->active_connect_strategy_->wait (transport, &tv); @@ -488,7 +488,7 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r, { // Find a connection in the cache // If transport found, reference count is incremented on assignment - TAO_Transport *base_transport = 0; + TAO_Transport *base_transport = nullptr; size_t busy_count = 0; TAO::Transport_Cache_Manager::Find_Result found = tcm.find_transport (desc, @@ -567,7 +567,7 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r, "TAO (%P|%t) - Transport_Connector::connect," " wait for completion failed\n")); } - return 0; + return nullptr; } if (base_transport->is_connected () && @@ -582,7 +582,7 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r, "in the reactor.\n", base_transport->id ())); } - return 0; + return nullptr; } tg.clear (); @@ -611,7 +611,7 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r, if (!base_transport->register_if_necessary ()) { base_transport->remove_reference (); - return 0; + return nullptr; } } @@ -638,9 +638,9 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r, } else { - if (desc == 0 || + if (desc == nullptr || (this->set_validate_endpoint (desc->endpoint ()) == -1)) - return 0; + return nullptr; // @todo: This is not the right place for this! (bugzilla 3023) // Purge connections (if necessary) @@ -654,13 +654,13 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r, { // we aren't going to use the transport returned from the cache // (if any) - if (base_transport != 0) + if (base_transport != nullptr) { base_transport->remove_reference (); } base_transport = this->make_connection (r, *desc, timeout); - if (base_transport == 0) + if (base_transport == nullptr) { if (TAO_debug_level > 4) { @@ -668,7 +668,7 @@ TAO_Connector::connect (TAO::Profile_Transport_Resolver *r, ACE_TEXT ("TAO (%P|%t) - Transport_Connector::") ACE_TEXT ("connect, make_connection failed\n"))); } - return 0; + return nullptr; } if (TAO_debug_level > 4) @@ -814,7 +814,7 @@ TAO_Connector::wait_for_connection_completion ( { if (errno == ETIME) { - if (timeout == 0) + if (timeout == nullptr) { // There was an error during connecting and the errno was // ETIME. We didn't pass in a timeout, so there's @@ -873,7 +873,7 @@ TAO_Connector::wait_for_connection_completion ( // Set transport to zero, it is not usable, and the reference // count we added above was decremented by the base connector // handling the connection failure. - transport = 0; + transport = nullptr; return false; } // Connection not ready yet but we can use this transport, if @@ -926,7 +926,7 @@ TAO_Connector::wait_for_connection_completion ( if (r->blocked_connect ()) { result = this->active_connect_strategy_->wait (mev, timeout); - the_winner = 0; + the_winner = nullptr; } else { @@ -963,7 +963,7 @@ TAO_Connector::wait_for_connection_completion ( this->cleanup_pending (the_winner, transport, count); // In case of errors. - if (the_winner == 0) + if (the_winner == nullptr) { // Report that making the connection failed, don't print errno // because we touched the reactor and errno could be changed @@ -995,7 +995,7 @@ TAO_Connector::wait_for_connection_completion ( // Forget the return value. We are busted anyway. Try our best // here. (void) this->cancel_svc_handler (the_winner->connection_handler ()); - the_winner = 0; + the_winner = nullptr; return false; } @@ -1006,16 +1006,16 @@ TAO_Connector::wait_for_connection_completion ( } int -TAO_Connector::create_connect_strategy (void) +TAO_Connector::create_connect_strategy () { - if (this->active_connect_strategy_ == 0) + if (this->active_connect_strategy_ == nullptr) { this->active_connect_strategy_ = this->orb_core_->client_factory ()->create_connect_strategy ( this->orb_core_); } - if (this->active_connect_strategy_ == 0) + if (this->active_connect_strategy_ == nullptr) { return -1; } @@ -1026,7 +1026,7 @@ TAO_Connector::create_connect_strategy (void) bool TAO_Connector::new_connection_is_ok (size_t busy_count) { - if (this->orb_core_ == 0) + if (this->orb_core_ == nullptr) return true; unsigned int mux_limit = this->orb_core_->resource_factory () diff --git a/TAO/tao/Transport_Descriptor_Interface.cpp b/TAO/tao/Transport_Descriptor_Interface.cpp index fe038e33c63..7cfe705188f 100644 --- a/TAO/tao/Transport_Descriptor_Interface.cpp +++ b/TAO/tao/Transport_Descriptor_Interface.cpp @@ -8,7 +8,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Transport_Descriptor_Interface::~TAO_Transport_Descriptor_Interface (void) +TAO_Transport_Descriptor_Interface::~TAO_Transport_Descriptor_Interface () { if (this->release_) { @@ -23,7 +23,7 @@ TAO_Transport_Descriptor_Interface::reset_endpoint (TAO_Endpoint *ep) if (this->release_) return false; - for (TAO_Endpoint *ptr = this->endpoint_; ptr != 0; ptr = ptr->next()) + for (TAO_Endpoint *ptr = this->endpoint_; ptr != nullptr; ptr = ptr->next()) if (ptr == ep) { diff --git a/TAO/tao/Transport_Mux_Strategy.cpp b/TAO/tao/Transport_Mux_Strategy.cpp index f2c3d15618a..47c6156fede 100644 --- a/TAO/tao/Transport_Mux_Strategy.cpp +++ b/TAO/tao/Transport_Mux_Strategy.cpp @@ -8,7 +8,7 @@ TAO_Transport_Mux_Strategy::TAO_Transport_Mux_Strategy ( { } -TAO_Transport_Mux_Strategy::~TAO_Transport_Mux_Strategy (void) +TAO_Transport_Mux_Strategy::~TAO_Transport_Mux_Strategy () { } diff --git a/TAO/tao/Transport_Queueing_Strategies.cpp b/TAO/tao/Transport_Queueing_Strategies.cpp index 6343041843d..c6a41562673 100644 --- a/TAO/tao/Transport_Queueing_Strategies.cpp +++ b/TAO/tao/Transport_Queueing_Strategies.cpp @@ -10,7 +10,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { - Transport_Queueing_Strategy::~Transport_Queueing_Strategy (void) + Transport_Queueing_Strategy::~Transport_Queueing_Strategy () { } diff --git a/TAO/tao/Transport_Selection_Guard.cpp b/TAO/tao/Transport_Selection_Guard.cpp index a3d12a0544a..cd79ab92d66 100644 --- a/TAO/tao/Transport_Selection_Guard.cpp +++ b/TAO/tao/Transport_Selection_Guard.cpp @@ -44,13 +44,13 @@ namespace TAO } /// Dtor - Transport_Selection_Guard::~Transport_Selection_Guard (void) + Transport_Selection_Guard::~Transport_Selection_Guard () { #if TAO_HAS_TRANSPORT_CURRENT == 1 TAO_TSS_Resources::instance ()->tsg_ = prev_; - this->prev_ = 0; + this->prev_ = nullptr; #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */ - this->curr_ = 0; + this->curr_ = nullptr; } bool diff --git a/TAO/tao/TypeCodeFactory_Adapter.cpp b/TAO/tao/TypeCodeFactory_Adapter.cpp index ed855ffc906..cb97ddae79e 100644 --- a/TAO/tao/TypeCodeFactory_Adapter.cpp +++ b/TAO/tao/TypeCodeFactory_Adapter.cpp @@ -2,7 +2,7 @@ #include "ace/Dynamic_Service.h" -TAO_TypeCodeFactory_Adapter::~TAO_TypeCodeFactory_Adapter (void) +TAO_TypeCodeFactory_Adapter::~TAO_TypeCodeFactory_Adapter () { } diff --git a/TAO/tao/UserException.cpp b/TAO/tao/UserException.cpp index 34bf89289d5..590916c2753 100644 --- a/TAO/tao/UserException.cpp +++ b/TAO/tao/UserException.cpp @@ -10,7 +10,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Virtual. Do not inline. -CORBA::UserException::~UserException (void) +CORBA::UserException::~UserException () { } @@ -23,13 +23,13 @@ CORBA::UserException::operator= (CORBA::UserException const & rhs) // Virtual. Do not inline. CORBA::TypeCode_ptr -CORBA::UserException::_tao_type (void) const +CORBA::UserException::_tao_type () const { - return 0; + return nullptr; } ACE_CString -CORBA::UserException::_info (void) const +CORBA::UserException::_info () const { // @@ we can use the exception's typecode to dump all the data held // within it ... diff --git a/TAO/tao/Valuetype_Adapter.cpp b/TAO/tao/Valuetype_Adapter.cpp index 9dec3450404..944d6ad3668 100644 --- a/TAO/tao/Valuetype_Adapter.cpp +++ b/TAO/tao/Valuetype_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Valuetype_Adapter::~TAO_Valuetype_Adapter (void) +TAO_Valuetype_Adapter::~TAO_Valuetype_Adapter () { } diff --git a/TAO/tao/Valuetype_Adapter_Factory.cpp b/TAO/tao/Valuetype_Adapter_Factory.cpp index e6f12a7d34c..eea713b06ad 100644 --- a/TAO/tao/Valuetype_Adapter_Factory.cpp +++ b/TAO/tao/Valuetype_Adapter_Factory.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Valuetype_Adapter_Factory::~TAO_Valuetype_Adapter_Factory (void) +TAO_Valuetype_Adapter_Factory::~TAO_Valuetype_Adapter_Factory () { } diff --git a/TAO/tao/Wait_On_LF_No_Upcall.cpp b/TAO/tao/Wait_On_LF_No_Upcall.cpp index 16405fa3774..c6d79a32ff4 100644 --- a/TAO/tao/Wait_On_LF_No_Upcall.cpp +++ b/TAO/tao/Wait_On_LF_No_Upcall.cpp @@ -11,7 +11,7 @@ namespace TAO { } - Wait_On_LF_No_Upcall::~Wait_On_LF_No_Upcall (void) + Wait_On_LF_No_Upcall::~Wait_On_LF_No_Upcall () { } @@ -25,7 +25,7 @@ namespace TAO } bool - Wait_On_LF_No_Upcall::can_process_upcalls (void) const + Wait_On_LF_No_Upcall::can_process_upcalls () const { if ((this->transport_->opened_as () == TAO::TAO_SERVER_ROLE) && (this->transport_->bidirectional_flag () == -1)) diff --git a/TAO/tao/Wait_On_Leader_Follower.cpp b/TAO/tao/Wait_On_Leader_Follower.cpp index 4b672c8204d..4491baac65e 100644 --- a/TAO/tao/Wait_On_Leader_Follower.cpp +++ b/TAO/tao/Wait_On_Leader_Follower.cpp @@ -13,12 +13,12 @@ TAO_Wait_On_Leader_Follower::TAO_Wait_On_Leader_Follower { } -TAO_Wait_On_Leader_Follower::~TAO_Wait_On_Leader_Follower (void) +TAO_Wait_On_Leader_Follower::~TAO_Wait_On_Leader_Follower () { } int -TAO_Wait_On_Leader_Follower::register_handler (void) +TAO_Wait_On_Leader_Follower::register_handler () { if (!this->is_registered_) { @@ -29,7 +29,7 @@ TAO_Wait_On_Leader_Follower::register_handler (void) } bool -TAO_Wait_On_Leader_Follower::non_blocking (void) const +TAO_Wait_On_Leader_Follower::non_blocking () const { return true; } @@ -57,7 +57,7 @@ TAO_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, } bool -TAO_Wait_On_Leader_Follower::can_process_upcalls (void) const +TAO_Wait_On_Leader_Follower::can_process_upcalls () const { return true; } diff --git a/TAO/tao/Wait_On_Reactor.cpp b/TAO/tao/Wait_On_Reactor.cpp index 7232bf64838..4e73e0109f9 100644 --- a/TAO/tao/Wait_On_Reactor.cpp +++ b/TAO/tao/Wait_On_Reactor.cpp @@ -13,7 +13,7 @@ TAO_Wait_On_Reactor::TAO_Wait_On_Reactor (TAO_Transport *transport) { } -TAO_Wait_On_Reactor::~TAO_Wait_On_Reactor (void) +TAO_Wait_On_Reactor::~TAO_Wait_On_Reactor () { } @@ -49,7 +49,7 @@ TAO_Wait_On_Reactor::wait (ACE_Time_Value *max_wait_time, // Did we timeout? If so, stop running the loop. if (result == 0 - && max_wait_time != 0 + && max_wait_time != nullptr && *max_wait_time == ACE_Time_Value::zero) { break; @@ -70,7 +70,7 @@ TAO_Wait_On_Reactor::wait (ACE_Time_Value *max_wait_time, } // Return an error if there was a problem receiving the reply. - if (max_wait_time != 0) + if (max_wait_time != nullptr) { if (rd.successful (leader_follower) && *max_wait_time == ACE_Time_Value::zero) { @@ -93,7 +93,7 @@ TAO_Wait_On_Reactor::wait (ACE_Time_Value *max_wait_time, // Register the handler with the Reactor. int -TAO_Wait_On_Reactor::register_handler (void) +TAO_Wait_On_Reactor::register_handler () { if (!this->is_registered_) { @@ -104,13 +104,13 @@ TAO_Wait_On_Reactor::register_handler (void) } bool -TAO_Wait_On_Reactor::non_blocking (void) const +TAO_Wait_On_Reactor::non_blocking () const { return true; } bool -TAO_Wait_On_Reactor::can_process_upcalls (void) const +TAO_Wait_On_Reactor::can_process_upcalls () const { return true; } diff --git a/TAO/tao/Wait_On_Read.cpp b/TAO/tao/Wait_On_Read.cpp index 7bc3f96ef1a..0105e9ed5f4 100644 --- a/TAO/tao/Wait_On_Read.cpp +++ b/TAO/tao/Wait_On_Read.cpp @@ -16,7 +16,7 @@ TAO_Wait_On_Read::TAO_Wait_On_Read (TAO_Transport *transport) } // Destructor. -TAO_Wait_On_Read::~TAO_Wait_On_Read (void) +TAO_Wait_On_Read::~TAO_Wait_On_Read () { } @@ -147,19 +147,19 @@ TAO_Wait_On_Read::wait (ACE_Time_Value * max_wait_time, // No-op. int -TAO_Wait_On_Read::register_handler (void) +TAO_Wait_On_Read::register_handler () { return 0; } bool -TAO_Wait_On_Read::non_blocking (void) const +TAO_Wait_On_Read::non_blocking () const { return false; } bool -TAO_Wait_On_Read::can_process_upcalls (void) const +TAO_Wait_On_Read::can_process_upcalls () const { return true; } diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index 4efe9ce0fe4..fc13c417789 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -14,7 +14,7 @@ TAO_Wait_Strategy::TAO_Wait_Strategy (TAO_Transport *transport) } // Destructor. -TAO_Wait_Strategy::~TAO_Wait_Strategy (void) +TAO_Wait_Strategy::~TAO_Wait_Strategy () { } diff --git a/TAO/tao/WrongTransactionC.cpp b/TAO/tao/WrongTransactionC.cpp index e9055d36cda..a2f1be23a7b 100644 --- a/TAO/tao/WrongTransactionC.cpp +++ b/TAO/tao/WrongTransactionC.cpp @@ -48,7 +48,7 @@ namespace TAO // TAO_IDL - Generated from // be\be_visitor_exception/exception_cs.cpp:63 -CORBA::WrongTransaction::WrongTransaction (void) +CORBA::WrongTransaction::WrongTransaction () : CORBA::UserException ( "IDL:omg.org/CORBA/WrongTransaction:1.0", "WrongTransaction" @@ -56,7 +56,7 @@ CORBA::WrongTransaction::WrongTransaction (void) { } -CORBA::WrongTransaction::~WrongTransaction (void) +CORBA::WrongTransaction::~WrongTransaction () { } @@ -94,26 +94,26 @@ CORBA::WrongTransaction::_downcast (CORBA::Exception const *_tao_excp) return dynamic_cast<const WrongTransaction *> (_tao_excp); } -CORBA::Exception *CORBA::WrongTransaction::_alloc (void) +CORBA::Exception *CORBA::WrongTransaction::_alloc () { - CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ::CORBA::WrongTransaction, 0); + CORBA::Exception *retval = nullptr; + ACE_NEW_RETURN (retval, ::CORBA::WrongTransaction, nullptr); return retval; } CORBA::Exception * -CORBA::WrongTransaction::_tao_duplicate (void) const +CORBA::WrongTransaction::_tao_duplicate () const { - CORBA::Exception *result = 0; + CORBA::Exception *result = nullptr; ACE_NEW_RETURN ( result, ::CORBA::WrongTransaction (*this), - 0 + nullptr ); return result; } -void CORBA::WrongTransaction::_raise (void) const +void CORBA::WrongTransaction::_raise () const { throw *this; } @@ -143,13 +143,13 @@ void CORBA::WrongTransaction::_tao_decode ( } // TAO extension - the virtual _type method. -CORBA::TypeCode_ptr CORBA::WrongTransaction::_tao_type (void) const +CORBA::TypeCode_ptr CORBA::WrongTransaction::_tao_type () const { TAO_AnyTypeCode_Adapter *adapter = ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance ( "AnyTypeCode_Adapter" ); - if (adapter != 0) + if (adapter != nullptr) return adapter->_tao_type_WrongTransaction (); else { @@ -157,7 +157,7 @@ CORBA::TypeCode_ptr CORBA::WrongTransaction::_tao_type (void) const ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("Unable to find the ") ACE_TEXT ("AnyTypeCode Adapter instance"))); - return 0; + return nullptr; } } diff --git a/TAO/tao/ZIOP_Adapter.cpp b/TAO/tao/ZIOP_Adapter.cpp index 39a38991533..8f9c4a5cba2 100644 --- a/TAO/tao/ZIOP_Adapter.cpp +++ b/TAO/tao/ZIOP_Adapter.cpp @@ -2,7 +2,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_ZIOP_Adapter::~TAO_ZIOP_Adapter (void) +TAO_ZIOP_Adapter::~TAO_ZIOP_Adapter () { } diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp index 6dfae7e2af0..221e680cb50 100644 --- a/TAO/tao/default_client.cpp +++ b/TAO/tao/default_client.cpp @@ -21,7 +21,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void) +TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory () : transport_mux_strategy_ (TAO_MUXED_TMS) , wait_strategy_ (TAO_WAIT_ON_LEADER_FOLLOWER) , connect_strategy_ (TAO_LEADER_FOLLOWER_CONNECT) @@ -57,7 +57,7 @@ TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void) #endif } -TAO_Default_Client_Strategy_Factory::~TAO_Default_Client_Strategy_Factory (void) +TAO_Default_Client_Strategy_Factory::~TAO_Default_Client_Strategy_Factory () { } @@ -242,7 +242,7 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) { ACE_TCHAR* name = argv[curarg]; - ACE_TCHAR *err = 0; + ACE_TCHAR *err = nullptr; long limit = ACE_OS::strtol (name, &err, 10); if (err && *err != 0) { @@ -264,7 +264,7 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) { ACE_TCHAR* name = argv[curarg]; - ACE_TCHAR *err = 0; + ACE_TCHAR *err = nullptr; long limit = ACE_OS::strtol (name, &err, 10); if (err && *err != 0) { @@ -287,7 +287,7 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) { ACE_TCHAR* name = argv[curarg]; - ACE_TCHAR *err = 0; + ACE_TCHAR *err = nullptr; long limit = ACE_OS::strtol (name, &err, 10); if (err && *err != 0) { @@ -309,7 +309,7 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) { ACE_TCHAR* name = argv[curarg]; - ACE_TCHAR *err = 0; + ACE_TCHAR *err = nullptr; long limit = ACE_OS::strtol (name, &err, 10); if (err && *err != 0) { @@ -331,7 +331,7 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) { ACE_TCHAR* name = argv[curarg]; - ACE_TCHAR *err = 0; + ACE_TCHAR *err = nullptr; long limit = ACE_OS::strtol (name, &err, 10); if (err && *err != 0) { @@ -368,7 +368,7 @@ TAO_Transport_Mux_Strategy * TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy ( TAO_Transport *transport) { - TAO_Transport_Mux_Strategy *tms = 0; + TAO_Transport_Mux_Strategy *tms = nullptr; switch (this->transport_mux_strategy_) { @@ -376,14 +376,14 @@ TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy ( { ACE_NEW_RETURN (tms, TAO_Muxed_TMS (transport), - 0); + nullptr); break; } case TAO_EXCLUSIVE_TMS: { ACE_NEW_RETURN (tms, TAO_Exclusive_TMS (transport), - 0); + nullptr); break; } } @@ -392,9 +392,9 @@ TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy ( } ACE_Lock * -TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy_lock (void) +TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy_lock () { - ACE_Lock *the_lock = 0; + ACE_Lock *the_lock = nullptr; switch (this->muxed_strategy_lock_type_) { @@ -402,14 +402,14 @@ TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy_lock (void) { ACE_NEW_RETURN (the_lock, ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> (), - 0); + nullptr); break; } case TAO_THREAD_LOCK: { ACE_NEW_RETURN (the_lock, ACE_Lock_Adapter<TAO_SYNCH_RECURSIVE_MUTEX> (), - 0); + nullptr); break; } } @@ -418,7 +418,7 @@ TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy_lock (void) } int -TAO_Default_Client_Strategy_Factory::reply_dispatcher_table_size (void) const +TAO_Default_Client_Strategy_Factory::reply_dispatcher_table_size () const { return this->rd_table_size_; } @@ -427,7 +427,7 @@ TAO_Wait_Strategy * TAO_Default_Client_Strategy_Factory::create_wait_strategy ( TAO_Transport *transport) { - TAO_Wait_Strategy *ws = 0; + TAO_Wait_Strategy *ws = nullptr; switch (this->wait_strategy_) { @@ -435,28 +435,28 @@ TAO_Default_Client_Strategy_Factory::create_wait_strategy ( { ACE_NEW_RETURN (ws, TAO_Wait_On_Leader_Follower (transport), - 0); + nullptr); break; } case TAO_WAIT_ON_REACTOR: { ACE_NEW_RETURN (ws, TAO_Wait_On_Reactor (transport), - 0); + nullptr); break; } case TAO_WAIT_ON_READ: { ACE_NEW_RETURN (ws, TAO_Wait_On_Read (transport), - 0); + nullptr); break; } case TAO_WAIT_ON_LF_NO_UPCALL: { ACE_NEW_RETURN (ws, TAO::Wait_On_LF_No_Upcall (transport), - 0); + nullptr); break; } } @@ -465,7 +465,7 @@ TAO_Default_Client_Strategy_Factory::create_wait_strategy ( } TAO_Client_Strategy_Factory::Connect_Strategy -TAO_Default_Client_Strategy_Factory::connect_strategy (void) const +TAO_Default_Client_Strategy_Factory::connect_strategy () const { return this->connect_strategy_; } @@ -474,7 +474,7 @@ TAO_Connect_Strategy * TAO_Default_Client_Strategy_Factory::create_connect_strategy ( TAO_ORB_Core *orb_core) { - TAO_Connect_Strategy *cs = 0; + TAO_Connect_Strategy *cs = nullptr; switch (this->connect_strategy_) { @@ -482,21 +482,21 @@ TAO_Default_Client_Strategy_Factory::create_connect_strategy ( { ACE_NEW_RETURN (cs, TAO_Blocked_Connect_Strategy (orb_core), - 0); + nullptr); break; } case TAO_REACTIVE_CONNECT: { ACE_NEW_RETURN (cs, TAO_Reactive_Connect_Strategy (orb_core), - 0); + nullptr); break; } case TAO_LEADER_FOLLOWER_CONNECT : { ACE_NEW_RETURN (cs, TAO_LF_Connect_Strategy (orb_core, this->wait_strategy_ == TAO_WAIT_ON_LF_NO_UPCALL), - 0); + nullptr); break; } } @@ -505,13 +505,13 @@ TAO_Default_Client_Strategy_Factory::create_connect_strategy ( } Messaging::SyncScope -TAO_Default_Client_Strategy_Factory::sync_scope (void) const +TAO_Default_Client_Strategy_Factory::sync_scope () const { return this->sync_scope_; } int -TAO_Default_Client_Strategy_Factory::allow_callback (void) +TAO_Default_Client_Strategy_Factory::allow_callback () { return (this->wait_strategy_ != TAO_WAIT_ON_READ); } @@ -528,13 +528,13 @@ TAO_Default_Client_Strategy_Factory::report_option_value_error ( } bool -TAO_Default_Client_Strategy_Factory::use_cleanup_options (void) const +TAO_Default_Client_Strategy_Factory::use_cleanup_options () const { return this->use_cleanup_options_; } const TAO::Invocation_Retry_Params & -TAO_Default_Client_Strategy_Factory::invocation_retry_params (void) const +TAO_Default_Client_Strategy_Factory::invocation_retry_params () const { return this->invocation_retry_params_; } diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp index 55abe198aad..cee00e985c0 100644 --- a/TAO/tao/default_resource.cpp +++ b/TAO/tao/default_resource.cpp @@ -34,20 +34,20 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Codeset_Parameters::TAO_Codeset_Parameters (void) +TAO_Codeset_Parameters::TAO_Codeset_Parameters () : translators_ () - , native_ (0) + , native_ (nullptr) { } -TAO_Codeset_Parameters::~TAO_Codeset_Parameters (void) +TAO_Codeset_Parameters::~TAO_Codeset_Parameters () { for (TAO_Codeset_Parameters::iterator i = this->translators (); !i.done (); i.advance ()) { - ACE_TCHAR** element = 0; + ACE_TCHAR** element = nullptr; if (i.next (element)) ACE_OS::free (*element); } @@ -56,7 +56,7 @@ TAO_Codeset_Parameters::~TAO_Codeset_Parameters (void) } const ACE_TCHAR* -TAO_Codeset_Parameters::native (void) +TAO_Codeset_Parameters::native () { return (this->native_); } @@ -64,13 +64,13 @@ TAO_Codeset_Parameters::native (void) void TAO_Codeset_Parameters::apply_to (TAO_Codeset_Descriptor_Base *csd) { - if (csd == 0) + if (csd == nullptr) return; - if (this->native () != 0) + if (this->native () != nullptr) csd->ncs (this->native ()); - ACE_TCHAR** element = 0; + ACE_TCHAR** element = nullptr; for (TAO_Codeset_Parameters::iterator i = this->translators (); !i.done (); i.advance ()) @@ -94,15 +94,15 @@ TAO_Codeset_Parameters::add_translator (const ACE_TCHAR*name) } TAO_Codeset_Parameters::iterator -TAO_Codeset_Parameters::translators (void) +TAO_Codeset_Parameters::translators () { return this->translators_.begin (); } -TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) +TAO_Default_Resource_Factory::TAO_Default_Resource_Factory () : use_locked_data_blocks_ (1) , parser_names_count_ (0) - , parser_names_ (0) + , parser_names_ (nullptr) , protocol_factories_ () , connection_purging_type_ (TAO_CONNECTION_PURGING_STRATEGY) , cache_maximum_ (TAO_CONNECTION_CACHE_MAXIMUM) @@ -143,7 +143,7 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) } -TAO_Default_Resource_Factory::~TAO_Default_Resource_Factory (void) +TAO_Default_Resource_Factory::~TAO_Default_Resource_Factory () { const TAO_ProtocolFactorySetItor end = this->protocol_factories_.end (); @@ -205,7 +205,7 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) for (int i = 0; i < this->parser_names_count_; ++i) - this->parser_names_[i] = 0; + this->parser_names_[i] = nullptr; this->index_ = 0; } @@ -237,7 +237,7 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) ++curarg; if (curarg < argc) { - TAO_Protocol_Item *item = 0; + TAO_Protocol_Item *item = nullptr; ACE_NEW_RETURN (item, TAO_Protocol_Item (ACE_TEXT_ALWAYS_CHAR(argv[curarg])), -1); @@ -593,7 +593,7 @@ TAO_Default_Resource_Factory::add_to_ior_parser_names (const char *curarg) // This is virtual and protected... int -TAO_Default_Resource_Factory::load_default_protocols (void) +TAO_Default_Resource_Factory::load_default_protocols () { #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0) // If the user did not list any protocols in her svc.conf file @@ -632,7 +632,7 @@ TAO_Default_Resource_Factory::load_default_protocols (void) } int -TAO_Default_Resource_Factory::init_protocol_factories (void) +TAO_Default_Resource_Factory::init_protocol_factories () { const TAO_ProtocolFactorySetItor end = protocol_factories_.end (); TAO_ProtocolFactorySetItor factory = protocol_factories_.begin (); @@ -647,7 +647,7 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) const ACE_CString &name = (*factory)->protocol_name (); (*factory)->factory ( ACE_Dynamic_Service<TAO_Protocol_Factory>::instance (name.c_str ())); - if ((*factory)->factory () == 0) + if ((*factory)->factory () == nullptr) { TAOLIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - Unable to load ") @@ -669,50 +669,50 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) } int -TAO_Default_Resource_Factory::use_locked_data_blocks (void) const +TAO_Default_Resource_Factory::use_locked_data_blocks () const { return this->use_locked_data_blocks_; } TAO_ProtocolFactorySet * -TAO_Default_Resource_Factory::get_protocol_factories (void) +TAO_Default_Resource_Factory::get_protocol_factories () { return &protocol_factories_; } TAO_Acceptor_Registry * -TAO_Default_Resource_Factory::get_acceptor_registry (void) +TAO_Default_Resource_Factory::get_acceptor_registry () { - TAO_Acceptor_Registry *ar = 0; + TAO_Acceptor_Registry *ar = nullptr; ACE_NEW_RETURN(ar, TAO_Acceptor_Registry, - 0); + nullptr); return ar; } TAO_Connector_Registry * -TAO_Default_Resource_Factory::get_connector_registry (void) +TAO_Default_Resource_Factory::get_connector_registry () { - TAO_Connector_Registry *cr = 0; + TAO_Connector_Registry *cr = nullptr; ACE_NEW_RETURN(cr, TAO_Connector_Registry, - 0); + nullptr); return cr; } #if (TAO_HAS_TIME_POLICY == 1) TAO_Time_Policy_Manager* -TAO_Default_Resource_Factory::time_policy_manager (void) const +TAO_Default_Resource_Factory::time_policy_manager () const { // get time policy manager service TAO_Time_Policy_Manager * tpm = ACE_Dynamic_Service<TAO_Time_Policy_Manager>::instance (ACE_TEXT ("Time_Policy_Manager")); - if (tpm == 0) + if (tpm == nullptr) { TAOLIB_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) - TAO_Default_Resource_Factory::time_policy_manager: ") @@ -724,7 +724,7 @@ TAO_Default_Resource_Factory::time_policy_manager (void) const #endif /* TAO_HAS_TIME_POLICY */ ACE_Timer_Queue * -TAO_Default_Resource_Factory::create_timer_queue (void) const +TAO_Default_Resource_Factory::create_timer_queue () const { #if (TAO_HAS_TIME_POLICY == 1) TAO_Time_Policy_Manager * tpm = this->time_policy_manager (); @@ -733,7 +733,7 @@ TAO_Default_Resource_Factory::create_timer_queue (void) const return tpm->create_timer_queue (); } #endif /* TAO_HAS_TIME_POLICY */ - return 0; + return nullptr; } void @@ -749,32 +749,32 @@ TAO_Default_Resource_Factory::destroy_timer_queue (ACE_Timer_Queue *tmq) const } ACE_Reactor_Impl* -TAO_Default_Resource_Factory::allocate_reactor_impl (void) const +TAO_Default_Resource_Factory::allocate_reactor_impl () const { - ACE_Reactor_Impl *impl = 0; + ACE_Reactor_Impl *impl = nullptr; // get a timer queue (or not) from a possibly configured // time policy TAO_RSF_Timer_Queue_Ptr tmq (*this, this->create_timer_queue ()); ACE_NEW_RETURN (impl, ACE_TP_Reactor (ACE::max_handles (), 1, - (ACE_Sig_Handler*)0, + (ACE_Sig_Handler*)nullptr, tmq.get (), this->reactor_mask_signals_, ACE_Select_Reactor_Token::LIFO), - 0); + nullptr); // safe to release timer queue tmq.release (); return impl; } ACE_Reactor * -TAO_Default_Resource_Factory::get_reactor (void) +TAO_Default_Resource_Factory::get_reactor () { - ACE_Reactor *reactor = 0; + ACE_Reactor *reactor = nullptr; ACE_NEW_RETURN (reactor, ACE_Reactor (this->allocate_reactor_impl (), 1), - 0); + nullptr); if (reactor->initialized () == 0) { @@ -782,7 +782,7 @@ TAO_Default_Resource_Factory::get_reactor (void) ACE_Timer_Queue *tmq = reactor->timer_queue (); // clean up reactor delete reactor; - reactor = 0; + reactor = nullptr; // clean up timer queue in case it was created by time policy this->destroy_timer_queue (tmq); } @@ -821,102 +821,102 @@ TAO_Default_Resource_Factory::use_local_memory_pool (bool flag) } ACE_Allocator * -TAO_Default_Resource_Factory::input_cdr_dblock_allocator (void) +TAO_Default_Resource_Factory::input_cdr_dblock_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; if (use_local_memory_pool_) { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); } else { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); } return allocator; } ACE_Allocator * -TAO_Default_Resource_Factory::input_cdr_buffer_allocator (void) +TAO_Default_Resource_Factory::input_cdr_buffer_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; if (use_local_memory_pool_) { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); } else { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); } return allocator; } ACE_Allocator * -TAO_Default_Resource_Factory::input_cdr_msgblock_allocator (void) +TAO_Default_Resource_Factory::input_cdr_msgblock_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; if (use_local_memory_pool_) { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); } else { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); } return allocator; } int -TAO_Default_Resource_Factory::input_cdr_allocator_type_locked (void) +TAO_Default_Resource_Factory::input_cdr_allocator_type_locked () { return 1; } ACE_Allocator* -TAO_Default_Resource_Factory::output_cdr_dblock_allocator (void) +TAO_Default_Resource_Factory::output_cdr_dblock_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; if (use_local_memory_pool_) { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); } else { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); } return allocator; } ACE_Allocator * -TAO_Default_Resource_Factory::output_cdr_buffer_allocator (void) +TAO_Default_Resource_Factory::output_cdr_buffer_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; switch (this->output_cdr_allocator_type_) { case LOCAL_MEMORY_POOL: ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); break; @@ -924,7 +924,7 @@ TAO_Default_Resource_Factory::output_cdr_buffer_allocator (void) case MMAP_ALLOCATOR: ACE_NEW_RETURN (allocator, TAO_MMAP_Allocator, - 0); + nullptr); break; #endif /* TAO_HAS_SENDFILE==1 */ @@ -933,7 +933,7 @@ TAO_Default_Resource_Factory::output_cdr_buffer_allocator (void) default: ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); break; } @@ -942,103 +942,103 @@ TAO_Default_Resource_Factory::output_cdr_buffer_allocator (void) } ACE_Allocator* -TAO_Default_Resource_Factory::output_cdr_msgblock_allocator (void) +TAO_Default_Resource_Factory::output_cdr_msgblock_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; if (use_local_memory_pool_) { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); } else { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); } return allocator; } ACE_Allocator* -TAO_Default_Resource_Factory::amh_response_handler_allocator (void) +TAO_Default_Resource_Factory::amh_response_handler_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; if (use_local_memory_pool_) { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); } else { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); } return allocator; } ACE_Allocator* -TAO_Default_Resource_Factory::ami_response_handler_allocator (void) +TAO_Default_Resource_Factory::ami_response_handler_allocator () { - ACE_Allocator *allocator = 0; + ACE_Allocator *allocator = nullptr; if (use_local_memory_pool_) { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_POOL, - 0); + nullptr); } else { ACE_NEW_RETURN (allocator, LOCKED_ALLOCATOR_NO_POOL, - 0); + nullptr); } return allocator; } int -TAO_Default_Resource_Factory::cache_maximum (void) const +TAO_Default_Resource_Factory::cache_maximum () const { return this->cache_maximum_; } int -TAO_Default_Resource_Factory::purge_percentage (void) const +TAO_Default_Resource_Factory::purge_percentage () const { return this->purge_percentage_; } int -TAO_Default_Resource_Factory::max_muxed_connections (void) const +TAO_Default_Resource_Factory::max_muxed_connections () const { return this->max_muxed_connections_; } ACE_Lock * -TAO_Default_Resource_Factory::create_cached_connection_lock (void) +TAO_Default_Resource_Factory::create_cached_connection_lock () { - ACE_Lock *the_lock = 0; + ACE_Lock *the_lock = nullptr; if (this->cached_connection_lock_type_ == TAO_NULL_LOCK) ACE_NEW_RETURN (the_lock, ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>, - 0); + nullptr); else ACE_NEW_RETURN (the_lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, - 0); + nullptr); return the_lock; } int -TAO_Default_Resource_Factory::locked_transport_cache (void) +TAO_Default_Resource_Factory::locked_transport_cache () { if (this->cached_connection_lock_type_ == TAO_NULL_LOCK) return 0; @@ -1047,35 +1047,35 @@ TAO_Default_Resource_Factory::locked_transport_cache (void) } TAO_Flushing_Strategy * -TAO_Default_Resource_Factory::create_flushing_strategy (void) +TAO_Default_Resource_Factory::create_flushing_strategy () { - TAO_Flushing_Strategy *strategy = 0; + TAO_Flushing_Strategy *strategy = nullptr; if (this->flushing_strategy_type_ == TAO_LEADER_FOLLOWER_FLUSHING) ACE_NEW_RETURN (strategy, TAO_Leader_Follower_Flushing_Strategy, - 0); + nullptr); else if (this->flushing_strategy_type_ == TAO_REACTIVE_FLUSHING) ACE_NEW_RETURN (strategy, TAO_Reactive_Flushing_Strategy, - 0); + nullptr); else ACE_NEW_RETURN (strategy, TAO_Block_Flushing_Strategy, - 0); + nullptr); return strategy; } TAO_Connection_Purging_Strategy * -TAO_Default_Resource_Factory::create_purging_strategy (void) +TAO_Default_Resource_Factory::create_purging_strategy () { - TAO_Connection_Purging_Strategy *strategy = 0; + TAO_Connection_Purging_Strategy *strategy = nullptr; if (this->connection_purging_type_ == TAO_Resource_Factory::LRU) { ACE_NEW_RETURN (strategy, TAO_LRU_Connection_Purging_Strategy ( this->cache_maximum ()), - 0); + nullptr); } else { @@ -1089,13 +1089,13 @@ TAO_Default_Resource_Factory::create_purging_strategy (void) } TAO_LF_Strategy * -TAO_Default_Resource_Factory::create_lf_strategy (void) +TAO_Default_Resource_Factory::create_lf_strategy () { - TAO_LF_Strategy *strategy = 0; + TAO_LF_Strategy *strategy = nullptr; ACE_NEW_RETURN (strategy, TAO_LF_Strategy_Complete, - 0); + nullptr); return strategy; } @@ -1105,7 +1105,7 @@ TAO_Default_Resource_Factory::create_fragmentation_strategy ( TAO_Transport * transport, CORBA::ULong max_message_size) const { - TAO_GIOP_Fragmentation_Strategy* strategy = 0; + TAO_GIOP_Fragmentation_Strategy* strategy = nullptr; // Minimum GIOP message size is 24 (a multiple of 8): // 12 GIOP Message Header @@ -1154,7 +1154,7 @@ TAO_Default_Resource_Factory::report_option_value_error ( } void -TAO_Default_Resource_Factory::disable_factory (void) +TAO_Default_Resource_Factory::disable_factory () { this->factory_disabled_ = 1; if (this->options_processed_) @@ -1166,29 +1166,29 @@ TAO_Default_Resource_Factory::disable_factory (void) } TAO_Codeset_Manager * -TAO_Default_Resource_Factory::codeset_manager(void) +TAO_Default_Resource_Factory::codeset_manager() { TAO_Codeset_Manager_Factory_Base *factory = ACE_Dynamic_Service<TAO_Codeset_Manager_Factory_Base>::instance ("TAO_Codeset"); - if (factory == 0) + if (factory == nullptr) { if (TAO_debug_level >= 2) TAOLIB_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - Default_Resource_Factory") ACE_TEXT (" - unable to find codeset manager factory.\n"))); - return 0; + return nullptr; } TAO_Codeset_Manager* mgr = factory->create (); - if (mgr == 0) + if (mgr == nullptr) { if (TAO_debug_level >= 2) TAOLIB_DEBUG ((LM_INFO, ACE_TEXT ("TAO (%P|%t) - Default_Resource_Factory") ACE_TEXT (" - unable to create codeset manager.\n"))); - return 0; + return nullptr; } @@ -1207,13 +1207,13 @@ TAO_Default_Resource_Factory::codeset_manager(void) } TAO_Resource_Factory::Resource_Usage -TAO_Default_Resource_Factory::resource_usage_strategy (void) const +TAO_Default_Resource_Factory::resource_usage_strategy () const { return this->resource_usage_strategy_; } bool -TAO_Default_Resource_Factory::drop_replies_during_shutdown (void) const +TAO_Default_Resource_Factory::drop_replies_during_shutdown () const { return this->drop_replies_; } diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp index b75b2cff94f..6e59dd8bb09 100644 --- a/TAO/tao/default_server.cpp +++ b/TAO/tao/default_server.cpp @@ -5,20 +5,20 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Default_Server_Strategy_Factory::TAO_Default_Server_Strategy_Factory (void) +TAO_Default_Server_Strategy_Factory::TAO_Default_Server_Strategy_Factory () : activate_server_connections_ (0), thread_flags_ (THR_BOUND | THR_DETACHED), thread_per_connection_use_timeout_ (-1) { } -TAO_Default_Server_Strategy_Factory::~TAO_Default_Server_Strategy_Factory (void) +TAO_Default_Server_Strategy_Factory::~TAO_Default_Server_Strategy_Factory () { // Perform appropriate cleanup. } int -TAO_Default_Server_Strategy_Factory::activate_server_connections (void) +TAO_Default_Server_Strategy_Factory::activate_server_connections () { return this->activate_server_connections_; } @@ -31,13 +31,13 @@ TAO_Default_Server_Strategy_Factory::thread_per_connection_timeout (ACE_Time_Val } int -TAO_Default_Server_Strategy_Factory::server_connection_thread_flags (void) +TAO_Default_Server_Strategy_Factory::server_connection_thread_flags () { return this->thread_flags_; } int -TAO_Default_Server_Strategy_Factory::server_connection_thread_count (void) +TAO_Default_Server_Strategy_Factory::server_connection_thread_count () { return 1; } @@ -52,13 +52,13 @@ TAO_Default_Server_Strategy_Factory::server_connection_thread_count (void) void TAO_Default_Server_Strategy_Factory::tokenize (ACE_TCHAR* flag_string) { - ACE_TCHAR* lasts = 0; + ACE_TCHAR* lasts = nullptr; for (ACE_TCHAR* flag = ACE_OS::strtok_r (flag_string, ACE_TEXT("|"), &lasts); - flag != 0; - flag = ACE_OS::strtok_r (0, + flag != nullptr; + flag = ACE_OS::strtok_r (nullptr, ACE_TEXT("|"), &lasts)) { @@ -145,7 +145,7 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) if (curarg < argc) this->active_object_map_creation_parameters_.active_object_map_size_ = ACE_OS::strtoul (argv[curarg], - 0, + nullptr, 10); } else if (ACE_OS::strcasecmp (argv[curarg], @@ -155,7 +155,7 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[]) if (curarg < argc) this->active_object_map_creation_parameters_.poa_map_size_ = ACE_OS::strtoul (argv[curarg], - 0, + nullptr, 10); } else if (ACE_OS::strcasecmp (argv[curarg], diff --git a/TAO/tao/operation_details.cpp b/TAO/tao/operation_details.cpp index 2c0bd86b0c1..873d7fff501 100644 --- a/TAO/tao/operation_details.cpp +++ b/TAO/tao/operation_details.cpp @@ -28,7 +28,7 @@ TAO_Operation_Details::corba_exception (const char *id) const // Create an exception object CORBA::Exception *exception = this->ex_data_[i].alloc (); - if (exception == 0) + if (exception == nullptr) { throw ::CORBA::NO_MEMORY (0, CORBA::COMPLETED_YES); } diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp index 286ea3f81c7..885cb7eaab6 100644 --- a/TAO/tao/params.cpp +++ b/TAO/tao/params.cpp @@ -16,7 +16,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_ORB_Parameters::TAO_ORB_Parameters (void) +TAO_ORB_Parameters::TAO_ORB_Parameters () : endpoints_map_ (10) , mcast_discovery_endpoint_ () , default_init_ref_ (TAO_DEFAULT_INIT_REFERENCE_INITIALIZER) @@ -291,7 +291,7 @@ TAO_ORB_Parameters::preferred_interfaces (const char *s) } const char * -TAO_ORB_Parameters::preferred_interfaces (void) const +TAO_ORB_Parameters::preferred_interfaces () const { return this->pref_network_.c_str (); } @@ -303,7 +303,7 @@ TAO_ORB_Parameters::enforce_pref_interfaces (bool p) } bool -TAO_ORB_Parameters::enforce_pref_interfaces (void) const +TAO_ORB_Parameters::enforce_pref_interfaces () const { return this->enforce_preferred_interfaces_; } @@ -353,7 +353,7 @@ TAO_ORB_Parameters::protocols_hooks_name (const char *s) } const char * -TAO_ORB_Parameters::protocols_hooks_name (void) const +TAO_ORB_Parameters::protocols_hooks_name () const { return this->protocols_hooks_name_.c_str (); } @@ -365,7 +365,7 @@ TAO_ORB_Parameters::thread_lane_resources_manager_factory_name (const char *s) } const char * -TAO_ORB_Parameters::thread_lane_resources_manager_factory_name (void) const +TAO_ORB_Parameters::thread_lane_resources_manager_factory_name () const { return this->thread_lane_resources_manager_factory_name_.c_str (); } @@ -377,7 +377,7 @@ TAO_ORB_Parameters::dynamic_thread_pool_config_name (const char *s) } const char * -TAO_ORB_Parameters::dynamic_thread_pool_config_name (void) const +TAO_ORB_Parameters::dynamic_thread_pool_config_name () const { return this->dynamic_thread_pool_config_name_.c_str (); } @@ -389,7 +389,7 @@ TAO_ORB_Parameters::stub_factory_name (const char *s) } const char * -TAO_ORB_Parameters::stub_factory_name (void) const +TAO_ORB_Parameters::stub_factory_name () const { return this->stub_factory_name_.c_str (); } @@ -401,7 +401,7 @@ TAO_ORB_Parameters::poa_factory_name (const char *s) } const char * -TAO_ORB_Parameters::poa_factory_name (void) const +TAO_ORB_Parameters::poa_factory_name () const { return this->poa_factory_name_.c_str (); } @@ -413,7 +413,7 @@ TAO_ORB_Parameters::poa_factory_directive (const ACE_TCHAR *s) } const ACE_TCHAR * -TAO_ORB_Parameters::poa_factory_directive (void) const +TAO_ORB_Parameters::poa_factory_directive () const { return this->poa_factory_directive_.c_str (); } @@ -425,19 +425,19 @@ TAO_ORB_Parameters::endpoint_selector_factory_name (const char *s) } const char * -TAO_ORB_Parameters::endpoint_selector_factory_name (void) const +TAO_ORB_Parameters::endpoint_selector_factory_name () const { return this->endpoint_selector_factory_name_.c_str (); } const TAO::Invocation_Retry_Params & -TAO_ORB_Parameters::invocation_retry_params (void) const +TAO_ORB_Parameters::invocation_retry_params () const { return this->invocation_retry_params_; } TAO::Invocation_Retry_Params & -TAO_ORB_Parameters::invocation_retry_params (void) +TAO_ORB_Parameters::invocation_retry_params () { return this->invocation_retry_params_; } |