diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-17 14:31:36 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-17 14:31:36 +0100 |
commit | a1ef42d61bc921c7e942f24583a0af6982f96a42 (patch) | |
tree | 4e47928027044d1c366b3645c9b891a2f1a712c8 /TAO | |
parent | 4094875e8a295d08a3b28971f8c4bf5cfd2d3292 (diff) | |
download | ATCD-a1ef42d61bc921c7e942f24583a0af6982f96a42.tar.gz |
Use nullptr
Diffstat (limited to 'TAO')
40 files changed, 212 insertions, 212 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp index 8f69b305b86..9a19b055f01 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Receiver.cpp @@ -145,7 +145,7 @@ TAO_ECG_CDR_Message_Receiver::Requests::init (size_t size, for (size_t i = 0; i < size; ++i) { - this->fragmented_requests_[i] = 0; + this->fragmented_requests_[i] = nullptr; } return 0; @@ -164,7 +164,7 @@ TAO_ECG_CDR_Message_Receiver::Requests::~Requests () delete [] this->fragmented_requests_; - this->fragmented_requests_ = 0; + this->fragmented_requests_ = nullptr; this->size_ = 0; this->id_range_low_ = 0; this->id_range_high_ = 0; @@ -176,7 +176,7 @@ TAO_ECG_CDR_Message_Receiver::Requests::get_request (CORBA::ULong request_id) if (request_id < this->id_range_low_) // <request_id> is below the current range. { - return 0; + return nullptr; } if (request_id > this->id_range_high_) @@ -223,7 +223,7 @@ TAO_ECG_CDR_Message_Receiver::Requests::purge_requests ( { delete this->fragmented_requests_[index]; } - this->fragmented_requests_[index] = 0; + this->fragmented_requests_[index] = nullptr; } } @@ -290,7 +290,7 @@ TAO_ECG_CDR_Message_Receiver::handle_input ( crc = ACE::crc32 (iov, 2); } // Check whether the message is a loopback message. - if (this->ignore_from_.get () != 0 + if (this->ignore_from_.get () != nullptr && this->ignore_from_->is_loopback (from)) { return 0; @@ -368,7 +368,7 @@ TAO_ECG_CDR_Message_Receiver::mark_received (const ACE_INET_Addr &from, TAO_ECG_UDP_Request_Entry ** request = entry->int_id_->get_request (request_id); - if (request == 0) + if (request == nullptr) { ORBSVCS_DEBUG ((LM_WARNING, "Received mcast request with sequence" "below currently expected range.\n")); @@ -380,7 +380,7 @@ TAO_ECG_CDR_Message_Receiver::mark_received (const ACE_INET_Addr &from, "(Request already complete).\n")); return 0; } - if (*request != 0) + if (*request != nullptr) { ORBSVCS_ERROR_RETURN ((LM_ERROR, "Inconsistent fragments for " "mcast request.\n"), @@ -407,7 +407,7 @@ TAO_ECG_CDR_Message_Receiver::process_fragment ( TAO_ECG_UDP_Request_Entry ** request = source_entry->int_id_->get_request (header.request_id); - if (request == 0) + if (request == nullptr) { ORBSVCS_DEBUG ((LM_WARNING, "Received mcast request with sequence " "below currently expected range.\n")); @@ -419,7 +419,7 @@ TAO_ECG_CDR_Message_Receiver::process_fragment ( "(Request already complete).\n")); return 0; } - if (*request == 0) + if (*request == nullptr) // Entry for this request has not yet been allocated. { ACE_NEW_RETURN (*request, @@ -479,15 +479,15 @@ TAO_ECG_CDR_Message_Receiver::Request_Map::ENTRY* TAO_ECG_CDR_Message_Receiver::get_source_entry (const ACE_INET_Addr &from) { // Get the entry for <from> from the <request_map_>. - Request_Map::ENTRY * entry = 0; + Request_Map::ENTRY * entry = nullptr; if (this->request_map_.find (from, entry) == -1) { // Create an entry if one doesn't exist. - Requests *requests = 0; + Requests *requests = nullptr; ACE_NEW_RETURN (requests, Requests, - 0); + nullptr); std::unique_ptr<Requests> requests_aptr (requests); if (requests->init (this->max_requests_, this->min_purge_count_) == -1 diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Sender.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Sender.cpp index a46244b6dfb..a218fb7f0d5 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Sender.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_CDR_Message_Sender.cpp @@ -17,7 +17,7 @@ void TAO_ECG_CDR_Message_Sender::init ( TAO_ECG_Refcounted_Endpoint endpoint_rptr) { - if (endpoint_rptr.get () == 0 + if (endpoint_rptr.get () == nullptr || endpoint_rptr->dgram ().get_handle () == ACE_INVALID_HANDLE) { ORBSVCS_ERROR ((LM_ERROR, "TAO_ECG_CDR_Message_Sender::init(): " @@ -32,7 +32,7 @@ void TAO_ECG_CDR_Message_Sender::send_message (const TAO_OutputCDR &cdr, const ACE_INET_Addr &addr) { - if (this->endpoint_rptr_.get () == 0) + if (this->endpoint_rptr_.get () == nullptr) { ORBSVCS_ERROR ((LM_ERROR, "Attempt to invoke send_message() " "on non-initialized sender object.\n")); diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Complex_Address_Server.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Complex_Address_Server.cpp index 0d52735a8f6..ed47518df5e 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_Complex_Address_Server.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Complex_Address_Server.cpp @@ -32,7 +32,7 @@ TAO_ECG_Complex_Address_Server::init (const char *arg) while (*data != '\0') { // Extract lookup value (it is followed by '@'). - const char * location = 0; + const char * location = nullptr; location = ACE_OS::strchr (data, '@'); if (!location) { @@ -49,7 +49,7 @@ TAO_ECG_Complex_Address_Server::init (const char *arg) // Extract mcast address to be mapped to just extracted lookup // value. - location = 0; + location = nullptr; location = ACE_OS::strchr (data, ' '); if (location) { @@ -90,7 +90,7 @@ TAO_ECG_Complex_Address_Server::add_entry (const char * key, } // Convert strings to values. - char * endptr = 0; + char * endptr = nullptr; CORBA::Long header_value = ACE_OS::strtol (key, &endptr, 0); if (*endptr != '\0') { @@ -131,7 +131,7 @@ TAO_ECG_Complex_Address_Server::get_addr ( else key = header.type; - MAP::ENTRY * mapping_entry = 0; + MAP::ENTRY * mapping_entry = nullptr; if (this->mcast_mapping_.find (key, mapping_entry) == -1) { // Key was not found in the mapping. Use default. @@ -164,7 +164,7 @@ TAO_ECG_Complex_Address_Server::get_address ( else key = header.type; - MAP::ENTRY * mapping_entry = 0; + MAP::ENTRY * mapping_entry = nullptr; ACE_INET_Addr &src_addr = (this->mcast_mapping_.find (key, mapping_entry) == -1) ? this->default_addr_ : mapping_entry->int_id_; diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp index fce5908ebc4..8c36dc6b44c 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp @@ -19,7 +19,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_ECG_Mcast_EH::TAO_ECG_Mcast_EH (TAO_ECG_Dgram_Handler *recv, const ACE_TCHAR *net_if, CORBA::ULong sz) - : net_if_ (net_if ? ACE_OS::strdup (net_if) : 0) + : net_if_ (net_if ? ACE_OS::strdup (net_if) : nullptr) , subscriptions_ () , receiver_ (recv) , recvbuf_size_ (sz) @@ -91,11 +91,11 @@ TAO_ECG_Mcast_EH::shutdown () if (this->observer_.in ()) { this->observer_->shutdown (); - this->observer_ = 0; + this->observer_ = nullptr; } // Indicates that we are in a shutdown state. - this->receiver_ = 0; + this->receiver_ = nullptr; // Deregister from reactor, close and clean up sockets. size_t const subscriptions_size = this->subscriptions_.size (); @@ -305,7 +305,7 @@ TAO_ECG_Mcast_EH::Observer::update_supplier ( void TAO_ECG_Mcast_EH::Observer::shutdown () { - this->eh_ = 0; + this->eh_ = nullptr; this->deactivator_.deactivate (); } diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp index 78d4be0b66c..3d8c8a8eb4c 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp @@ -149,7 +149,7 @@ TAO_ECG_Mcast_Gateway::init (int argc, ACE_TCHAR* argv[]) if (arg_shifter.is_parameter_next ()) { const ACE_TCHAR* opt = arg_shifter.get_current (); - unsigned long tmp = ACE_OS::strtoul (opt, 0, 0) & 0xff; + unsigned long tmp = ACE_OS::strtoul (opt, nullptr, 0) & 0xff; this->ttl_value_ = static_cast<u_char> (tmp); arg_shifter.consume_arg (); } @@ -282,14 +282,14 @@ TAO_ECG_Mcast_Gateway::validate_configuration () TAO_ECG_Refcounted_Endpoint TAO_ECG_Mcast_Gateway::init_endpoint () { - TAO_ECG_UDP_Out_Endpoint* endpoint = 0; + TAO_ECG_UDP_Out_Endpoint* endpoint = nullptr; TAO_ECG_Refcounted_Endpoint refendpoint; // Try to allocate a new endpoint from the heap ACE_NEW_NORETURN (endpoint, TAO_ECG_UDP_Out_Endpoint); - if (endpoint != 0) + if (endpoint != nullptr) { refendpoint.reset (endpoint); } @@ -355,18 +355,18 @@ TAO_ECG_Mcast_Gateway::init_address_server () { const char * address_server_arg = (this->address_server_arg_.length ()) - ? this->address_server_arg_.c_str () : 0; + ? this->address_server_arg_.c_str () : nullptr; if (this->address_server_type_ == ECG_ADDRESS_SERVER_BASIC) { PortableServer::Servant_var<TAO_ECG_Simple_Address_Server> impl = TAO_ECG_Simple_Address_Server::create (); if (!impl.in ()) - return 0; + return nullptr; if (impl->init (address_server_arg) == -1) { - return 0; + return nullptr; } return impl._retn (); } @@ -376,11 +376,11 @@ TAO_ECG_Mcast_Gateway::init_address_server () PortableServer::Servant_var<TAO_ECG_Complex_Address_Server> impl = TAO_ECG_Complex_Address_Server::create (1); if (!impl.in ()) - return 0; + return nullptr; if (impl->init (address_server_arg) == -1) { - return 0; + return nullptr; } return impl._retn (); } @@ -390,11 +390,11 @@ TAO_ECG_Mcast_Gateway::init_address_server () PortableServer::Servant_var<TAO_ECG_Complex_Address_Server> impl = TAO_ECG_Complex_Address_Server::create (0); if (!impl.in ()) - return 0; + return nullptr; if (impl->init (address_server_arg) == -1) { - return 0; + return nullptr; } return impl._retn (); } @@ -404,7 +404,7 @@ TAO_ECG_Mcast_Gateway::init_address_server () ORBSVCS_ERROR ((LM_ERROR, "Cannot create address server: " "unknown address server type specified.\n")); - return 0; + return nullptr; } } @@ -416,14 +416,14 @@ TAO_ECG_Mcast_Gateway::init_handler (TAO_ECG_Dgram_Handler *receiver, TAO_ECG_Refcounted_Handler handler; const ACE_TCHAR * nic = - (this->nic_.length ()) ? this->nic_.c_str () : 0; + (this->nic_.length ()) ? this->nic_.c_str () : nullptr; const char * address_server_arg = (this->address_server_arg_.length ()) - ? this->address_server_arg_.c_str () : 0; + ? this->address_server_arg_.c_str () : nullptr; if (this->handler_type_ == ECG_HANDLER_BASIC) { - TAO_ECG_Simple_Mcast_EH * h = 0; + TAO_ECG_Simple_Mcast_EH * h = nullptr; ACE_NEW_RETURN (h, TAO_ECG_Simple_Mcast_EH (receiver), handler); @@ -436,7 +436,7 @@ TAO_ECG_Mcast_Gateway::init_handler (TAO_ECG_Dgram_Handler *receiver, else if (this->handler_type_ == ECG_HANDLER_COMPLEX) { - TAO_ECG_Mcast_EH * h = 0; + TAO_ECG_Mcast_EH * h = nullptr; ACE_NEW_RETURN (h, TAO_ECG_Mcast_EH (receiver, nic), handler); @@ -449,7 +449,7 @@ TAO_ECG_Mcast_Gateway::init_handler (TAO_ECG_Dgram_Handler *receiver, else if (this->handler_type_ == ECG_HANDLER_UDP) { - TAO_ECG_UDP_EH * h = 0; + TAO_ECG_UDP_EH * h = nullptr; ACE_NEW_RETURN (h, TAO_ECG_UDP_EH (receiver), handler); @@ -614,7 +614,7 @@ TAO_ECG_Mcast_Gateway::run (CORBA::ORB_ptr orb, || this->service_type_ == ECG_MCAST_TWO_WAY) { endpoint_rptr = this->init_endpoint (); - if (endpoint_rptr.get () == 0) + if (endpoint_rptr.get () == nullptr) { throw CORBA::INTERNAL (); } @@ -651,7 +651,7 @@ TAO_ECG_Mcast_Gateway::run (CORBA::ORB_ptr orb, handler_rptr (this->init_handler (receiver.in (), ec, reactor)); - if (handler_rptr.get () == 0) + if (handler_rptr.get () == nullptr) { throw CORBA::INTERNAL (); } diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp index a72497a0d44..04b881ae603 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp @@ -134,7 +134,7 @@ TAO_ECG_Reactive_ConsumerEC_Control::activate () // handle_timeout uses these policies, if done in front, the channel // can crash when the timeout expires before initiazation is ready. timer_id_ = this->reactor_->schedule_timer (&this->adapter_, - 0, + nullptr, this->rate_, this->rate_); if (timer_id_ == -1) @@ -159,7 +159,7 @@ TAO_ECG_Reactive_ConsumerEC_Control::shutdown () r = this->reactor_->cancel_timer (timer_id_); #endif /* TAO_HAS_CORBA_MESSAGING */ - this->adapter_.reactor (0); + this->adapter_.reactor (nullptr); return r; } diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp index 272b215efc9..018b710de09 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp @@ -173,7 +173,7 @@ TAO_ECG_Reconnect_ConsumerEC_Control::activate () // handle_timeout uses these policies, if done in front, the channel // can crash when the timeout expires before initiazation is ready. timer_id_ = this->reactor_->schedule_timer (&this->adapter_, - 0, + nullptr, this->rate_, this->rate_); if (timer_id_ == -1) @@ -198,7 +198,7 @@ TAO_ECG_Reconnect_ConsumerEC_Control::shutdown () r = this->reactor_->cancel_timer (timer_id_); #endif /* TAO_HAS_CORBA_MESSAGING */ - this->adapter_.reactor (0); + this->adapter_.reactor (nullptr); return r; } diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Simple_Mcast_EH.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Simple_Mcast_EH.cpp index b671a21d7c0..2e35302a66a 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_Simple_Mcast_EH.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Simple_Mcast_EH.cpp @@ -23,7 +23,7 @@ TAO_ECG_Simple_Mcast_EH::open (const char * mcast_addr, if (!this->receiver_) return -1; - if (mcast_addr == 0) + if (mcast_addr == nullptr) return -1; ACE_INET_Addr mcast_group; @@ -82,7 +82,7 @@ TAO_ECG_Simple_Mcast_EH::shutdown () "Unable to close mcast receiving dgram " "on shutdown.\n")); - this->receiver_ = 0; + this->receiver_ = nullptr; return result; } diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_EH.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_EH.cpp index 53d96374eb8..49ff6f35ecf 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_EH.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_EH.cpp @@ -72,7 +72,7 @@ TAO_ECG_UDP_EH::shutdown () ORBSVCS_ERROR ((LM_ERROR, "Unable to close receiving dgram on shutdown.\n")); - this->receiver_ = 0; + this->receiver_ = nullptr; return result; } diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp index a00410750a6..6f238efb3c1 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Out_Endpoint.cpp @@ -36,7 +36,7 @@ TAO_ECG_UDP_Out_Endpoint::is_loopback (const ACE_INET_Addr& from) if (from.get_port_number () != this->port_number_) return false; - if (this->ifs_ == 0) + if (this->ifs_ == nullptr) { ACE::get_ip_interfaces (this->if_count_, this->ifs_); } @@ -62,7 +62,7 @@ TAO_ECG_UDP_Out_Endpoint::operator= (const TAO_ECG_UDP_Out_Endpoint& rhs) this->if_count_ = rhs.if_count_; delete [] this->ifs_; - this->ifs_ = 0; + this->ifs_ = nullptr; if (this->if_count_ != 0) { diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.cpp index 10d6b5aa22d..0e9b80f7c7d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_And_Filter.cpp @@ -24,10 +24,10 @@ TAO_EC_And_Filter::~TAO_EC_And_Filter () ++i) { delete *i; - *i = 0; + *i = nullptr; } delete[] this->children_; - this->children_ = 0; + this->children_ = nullptr; this->n_ = 0; } @@ -62,7 +62,7 @@ TAO_EC_And_Filter::filter (const RtecEventComm::EventSet& event, } // All children accepted the event, push up... - if (this->parent () != 0) + if (this->parent () != nullptr) { this->parent ()->push (event, qos_info); } @@ -83,7 +83,7 @@ TAO_EC_And_Filter::filter_nocopy (RtecEventComm::EventSet& event, } // All children accepted the event, push up... - if (this->parent () != 0) + if (this->parent () != nullptr) { this->parent ()->push (event, qos_info); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp index fb9914cc01f..5409f0b4406 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp @@ -116,7 +116,7 @@ TAO_EC_Timeout_Generator* TAO_EC_Basic_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); ACE_Reactor *reactor = orb->orb_core ()->reactor (); @@ -133,7 +133,7 @@ TAO_EC_ObserverStrategy* TAO_EC_Basic_Factory::create_observer_strategy (TAO_EC_Event_Channel_Base *ec) { ACE_Lock* lock; - ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, 0); + ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, nullptr); return new TAO_EC_Basic_ObserverStrategy (ec, lock); } @@ -221,7 +221,7 @@ TAO_EC_ConsumerControl* TAO_EC_Basic_Factory::create_consumer_control (TAO_EC_Event_Channel_Base* ec) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); // Hard-coded rate to 10 times a second @@ -241,7 +241,7 @@ TAO_EC_SupplierControl* TAO_EC_Basic_Factory::create_supplier_control (TAO_EC_Event_Channel_Base* ec) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); // Hard-coded rate to 10 times a second diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp index 10b8410bc22..71b45942b78 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp @@ -36,7 +36,7 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( { CORBA::ULong l = qos.dependencies.length (); if (pos == l) - return 0; + return nullptr; const RtecEventComm::Event& e = qos.dependencies[pos].event; if (e.header.type == ACE_ES_CONJUNCTION_DESIGNATOR) @@ -45,7 +45,7 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( CORBA::ULong n = this->count_children (qos, pos); TAO_EC_Filter** children; - ACE_NEW_RETURN (children, TAO_EC_Filter*[n], 0); + ACE_NEW_RETURN (children, TAO_EC_Filter*[n], nullptr); CORBA::ULong i = 0; for (; i != n; ++i) { @@ -59,7 +59,7 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( CORBA::ULong n = this->count_children (qos, pos); TAO_EC_Filter** children; - ACE_NEW_RETURN (children, TAO_EC_Filter*[n], 0); + ACE_NEW_RETURN (children, TAO_EC_Filter*[n], nullptr); CORBA::ULong i = 0; for (; i != n; ++i) { @@ -73,7 +73,7 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( CORBA::ULong n = this->count_children (qos, pos); TAO_EC_Filter** children; - ACE_NEW_RETURN (children, TAO_EC_Filter*[n], 0); + ACE_NEW_RETURN (children, TAO_EC_Filter*[n], nullptr); CORBA::ULong i = 0; for (; i != n; ++i) { @@ -94,7 +94,7 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( pos++; // COnsumer the designator if (pos == qos.dependencies.length ()) - return 0; + return nullptr; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; pos++; @@ -110,13 +110,13 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( pos++; // Consume the designator if (pos == qos.dependencies.length ()) - return 0; + return nullptr; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; pos++; if (pos == qos.dependencies.length ()) - return 0; + return nullptr; CORBA::ULong source_value = qos.dependencies[pos].event.header.source; CORBA::ULong type_value = qos.dependencies[pos].event.header.type; pos++; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp index 4cb7ed15ba9..1ddeaefc8d4 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp @@ -67,7 +67,7 @@ void TAO_EC_Bitmask_Filter::push (const RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push (event, qos_info); } @@ -75,7 +75,7 @@ void TAO_EC_Bitmask_Filter::push_nocopy (RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push_nocopy (event, qos_info); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp index 3ea1df0215e..3a42c815221 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp @@ -32,14 +32,14 @@ TAO_EC_Conjunction_Filter::~TAO_EC_Conjunction_Filter () ++i) { delete *i; - *i = 0; + *i = nullptr; } delete[] this->children_; - this->children_ = 0; + this->children_ = nullptr; this->n_ = 0; delete[] this->bitvec_; - this->bitvec_ = 0; + this->bitvec_ = nullptr; } int @@ -123,7 +123,7 @@ TAO_EC_Conjunction_Filter::push (const RtecEventComm::EventSet& event, { this->event_[l + i] = event[i]; } - if (this->all_received () && this->parent () != 0) + if (this->all_received () && this->parent () != nullptr) this->parent ()->push_nocopy (this->event_, qos_info); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp index f9e9063c993..175617bb25d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp @@ -106,16 +106,16 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[]) // need to parse the flags...ugh ACE_TCHAR* opt = ACE_OS::strdup (s); - ACE_TCHAR* aux = 0; + ACE_TCHAR* aux = nullptr; ACE_TCHAR* flags = ACE_OS::strtok_r (opt, ACE_TEXT (":"), &aux); TAO_EC_Thread_Flags tf(ACE_TEXT_ALWAYS_CHAR (flags)); // parse and set up this->dispatching_threads_flags_ = tf.flags (); - ACE_TCHAR* arg = ACE_OS::strtok_r (0, ACE_TEXT(":"), &aux); + ACE_TCHAR* arg = ACE_OS::strtok_r (nullptr, ACE_TEXT(":"), &aux); if (arg) { - long prio = ACE_OS::strtol (arg, 0, 0); + long prio = ACE_OS::strtol (arg, nullptr, 0); this->dispatching_threads_priority_ = prio; } @@ -244,8 +244,8 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[]) ACE_TCHAR* aux; for (ACE_TCHAR* arg = ACE_OS::strtok_r (opt, ACE_TEXT(":"), &aux); - arg != 0; - arg = ACE_OS::strtok_r (0, ACE_TEXT(":"), &aux)) + arg != nullptr; + arg = ACE_OS::strtok_r (nullptr, ACE_TEXT(":"), &aux)) { if (ACE_OS::strcasecmp (arg, ACE_TEXT("mt")) == 0) synch_type = 0; @@ -289,8 +289,8 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[]) ACE_TCHAR* aux; for (ACE_TCHAR* arg = ACE_OS::strtok_r (opt, ACE_TEXT(":"), &aux); - arg != 0; - arg = ACE_OS::strtok_r (0, ACE_TEXT(":"), &aux)) + arg != nullptr; + arg = ACE_OS::strtok_r (nullptr, ACE_TEXT(":"), &aux)) { if (ACE_OS::strcasecmp (arg, ACE_TEXT("mt")) == 0) synch_type = 0; @@ -435,7 +435,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[]) if (arg_shifter.is_parameter_next ()) { const ACE_TCHAR* opt = arg_shifter.get_current (); - unsigned long timeout = ACE_OS::strtoul(opt, 0, 10); + unsigned long timeout = ACE_OS::strtoul(opt, nullptr, 10); this->consumer_control_timeout_.usec(timeout); arg_shifter.consume_arg (); } @@ -448,7 +448,7 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[]) if (arg_shifter.is_parameter_next ()) { const ACE_TCHAR* opt = arg_shifter.get_current (); - unsigned long timeout = ACE_OS::strtoul(opt, 0, 10); + unsigned long timeout = ACE_OS::strtoul(opt, nullptr, 10); this->supplier_control_timeout_.usec(timeout); arg_shifter.consume_arg (); } @@ -509,9 +509,9 @@ TAO_EC_Queue_Full_Service_Object* TAO_EC_Default_Factory::find_service_object (const ACE_TCHAR* wanted, const ACE_TCHAR* fallback) { - TAO_EC_Queue_Full_Service_Object* so = 0; + TAO_EC_Queue_Full_Service_Object* so = nullptr; so = ACE_Dynamic_Service<TAO_EC_Queue_Full_Service_Object>::instance (wanted); - if (so != 0) + if (so != nullptr) return so; ORBSVCS_ERROR ((LM_ERROR, @@ -522,7 +522,7 @@ TAO_EC_Default_Factory::find_service_object (const ACE_TCHAR* wanted, fallback)); so = ACE_Dynamic_Service<TAO_EC_Queue_Full_Service_Object>::instance (fallback); - if (so != 0) + if (so != nullptr) return so; ORBSVCS_ERROR ((LM_ERROR, @@ -531,7 +531,7 @@ TAO_EC_Default_Factory::find_service_object (const ACE_TCHAR* wanted, "aborting.\n", fallback)); ACE_OS::abort (); - return 0; // superfluous return to de-warn; we should never reach here + return nullptr; // superfluous return to de-warn; we should never reach here } TAO_EC_Dispatching* @@ -550,7 +550,7 @@ TAO_EC_Default_Factory::create_dispatching (TAO_EC_Event_Channel_Base *) this->dispatching_threads_force_active_, so); } - return 0; + return nullptr; } void @@ -568,7 +568,7 @@ TAO_EC_Default_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *ec) return new TAO_EC_Basic_Filter_Builder (ec); else if (this->filtering_ == 2) return new TAO_EC_Prefix_Filter_Builder (ec); - return 0; + return nullptr; } void @@ -584,7 +584,7 @@ TAO_EC_Default_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel_Bas return new TAO_EC_Trivial_Supplier_Filter_Builder (ec); else if (this->supplier_filtering_ == 1) return new TAO_EC_Per_Supplier_Filter_Builder (ec); - return 0; + return nullptr; } void @@ -647,7 +647,7 @@ TAO_EC_Default_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *) if (this->timeout_ == 0) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); @@ -659,7 +659,7 @@ TAO_EC_Default_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *) { } #endif - return 0; + return nullptr; } void @@ -676,18 +676,18 @@ TAO_EC_Default_Factory::create_observer_strategy (TAO_EC_Event_Channel_Base *ec) else if (this->observer_ == 1) { // @@ The lock should also be under control of the user... - ACE_Lock* lock = 0; - ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, 0); + ACE_Lock* lock = nullptr; + ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, nullptr); return new TAO_EC_Basic_ObserverStrategy (ec, lock); } else if (this->observer_ == 2) { // @@ The lock should also be under control of the user... - ACE_Lock* lock = 0; - ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, 0); + ACE_Lock* lock = nullptr; + ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, nullptr); return new TAO_EC_Reactive_ObserverStrategy (ec, lock); } - return 0; + return nullptr; } void @@ -703,7 +703,7 @@ TAO_EC_Default_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base*) return new TAO_EC_Null_Scheduling; else if (this->scheduling_ == 1) return new TAO_EC_Group_Scheduling; - return 0; + return nullptr; } void @@ -811,7 +811,7 @@ TAO_EC_Default_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Chan TAO_EC_Consumer_RB_Tree_Iterator, ACE_NULL_SYNCH> (); - return 0; + return nullptr; } void @@ -904,7 +904,7 @@ TAO_EC_Default_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Chan TAO_EC_Supplier_RB_Tree_Iterator, ACE_NULL_SYNCH> (); - return 0; + return nullptr; } void @@ -922,7 +922,7 @@ TAO_EC_Default_Factory::create_consumer_lock () return new ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (); else if (this->consumer_lock_ == 2) return new ACE_Lock_Adapter<TAO_SYNCH_RECURSIVE_MUTEX> (); - return 0; + return nullptr; } void @@ -940,7 +940,7 @@ TAO_EC_Default_Factory::create_supplier_lock () return new ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (); else if (this->supplier_lock_ == 2) return new ACE_Lock_Adapter<TAO_SYNCH_RECURSIVE_MUTEX> (); - return 0; + return nullptr; } void @@ -957,14 +957,14 @@ TAO_EC_Default_Factory::create_consumer_control (TAO_EC_Event_Channel_Base* ec) else if (this->consumer_control_ == 1) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); ACE_Time_Value rate (0, this->consumer_control_period_); return new TAO_EC_Reactive_ConsumerControl (rate, consumer_control_timeout_, ec, orb.in ()); } - return 0; + return nullptr; } void @@ -981,14 +981,14 @@ TAO_EC_Default_Factory::create_supplier_control (TAO_EC_Event_Channel_Base* ec) else if (this->supplier_control_ == 1) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); ACE_Time_Value rate (0, this->supplier_control_period_); return new TAO_EC_Reactive_SupplierControl (rate, supplier_control_timeout_, ec, orb.in ()); } - return 0; + return nullptr; } void diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Disjunction_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Disjunction_Filter.cpp index 9d036908440..1cf257b54d6 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Disjunction_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Disjunction_Filter.cpp @@ -25,10 +25,10 @@ TAO_EC_Disjunction_Filter::~TAO_EC_Disjunction_Filter () ++i) { delete *i; - *i = 0; + *i = nullptr; } delete[] this->children_; - this->children_ = 0; + this->children_ = nullptr; this->n_ = 0; } @@ -86,7 +86,7 @@ void TAO_EC_Disjunction_Filter::push (const RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push (event, qos_info); } @@ -94,7 +94,7 @@ void TAO_EC_Disjunction_Filter::push_nocopy (RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push_nocopy (event, qos_info); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.cpp index 3e8cd26ef17..cb0c08c2b34 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.cpp @@ -99,7 +99,7 @@ TAO_EC_Dispatching_Task::svc () { try { - ACE_Message_Block *mb = 0; + ACE_Message_Block *mb = nullptr; if (this->getq (mb) == -1) { @@ -117,7 +117,7 @@ TAO_EC_Dispatching_Task::svc () TAO_EC_Dispatch_Command *command = dynamic_cast<TAO_EC_Dispatch_Command*> (mb); - if (command == 0) + if (command == nullptr) { ACE_Message_Block::release (mb); continue; @@ -148,7 +148,7 @@ TAO_EC_Dispatching_Task::push (TAO_EC_ProxyPushSupplier *proxy, { if (this->msg_queue()->is_full ()) { - if (0 != this->queue_full_service_object_) + if (nullptr != this->queue_full_service_object_) { int action = this->queue_full_service_object_->queue_full_action (this, proxy, @@ -161,12 +161,12 @@ TAO_EC_Dispatching_Task::push (TAO_EC_ProxyPushSupplier *proxy, // else go ahead and queue it } - if (this->allocator_ == 0) + if (this->allocator_ == nullptr) this->allocator_ = ACE_Allocator::instance (); void* buf = this->allocator_->malloc (sizeof (TAO_EC_Push_Command)); - if (buf == 0) + if (buf == nullptr) throw CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO); ACE_Message_Block *mb = diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp index 799f234f402..7eeeaf02ce8 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp @@ -10,15 +10,15 @@ TAO_EC_Event_Channel (const TAO_EC_Event_Channel_Attributes& attr, int own_factory) : TAO_EC_Event_Channel_Base (attr, factory, own_factory) { - if (this->factory () == 0) + if (this->factory () == nullptr) { this->factory ( ACE_Dynamic_Service<TAO_EC_Factory>::instance ("EC_Factory"), 0); - if (this->factory () == 0) + if (this->factory () == nullptr) { - TAO_EC_Factory *f = 0; + TAO_EC_Factory *f = nullptr; ACE_NEW (f, TAO_EC_Default_Factory); this->factory (f, 1); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp index c392ccf3ac7..553ebe51701 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp @@ -22,19 +22,19 @@ TAO_EC_Event_Channel_Base (const TAO_EC_Event_Channel_Attributes& attr, consumer_poa_ (PortableServer::POA::_duplicate (attr.consumer_poa)), factory_ (factory), own_factory_ (own_factory), - dispatching_ (0), - filter_builder_ (0), - supplier_filter_builder_ (0), - consumer_admin_ (0), - supplier_admin_ (0), - timeout_generator_ (0), - observer_strategy_ (0), - scheduling_strategy_(0), + dispatching_ (nullptr), + filter_builder_ (nullptr), + supplier_filter_builder_ (nullptr), + consumer_admin_ (nullptr), + supplier_admin_ (nullptr), + timeout_generator_ (nullptr), + observer_strategy_ (nullptr), + scheduling_strategy_(nullptr), consumer_reconnect_ (attr.consumer_reconnect), supplier_reconnect_ (attr.supplier_reconnect), disconnect_callbacks_ (attr.disconnect_callbacks), - consumer_control_ (0), - supplier_control_ (0), + consumer_control_ (nullptr), + supplier_control_ (nullptr), status_ (EC_S_IDLE) { this->scheduler_ = @@ -47,34 +47,34 @@ TAO_EC_Event_Channel_Base::~TAO_EC_Event_Channel_Base () // reference to each other during destruction and thus need to be // cleaned up properly. this->factory_->destroy_supplier_control (this->supplier_control_); - this->supplier_control_ = 0; + this->supplier_control_ = nullptr; this->factory_->destroy_consumer_control (this->consumer_control_); - this->consumer_control_ = 0; + this->consumer_control_ = nullptr; this->factory_->destroy_scheduling_strategy (this->scheduling_strategy_); - this->scheduling_strategy_ = 0; + this->scheduling_strategy_ = nullptr; this->factory_->destroy_observer_strategy (this->observer_strategy_); - this->observer_strategy_ = 0; + this->observer_strategy_ = nullptr; this->factory_->destroy_timeout_generator (this->timeout_generator_); - this->timeout_generator_ = 0; + this->timeout_generator_ = nullptr; this->factory_->destroy_supplier_admin (this->supplier_admin_); - this->supplier_admin_ = 0; + this->supplier_admin_ = nullptr; this->factory_->destroy_consumer_admin (this->consumer_admin_); - this->consumer_admin_ = 0; + this->consumer_admin_ = nullptr; this->factory_->destroy_supplier_filter_builder (this->supplier_filter_builder_); - this->supplier_filter_builder_ = 0; + this->supplier_filter_builder_ = nullptr; this->factory_->destroy_filter_builder (this->filter_builder_); - this->filter_builder_ = 0; + this->filter_builder_ = nullptr; this->factory_->destroy_dispatching (this->dispatching_); - this->dispatching_ = 0; + this->dispatching_ = nullptr; - this->factory (0, this->own_factory_); + this->factory (nullptr, this->own_factory_); } void diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Filter.cpp index 4861e5e00d6..5a845583713 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Filter.cpp @@ -22,13 +22,13 @@ TAO_EC_Filter::adopt_child (TAO_EC_Filter* child) TAO_EC_Filter::ChildrenIterator TAO_EC_Filter::begin () const { - return 0; + return nullptr; } TAO_EC_Filter::ChildrenIterator TAO_EC_Filter::end () const { - return 0; + return nullptr; } int @@ -70,7 +70,7 @@ void TAO_EC_Null_Filter::push (const RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push (event, qos_info); } @@ -78,7 +78,7 @@ void TAO_EC_Null_Filter::push_nocopy (RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push_nocopy (event, qos_info); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp index 8e979dfbd67..34fa23a0e7a 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp @@ -22,26 +22,26 @@ TAO_EC_Gateway_IIOP::TAO_EC_Gateway_IIOP () consumer_is_active_ (false), supplier_ (this), supplier_is_active_ (false), - ec_control_ (0), - factory_ (0), + ec_control_ (nullptr), + factory_ (nullptr), use_ttl_ (1), use_consumer_proxy_map_ (1) { - if (this->factory_ == 0) + if (this->factory_ == nullptr) { this->factory_ = ACE_Dynamic_Service<TAO_EC_Gateway_IIOP_Factory>::instance ("EC_Gateway_IIOP_Factory"); - if (this->factory_ == 0) + if (this->factory_ == nullptr) { - TAO_EC_Gateway_IIOP_Factory *f = 0; + TAO_EC_Gateway_IIOP_Factory *f = nullptr; ACE_NEW (f, TAO_EC_Gateway_IIOP_Factory); this->factory_ = f; } } - if (this->factory_ != 0) + if (this->factory_ != nullptr) { this->use_ttl_ = this->factory_->use_ttl(); this->use_consumer_proxy_map_ = this->factory_->use_consumer_proxy_map(); @@ -51,7 +51,7 @@ TAO_EC_Gateway_IIOP::TAO_EC_Gateway_IIOP () TAO_EC_Gateway_IIOP::~TAO_EC_Gateway_IIOP () { delete ec_control_; - ec_control_ = 0; + ec_control_ = nullptr; } int @@ -74,7 +74,7 @@ TAO_EC_Gateway_IIOP::init_i (RtecEventChannelAdmin::EventChannel_ptr supplier_ec this->consumer_ec_ = RtecEventChannelAdmin::EventChannel::_duplicate (consumer_ec); - if (ec_control_ == 0) + if (ec_control_ == nullptr) { ec_control_ = factory_->create_consumerec_control(this); ec_control_->activate(); @@ -262,7 +262,7 @@ TAO_EC_Gateway_IIOP::open_i ( { sub.dependencies[i].rt_info = this->supplier_info_; - RtecEventChannelAdmin::ProxyPushConsumer_ptr proxy = 0; + RtecEventChannelAdmin::ProxyPushConsumer_ptr proxy = nullptr; const RtecEventComm::EventHeader &h = sub.dependencies[i].event.header; @@ -466,7 +466,7 @@ TAO_EC_Gateway_IIOP::push (const RtecEventComm::EventSet &events) continue; } - RtecEventChannelAdmin::ProxyPushConsumer_ptr proxy = 0; + RtecEventChannelAdmin::ProxyPushConsumer_ptr proxy = nullptr; RtecEventComm::EventSourceID sid = events[i].header.source; if (sid == ACE_ES_EVENT_SOURCE_ANY || this->use_consumer_proxy_map_ == 0 || this->consumer_proxy_map_.find (sid, proxy) == -1) diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP_Factory.cpp index 3a6b062ce0f..f5a486ffc2c 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP_Factory.cpp @@ -95,7 +95,7 @@ TAO_EC_Gateway_IIOP_Factory::init (int argc, ACE_TCHAR* argv[]) if (arg_shifter.is_parameter_next ()) { const ACE_TCHAR* opt = arg_shifter.get_current (); - unsigned long timeout = ACE_OS::strtoul(opt, 0, 10); + unsigned long timeout = ACE_OS::strtoul(opt, nullptr, 10); this->consumer_ec_control_timeout_.usec(timeout); arg_shifter.consume_arg (); } @@ -171,7 +171,7 @@ TAO_EC_Gateway_IIOP_Factory::create_consumerec_control (TAO_EC_Gateway_IIOP* gat else if (this->consumer_ec_control_ == 1) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); ACE_Time_Value rate (0, this->consumer_ec_control_period_); @@ -180,13 +180,13 @@ TAO_EC_Gateway_IIOP_Factory::create_consumerec_control (TAO_EC_Gateway_IIOP* gat else if (this->consumer_ec_control_ == 2) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); ACE_Time_Value rate (0, this->consumer_ec_control_period_); return new TAO_ECG_Reconnect_ConsumerEC_Control (rate, consumer_ec_control_timeout_, gateway, orb.in ()); } - return 0; + return nullptr; } void diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.cpp index e112189d97c..0aabbbc08bc 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_MT_Dispatching.cpp @@ -15,7 +15,7 @@ TAO_EC_MT_Dispatching::TAO_EC_MT_Dispatching (int nthreads, thread_creation_flags_ (thread_creation_flags), thread_priority_ (thread_priority), force_activate_ (force_activate), - task_(0, service_object), + task_(nullptr, service_object), active_ (0) { this->task_.open (&this->thread_manager_); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp index 8b0c0053fd4..249dbb9e7ee 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp @@ -23,13 +23,13 @@ TAO_EC_Masked_Type_Filter::~TAO_EC_Masked_Type_Filter () TAO_EC_Filter::ChildrenIterator TAO_EC_Masked_Type_Filter::begin () const { - return 0; + return nullptr; } TAO_EC_Filter::ChildrenIterator TAO_EC_Masked_Type_Filter::end () const { - return 0; + return nullptr; } int @@ -49,7 +49,7 @@ TAO_EC_Masked_Type_Filter::filter (const RtecEventComm::EventSet& event, || (event[0].header.source & this->source_mask_) != this->source_value_) return 0; - if (this->parent () != 0) + if (this->parent () != nullptr) { this->parent ()->push (event, qos_info); } @@ -67,7 +67,7 @@ TAO_EC_Masked_Type_Filter::filter_nocopy (RtecEventComm::EventSet& event, || (event[0].header.source & this->source_mask_) != this->source_value_) return 0; - if (this->parent () != 0) + if (this->parent () != nullptr) { this->parent ()->push_nocopy (event, qos_info); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Negation_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Negation_Filter.cpp index 6e93808d5e5..a64fc8b06f1 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Negation_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Negation_Filter.cpp @@ -39,7 +39,7 @@ TAO_EC_Negation_Filter::filter (const RtecEventComm::EventSet& event, { int n = this->child_->filter (event, qos_info); - if (this->parent () != 0 && n == 0) + if (this->parent () != nullptr && n == 0) { this->parent ()->push (event, qos_info); return 1; @@ -53,7 +53,7 @@ TAO_EC_Negation_Filter::filter_nocopy (RtecEventComm::EventSet& event, { int n = this->child_->filter_nocopy (event, qos_info); - if (this->parent () != 0 && n == 0) + if (this->parent () != nullptr && n == 0) { this->parent ()->push_nocopy (event, qos_info); return 1; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp index 3ec46436444..8bc8ff7eab4 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Factory.cpp @@ -117,7 +117,7 @@ TAO_EC_Timeout_Generator* TAO_EC_Null_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *) { int argc = 0; - ACE_TCHAR **argv = 0; + ACE_TCHAR **argv = nullptr; CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); ACE_Reactor *reactor = orb->orb_core ()->reactor (); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp index 8d4f163f452..8b11a9dd746 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp @@ -58,7 +58,7 @@ TAO_EC_Null_ObserverStrategy::disconnected (TAO_EC_ProxyPushSupplier*) TAO_EC_Basic_ObserverStrategy::~TAO_EC_Basic_ObserverStrategy () { delete this->lock_; - this->lock_ = 0; + this->lock_ = nullptr; } RtecEventChannelAdmin::Observer_Handle @@ -109,7 +109,7 @@ TAO_EC_Basic_ObserverStrategy::create_observer_list ( RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR()); int size = static_cast<int> (this->observers_.current_size ()); - RtecEventChannelAdmin::Observer_var *tmp = 0; + RtecEventChannelAdmin::Observer_var *tmp = nullptr; ACE_NEW_RETURN (tmp, RtecEventChannelAdmin::Observer_var[size], 0); @@ -154,7 +154,7 @@ TAO_EC_Basic_ObserverStrategy::supplier_qos_update ( RtecEventChannelAdmin::SupplierQOS s_qos; this->fill_qos (s_qos); - RtecEventChannelAdmin::Observer_var *tmp = 0; + RtecEventChannelAdmin::Observer_var *tmp = nullptr; int size = this->create_observer_list (tmp); ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy (tmp); @@ -196,7 +196,7 @@ TAO_EC_Basic_ObserverStrategy::consumer_qos_update ( RtecEventChannelAdmin::ConsumerQOS c_qos; this->fill_qos (c_qos); - RtecEventChannelAdmin::Observer_var *tmp = 0; + RtecEventChannelAdmin::Observer_var *tmp = nullptr; int size = this->create_observer_list (tmp); ACE_Auto_Basic_Array_Ptr<RtecEventChannelAdmin::Observer_var> copy (tmp); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp index aeecbe8e85c..74b29ea94cf 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp @@ -20,7 +20,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_EC_Per_Supplier_Filter:: TAO_EC_Per_Supplier_Filter (TAO_EC_Event_Channel_Base* ec) : event_channel_ (ec), - consumer_ (0), + consumer_ (nullptr), refcnt_ (1) { this->event_channel_->create_proxy_collection (this->collection_); @@ -29,7 +29,7 @@ TAO_EC_Per_Supplier_Filter:: TAO_EC_Per_Supplier_Filter::~TAO_EC_Per_Supplier_Filter () { this->event_channel_->destroy_proxy_collection (this->collection_); - this->collection_ = 0; + this->collection_ = nullptr; } void @@ -37,7 +37,7 @@ TAO_EC_Per_Supplier_Filter::bind (TAO_EC_ProxyPushConsumer* consumer) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); - if (this->consumer_ == 0) + if (this->consumer_ == nullptr) { this->consumer_ = consumer; } @@ -48,10 +48,10 @@ TAO_EC_Per_Supplier_Filter::unbind (TAO_EC_ProxyPushConsumer* consumer) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); - if (this->consumer_ == 0 || this->consumer_ != consumer) + if (this->consumer_ == nullptr || this->consumer_ != consumer) return; - this->consumer_ = 0; + this->consumer_ = nullptr; try { @@ -68,7 +68,7 @@ TAO_EC_Per_Supplier_Filter::connected (TAO_EC_ProxyPushSupplier* supplier) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); - if (this->consumer_ != 0) + if (this->consumer_ != nullptr) { const RtecEventChannelAdmin::SupplierQOS& pub = this->consumer_->publications_i (); @@ -104,7 +104,7 @@ TAO_EC_Per_Supplier_Filter::reconnected (TAO_EC_ProxyPushSupplier* supplier) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); - if (this->consumer_ != 0) + if (this->consumer_ != nullptr) { const RtecEventChannelAdmin::SupplierQOS& pub = this->consumer_->publications_i (); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp index 90af063fa1b..9aa1306d3b4 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp @@ -38,7 +38,7 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( { CORBA::ULong l = qos.dependencies.length (); if (pos == l) - return 0; + return nullptr; const RtecEventComm::Event& e = qos.dependencies[pos].event; if (e.header.type == ACE_ES_CONJUNCTION_DESIGNATOR) @@ -47,7 +47,7 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( CORBA::ULong n = e.header.source; TAO_EC_Filter** children; - ACE_NEW_RETURN (children, TAO_EC_Filter*[n], 0); + ACE_NEW_RETURN (children, TAO_EC_Filter*[n], nullptr); CORBA::ULong i = 0; for (; i != n; ++i) { @@ -61,7 +61,7 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( CORBA::ULong n = e.header.source; TAO_EC_Filter** children; - ACE_NEW_RETURN (children, TAO_EC_Filter*[n], 0); + ACE_NEW_RETURN (children, TAO_EC_Filter*[n], nullptr); CORBA::ULong i = 0; for (; i != n; ++i) { @@ -76,7 +76,7 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( CORBA::ULong n = e.header.source; TAO_EC_Filter** children; - ACE_NEW_RETURN (children, TAO_EC_Filter*[n], 0); + ACE_NEW_RETURN (children, TAO_EC_Filter*[n], nullptr); CORBA::ULong i = 0; for (; i != n; ++i) { @@ -98,7 +98,7 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( pos++; // COnsumer the designator if (pos == qos.dependencies.length ()) - return 0; + return nullptr; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; pos++; @@ -114,13 +114,13 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( pos++; // Consume the designator if (pos == qos.dependencies.length ()) - return 0; + return nullptr; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; pos++; if (pos == qos.dependencies.length ()) - return 0; + return nullptr; CORBA::ULong source_value = qos.dependencies[pos].event.header.source; CORBA::ULong type_value = qos.dependencies[pos].event.header.type; pos++; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp index 51ffb0ffd78..d4568b68f94 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp @@ -18,7 +18,7 @@ TAO_EC_ProxyPushConsumer:: : event_channel_ (ec), ec_refcount_ (1), connected_ (false), - filter_ (0) + filter_ (nullptr) { this->lock_ = this->event_channel_->create_consumer_lock (); @@ -140,7 +140,7 @@ TAO_EC_ProxyPushConsumer::shutdown () this->shutdown_hook (); - if (this->filter_ != 0) + if (this->filter_ != nullptr) { this->filter_->shutdown (); @@ -171,11 +171,11 @@ TAO_EC_ProxyPushConsumer::cleanup_i () RtecEventComm::PushSupplier::_nil (); this->connected_ = false; - if (this->filter_ != 0) + if (this->filter_ != nullptr) { this->filter_->unbind (this); this->filter_->_decr_refcnt (); - this->filter_ = 0; + this->filter_ = nullptr; } } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp index 5521a7b996e..68c2c3cb5d8 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp @@ -23,7 +23,7 @@ TAO_EC_ProxyPushSupplier::TAO_EC_ProxyPushSupplier (TAO_EC_Event_Channel_Base* e : event_channel_ (ec), refcount_ (1), suspended_ (false), - child_ (0), + child_ (nullptr), consumer_validate_connection_(validate_connection) { this->lock_ = @@ -124,7 +124,7 @@ TAO_EC_ProxyPushSupplier::cleanup_i () // @@ Why don't we have a destroy() method in the // filter_builder? delete this->child_; - this->child_ = 0; + this->child_ = nullptr; } void @@ -259,7 +259,7 @@ TAO_EC_ProxyPushSupplier::push (const RtecEventComm::EventSet& event, qos_info); } - if (this->child_ != 0) + if (this->child_ != nullptr) this->child_->clear (); } @@ -308,7 +308,7 @@ TAO_EC_ProxyPushSupplier::push_nocopy (RtecEventComm::EventSet& event, qos_info); } - if (this->child_ != 0) + if (this->child_ != nullptr) this->child_->clear (); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp index 165818a0cc0..585b4a0e10e 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp @@ -117,7 +117,7 @@ TAO_EC_Reactive_ConsumerControl::activate () // handle_timeout uses these policies, if done in front, the channel // can crash when the timeout expires before initiazation is ready. timer_id_ = this->reactor_->schedule_timer (&this->adapter_, - 0, + nullptr, this->rate_, this->rate_); if (timer_id_ == -1) @@ -141,7 +141,7 @@ TAO_EC_Reactive_ConsumerControl::shutdown () #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 r = this->reactor_->cancel_timer (timer_id_); #endif /* TAO_HAS_CORBA_MESSAGING */ - this->adapter_.reactor (0); + this->adapter_.reactor (nullptr); return r; } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp index 0e05a2902ad..b76dc2aa4e7 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp @@ -110,7 +110,7 @@ TAO_EC_Reactive_SupplierControl::activate () // handle_timeout uses these policies, if done in front, the channel // can crash when the timeout expires before initiazation is ready. timer_id_ = this->reactor_->schedule_timer (&this->adapter_, - 0, + nullptr, this->rate_, this->rate_); if (timer_id_ == -1) @@ -134,7 +134,7 @@ TAO_EC_Reactive_SupplierControl::shutdown () #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 r = this->reactor_->cancel_timer (timer_id_); #endif /* TAO_HAS_CORBA_MESSAGING */ - this->adapter_.reactor (0); + this->adapter_.reactor (nullptr); return r; } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp index 9fcc4d159ba..ae33ca08734 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_Timeout_Generator.cpp @@ -22,7 +22,7 @@ void TAO_EC_Reactive_Timeout_Generator::shutdown () { this->reactor_->cancel_timer (&this->event_handler_); - this->event_handler_.reactor (0); + this->event_handler_.reactor (nullptr); } int diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_TPC_Dispatching.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_TPC_Dispatching.cpp index 6d0ab6519a2..bd3ad9b9094 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_TPC_Dispatching.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_TPC_Dispatching.cpp @@ -22,7 +22,7 @@ TAO_EC_TPC_Dispatching::TAO_EC_TPC_Dispatching (int , , consumer_task_map_(TAO_EC_TPC_DISPATCHING_DEFAULT_MAP_SIZE) , queue_full_service_object_(so) { - ACE_ASSERT (this->queue_full_service_object_ != 0); + ACE_ASSERT (this->queue_full_service_object_ != nullptr); } TAO_EC_TPC_Dispatching::~TAO_EC_TPC_Dispatching () @@ -68,13 +68,13 @@ TAO_EC_TPC_Dispatching::add_consumer (RtecEventComm::PushConsumer_ptr consumer) int bindresult = this->consumer_task_map_.bind (RtecEventComm::PushConsumer::_duplicate(pc.in()), dtask); - const char* explanation = 0; + const char* explanation = nullptr; if (bindresult == -1) explanation = "general failure"; else if (bindresult == 1) explanation = "entry already exists"; - if (explanation != 0) + if (explanation != nullptr) { ORBSVCS_DEBUG ((LM_WARNING, "EC (%P|%t): TPC_Dispatching::add_consumer failed to bind consumer (%@)" @@ -94,7 +94,7 @@ TAO_EC_TPC_Dispatching::remove_consumer (RtecEventComm::PushConsumer_ptr consume { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, -1); - TAO_EC_Dispatching_Task* dtask = 0; + TAO_EC_Dispatching_Task* dtask = nullptr; if (this->consumer_task_map_.find (consumer, dtask) == -1) { @@ -133,7 +133,7 @@ TAO_EC_TPC_Dispatching::shutdown () MAPTYPE::ITERATOR iter = this->consumer_task_map_.begin (); while (! iter.done()) { - MAPTYPE::ENTRY* entry = 0; + MAPTYPE::ENTRY* entry = nullptr; if (! iter.next(entry)) continue; @@ -148,7 +148,7 @@ TAO_EC_TPC_Dispatching::shutdown () iter = this->consumer_task_map_.begin (); while (! iter.done()) { - MAPTYPE::ENTRY* entry = 0; + MAPTYPE::ENTRY* entry = nullptr; if (! iter.next(entry)) continue; @@ -179,7 +179,7 @@ TAO_EC_TPC_Dispatching::push_nocopy (TAO_EC_ProxyPushSupplier* proxy, ORBSVCS_DEBUG ((LM_DEBUG, "EC (%P|%t) TPC_Dispatching::push_nocopy(supplier=%@,consumer=%@)\n", proxy, consumer)); ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); - TAO_EC_Dispatching_Task* dtask = 0; + TAO_EC_Dispatching_Task* dtask = nullptr; if (this->consumer_task_map_.find (consumer, dtask) == -1) { diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Thread_Flags.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Thread_Flags.cpp index 77617b17086..a08142d98ab 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Thread_Flags.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Thread_Flags.cpp @@ -53,18 +53,18 @@ TAO_EC_Thread_Flags::parse_symbols (const char* syms) flags_ = scope_ = sched_ = 0; // zero out everything // short-circuit on the trivial case - if (syms == 0 || *syms == '\0') + if (syms == nullptr || *syms == '\0') return; static size_t num_flags = sizeof(supported_flags_)/sizeof(Supported_Flag); char* s = ACE_OS::strdup (syms); // need a mutable string - if (s == 0) + if (s == nullptr) return; const char* SEPARATORS = " |"; // this should probably be at class level - char* ptr = 0; + char* ptr = nullptr; char* tok = ACE_OS::strtok_r (s, SEPARATORS, &ptr); - while (tok != 0) + while (tok != nullptr) { // This would allow for easy accomodation of flags that // aren't currently supported, but is it a good idea? @@ -76,7 +76,7 @@ TAO_EC_Thread_Flags::parse_symbols (const char* syms) // If somebody specifies the scheduler this way, then they // lose range checking on the priority. Bummer, but those // are the breaks. - this->flags_ |= ACE_OS::strtol (tok, 0, 0); + this->flags_ |= ACE_OS::strtol (tok, nullptr, 0); } else { @@ -114,7 +114,7 @@ TAO_EC_Thread_Flags::parse_symbols (const char* syms) tok)); } } - tok = ACE_OS::strtok_r (0, SEPARATORS, &ptr); + tok = ACE_OS::strtok_r (nullptr, SEPARATORS, &ptr); } ACE_OS::free (s); // clean up after ourselves diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp index 15cca030176..cd4e008260d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Filter.cpp @@ -67,7 +67,7 @@ TAO_EC_Timeout_Filter::push_to_proxy (const RtecEventComm::EventSet& event, { qos_info.timer_id_ = this->id_; - if (this->supplier_ != 0) + if (this->supplier_ != nullptr) this->supplier_->filter (event, qos_info); } @@ -77,7 +77,7 @@ TAO_EC_Timeout_Filter::filter (const RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) { if (qos_info.timer_id_ == this->id_ - && this->parent () != 0) + && this->parent () != nullptr) { this->parent ()->push (event, qos_info); return 1; @@ -90,7 +90,7 @@ TAO_EC_Timeout_Filter::filter_nocopy (RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) { if (qos_info.timer_id_ == this->id_ - && this->parent () != 0) + && this->parent () != nullptr) { this->parent ()->push_nocopy (event, qos_info); return 1; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp index e315214c6d1..3c74d57e59f 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp @@ -26,7 +26,7 @@ TAO_EC_Timeout_Adapter::handle_timeout (const ACE_Time_Value & /* tv */, TAO_EC_Timeout_Filter *filter = static_cast<TAO_EC_Timeout_Filter*> (const_cast<void*> (vp)); - if (filter == 0) + if (filter == nullptr) return 0; try diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp index 66ff295aa4f..56ec593b2ea 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp @@ -43,7 +43,7 @@ void TAO_EC_Type_Filter::push (const RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push (event, qos_info); } @@ -51,7 +51,7 @@ void TAO_EC_Type_Filter::push_nocopy (RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (this->parent () != 0) + if (this->parent () != nullptr) this->parent ()->push_nocopy (event, qos_info); } |