diff options
275 files changed, 4057 insertions, 4057 deletions
diff --git a/TAO/TAO_IDL/ast/ast_annotation_appl.cpp b/TAO/TAO_IDL/ast/ast_annotation_appl.cpp index 75eb854757c..7ea25ceffe4 100644 --- a/TAO/TAO_IDL/ast/ast_annotation_appl.cpp +++ b/TAO/TAO_IDL/ast/ast_annotation_appl.cpp @@ -2,8 +2,8 @@ #include "ast_annotation_member.h" AST_Annotation_Appl::Param::Param () - : id (0), - expr (0), + : id (nullptr), + expr (nullptr), used (false) { } @@ -30,7 +30,7 @@ AST_Annotation_Appl::delete_params (AST_Annotation_Appl::Params* params) Params::ITERATOR iter (*params); while (!iter.done ()) { - Param **i = 0; + Param **i = nullptr; iter.next (i); delete *i; iter.advance (); @@ -51,7 +51,7 @@ AST_Annotation_Appl::AST_Annotation_Appl ( AST_Annotation_Decl (name), original_name_ (name->get_string_copy ()), params_ (params), - annotation_decl_ (0) + annotation_decl_ (nullptr) { } @@ -71,7 +71,7 @@ void AST_Annotation_Appl::dump (ACE_OSTREAM_TYPE &o) Params::ITERATOR iter (*params_); while (!iter.done ()) { - Param **i = 0; + Param **i = nullptr; iter.next (i); if ((*i)->id) { @@ -151,7 +151,7 @@ AST_Annotation_Appl::apply_from (AST_Annotation_Decl *decl) for (Param::Iterator it (*params_); !it.done (); it.advance ()) { - Param **param = 0; + Param **param = nullptr; it.next (param); if ((*param) && !(*param)->used) { @@ -187,18 +187,18 @@ AST_Annotation_Appl::find_param (const char *name) // Check for single nameless parameter if (params_->size () == 1) { - Param *top = 0; + Param *top = nullptr; params_->top (top); if (top && !top->id && top->expr) { // Don't reuse it if used - return top->used ? 0 : top; + return top->used ? nullptr : top; } } for (Param::Iterator it (*params_); !it.done (); it.advance ()) { - Param **param = 0; + Param **param = nullptr; it.next (param); if ((*param) && (*param)->id && !ACE_OS::strcmp ((*param)->id->get_string (), name)) { @@ -207,5 +207,5 @@ AST_Annotation_Appl::find_param (const char *name) } } - return 0; + return nullptr; } diff --git a/TAO/TAO_IDL/ast/ast_annotation_appls.cpp b/TAO/TAO_IDL/ast/ast_annotation_appls.cpp index d96c302fbee..c943c2a641a 100644 --- a/TAO/TAO_IDL/ast/ast_annotation_appls.cpp +++ b/TAO/TAO_IDL/ast/ast_annotation_appls.cpp @@ -82,7 +82,7 @@ AST_Annotation_Appls::operator[] (size_t index) AST_Annotation_Appl * AST_Annotation_Appls::find (AST_Annotation_Decl *annotation) { - AST_Annotation_Appl *result = 0; + AST_Annotation_Appl *result = nullptr; for (iterator i = begin (); i != end (); ++i) { AST_Annotation_Appl *appl = i->get (); @@ -99,19 +99,19 @@ AST_Annotation_Appls::find (const char *annotation) { if (!annotation) { - return 0; + return nullptr; } UTL_Scope* bottom = idl_global->scopes ().bottom (); if (!bottom) { - return 0; + return nullptr; } AST_Decl* decl = bottom->lookup_by_name (annotation); if (!decl) { - return 0; + return nullptr; } return find (dynamic_cast<AST_Annotation_Decl*> (decl)); diff --git a/TAO/TAO_IDL/ast/ast_annotation_member.cpp b/TAO/TAO_IDL/ast/ast_annotation_member.cpp index 8c872a7777a..4c6df635323 100644 --- a/TAO/TAO_IDL/ast/ast_annotation_member.cpp +++ b/TAO/TAO_IDL/ast/ast_annotation_member.cpp @@ -17,7 +17,7 @@ AST_Annotation_Member::AST_Annotation_Member ( : AST_Decl (NT, name), AST_Field (type, name, vis_NA), expr_type_ (expr_type), - value_ (0) + value_ (nullptr) { } @@ -27,7 +27,7 @@ AST_Annotation_Member::AST_Annotation_Member ( : AST_Decl (nt, name), AST_Field (nt, type, name, vis_NA), expr_type_ (expr_type), - value_ (0) + value_ (nullptr) { } @@ -38,7 +38,7 @@ AST_Annotation_Member::AST_Annotation_Member ( AST_Field (name, dynamic_cast<AST_Field*>(other)), expr_type_ (other->expr_type ()), value_ (other->value () ? - new AST_Expression (other->value (), other->expr_type ()) : 0) + new AST_Expression (other->value (), other->expr_type ()) : nullptr) { } diff --git a/TAO/TAO_IDL/ast/ast_argument.cpp b/TAO/TAO_IDL/ast/ast_argument.cpp index 4bea2d21cfc..cc0509097c0 100644 --- a/TAO/TAO_IDL/ast/ast_argument.cpp +++ b/TAO/TAO_IDL/ast/ast_argument.cpp @@ -87,7 +87,7 @@ direction_to_string (AST_Argument::Direction d) return "inout"; } - return 0; + return nullptr; } AST_Decl::NodeType const diff --git a/TAO/TAO_IDL/ast/ast_array.cpp b/TAO/TAO_IDL/ast/ast_array.cpp index fc96ef025ba..9a5294d4ecd 100644 --- a/TAO/TAO_IDL/ast/ast_array.cpp +++ b/TAO/TAO_IDL/ast/ast_array.cpp @@ -96,7 +96,7 @@ AST_Array::AST_Array (UTL_ScopedName *n, AST_ConcreteType (AST_Decl::NT_array, n), pd_n_dims (nd), - pd_base_type (0), + pd_base_type (nullptr), owns_base_type_ (false) { this->pd_dims = this->compute_dims (ds, @@ -115,15 +115,15 @@ AST_Expression ** AST_Array::compute_dims (UTL_ExprList *ds, ACE_CDR::ULong nds) { - if (ds == 0) + if (ds == nullptr) { - return 0; + return nullptr; } - AST_Expression **result = 0; + AST_Expression **result = nullptr; ACE_NEW_RETURN (result, AST_Expression *[nds], - 0); + nullptr); UTL_ExprlistActiveIterator iter (ds); @@ -135,13 +135,13 @@ AST_Array::compute_dims (UTL_ExprList *ds, AST_Param_Holder *ph = orig->param_holder (); AST_Expression::ExprType ex_type = - (ph == 0 ? orig->ev ()->et : ph->info ()->const_type_); + (ph == nullptr ? orig->ev ()->et : ph->info ()->const_type_); - AST_Expression *copy = 0; + AST_Expression *copy = nullptr; ACE_NEW_RETURN (copy, AST_Expression (orig, ex_type), - 0); + nullptr); result[i] = copy; } @@ -245,18 +245,18 @@ AST_Array::destroy (void) { this->pd_base_type->destroy (); delete this->pd_base_type; - this->pd_base_type = 0; + this->pd_base_type = nullptr; } for (ACE_CDR::ULong i = 0; i < this->pd_n_dims; ++i) { this->pd_dims[i]->destroy (); delete this->pd_dims[i]; - this->pd_dims[i] = 0; + this->pd_dims[i] = nullptr; } delete [] this->pd_dims; - this->pd_dims = 0; + this->pd_dims = nullptr; this->pd_n_dims = 0; this->AST_ConcreteType::destroy (); diff --git a/TAO/TAO_IDL/ast/ast_attribute.cpp b/TAO/TAO_IDL/ast/ast_attribute.cpp index d16804d1467..f0b9564da39 100644 --- a/TAO/TAO_IDL/ast/ast_attribute.cpp +++ b/TAO/TAO_IDL/ast/ast_attribute.cpp @@ -94,8 +94,8 @@ AST_Attribute::AST_Attribute (bool ro, ft, n), pd_readonly (ro), - pd_get_exceptions (0), - pd_set_exceptions (0) + pd_get_exceptions (nullptr), + pd_set_exceptions (nullptr) { } @@ -130,16 +130,16 @@ AST_Attribute::destroy (void) // destroy() method does NOT delete the contained // exception nodes. - if (this->pd_get_exceptions != 0) + if (this->pd_get_exceptions != nullptr) { this->pd_get_exceptions->destroy (); - this->pd_get_exceptions = 0; + this->pd_get_exceptions = nullptr; } - if (this->pd_set_exceptions != 0) + if (this->pd_set_exceptions != nullptr) { this->pd_set_exceptions->destroy (); - this->pd_set_exceptions = 0; + this->pd_set_exceptions = nullptr; } this->AST_Field::destroy (); @@ -148,7 +148,7 @@ AST_Attribute::destroy (void) UTL_ExceptList * AST_Attribute::be_add_get_exceptions (UTL_ExceptList *t) { - if (this->pd_get_exceptions != 0) + if (this->pd_get_exceptions != nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); @@ -164,7 +164,7 @@ AST_Attribute::be_add_get_exceptions (UTL_ExceptList *t) UTL_ExceptList * AST_Attribute::be_add_set_exceptions (UTL_ExceptList *t) { - if (this->pd_set_exceptions != 0) + if (this->pd_set_exceptions != nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); @@ -202,11 +202,11 @@ AST_Attribute::get_set_exceptions (void) const UTL_NameList * AST_Attribute::fe_add_get_exceptions (UTL_NameList *t) { - UTL_ScopedName *nl_n = 0; - AST_Type *fe = 0; - AST_Decl *d = 0; + UTL_ScopedName *nl_n = nullptr; + AST_Type *fe = nullptr; + AST_Decl *d = nullptr; - this->pd_get_exceptions = 0; + this->pd_get_exceptions = nullptr; for (UTL_NamelistActiveIterator nl_i (t); !nl_i.is_done (); @@ -216,10 +216,10 @@ AST_Attribute::fe_add_get_exceptions (UTL_NameList *t) d = this->defined_in ()->lookup_by_name (nl_n, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (nl_n); - return 0; + return nullptr; } AST_Decl::NodeType nt = d->node_type (); @@ -229,17 +229,17 @@ AST_Attribute::fe_add_get_exceptions (UTL_NameList *t) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); - return 0; + return nullptr; } fe = dynamic_cast<AST_Type*> (d); - UTL_ExceptList *el = 0; + UTL_ExceptList *el = nullptr; ACE_NEW_RETURN (el, - UTL_ExceptList (fe, 0), - 0); + UTL_ExceptList (fe, nullptr), + nullptr); - if (this->pd_get_exceptions == 0) + if (this->pd_get_exceptions == nullptr) { this->pd_get_exceptions = el; } @@ -257,11 +257,11 @@ AST_Attribute::fe_add_get_exceptions (UTL_NameList *t) UTL_NameList * AST_Attribute::fe_add_set_exceptions (UTL_NameList *t) { - UTL_ScopedName *nl_n = 0; - AST_Type *fe = 0; - AST_Decl *d = 0; + UTL_ScopedName *nl_n = nullptr; + AST_Type *fe = nullptr; + AST_Decl *d = nullptr; - this->pd_set_exceptions = 0; + this->pd_set_exceptions = nullptr; for (UTL_NamelistActiveIterator nl_i (t); !nl_i.is_done (); nl_i.next ()) { @@ -269,10 +269,10 @@ AST_Attribute::fe_add_set_exceptions (UTL_NameList *t) d = this->defined_in ()->lookup_by_name (nl_n, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (nl_n); - return 0; + return nullptr; } AST_Decl::NodeType nt = d->node_type (); @@ -282,17 +282,17 @@ AST_Attribute::fe_add_set_exceptions (UTL_NameList *t) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); - return 0; + return nullptr; } fe = dynamic_cast<AST_Type*> (d); - UTL_ExceptList *el = 0; + UTL_ExceptList *el = nullptr; ACE_NEW_RETURN (el, - UTL_ExceptList (fe, 0), - 0); + UTL_ExceptList (fe, nullptr), + nullptr); - if (this->pd_set_exceptions == 0) + if (this->pd_set_exceptions == nullptr) { this->pd_set_exceptions = el; } diff --git a/TAO/TAO_IDL/ast/ast_check.cpp b/TAO/TAO_IDL/ast/ast_check.cpp index e42960855fe..bd9c5aa08f5 100644 --- a/TAO/TAO_IDL/ast/ast_check.cpp +++ b/TAO/TAO_IDL/ast/ast_check.cpp @@ -71,7 +71,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "utl_scope.h" // Static storage for remembering nodes. -static AST_Type **ast_fwds = 0; +static AST_Type **ast_fwds = nullptr; static long ast_n_fwds_used = 0; static long ast_n_fwds_alloc = 0; @@ -82,7 +82,7 @@ static long ast_n_fwds_alloc = 0; void AST_record_fwd_decl (AST_Type *n) { - AST_Type **o_ast_fwds = 0; + AST_Type **o_ast_fwds = nullptr; long o_ast_n_fwds_alloc = 0; // Make sure there's space to store one more. @@ -120,7 +120,7 @@ AST_record_fwd_decl (AST_Type *n) TAO_IDL_FE_Export void AST_check_fwd_decls (void) { - AST_Type *d = 0; + AST_Type *d = nullptr; for (long i = 0; i < ast_n_fwds_used; ++i) { @@ -137,7 +137,7 @@ AST_check_fwd_decls (void) d->defined_in ()->lookup_by_name_local (d->local_name (), true); - if (f == 0) + if (f == nullptr) { idl_global->err ()->fwd_decl_not_defined (d); } @@ -148,7 +148,7 @@ AST_check_fwd_decls (void) // in between which the elements of ast_fwds are destroyed, // so we have to clean up. delete [] ast_fwds; - ast_fwds = 0; + ast_fwds = nullptr; ast_n_fwds_alloc = 0; ast_n_fwds_used = 0; } diff --git a/TAO/TAO_IDL/ast/ast_component.cpp b/TAO/TAO_IDL/ast/ast_component.cpp index 14d697af2b8..81b4d3f4578 100644 --- a/TAO/TAO_IDL/ast/ast_component.cpp +++ b/TAO/TAO_IDL/ast/ast_component.cpp @@ -55,7 +55,7 @@ AST_Component::redefine (AST_Interface *from) { AST_Component *c = dynamic_cast<AST_Component*> (from); - if (c == 0) + if (c == nullptr) { idl_global->err ()->redef_error (from->local_name ()->get_string (), this->local_name ()->get_string ()); @@ -72,9 +72,9 @@ AST_Decl * AST_Component::look_in_inherited (UTL_ScopedName *e, bool full_def_only) { - AST_Decl *d = 0; + AST_Decl *d = nullptr; - if (this->pd_base_component != 0) + if (this->pd_base_component != nullptr) { d = this->pd_base_component->lookup_by_name_r ( @@ -90,15 +90,15 @@ AST_Decl * AST_Component::look_in_supported (UTL_ScopedName *e, bool full_def_only) { - AST_Decl *d = 0; - AST_Type **is = 0; + AST_Decl *d = nullptr; + AST_Type **is = nullptr; long nis = -1; // Can't look in an interface which was not yet defined. if (!this->is_defined ()) { idl_global->err ()->fwd_decl_lookup (this, e); - return 0; + return nullptr; } // OK, loop through supported interfaces. @@ -117,7 +117,7 @@ AST_Component::look_in_supported (UTL_ScopedName *e, d = (i)->lookup_by_name_r (e, full_def_only); - if (d != 0) + if (d != nullptr) { break; } @@ -151,7 +151,7 @@ AST_Component::special_lookup (UTL_ScopedName *e, { AST_Decl *d = this->look_in_inherited (e, full_def_only); - if (d == 0) + if (d == nullptr) { d = this->look_in_supported (e, full_def_only); } @@ -174,7 +174,7 @@ AST_Component::dump (ACE_OSTREAM_TYPE &o) this->dump_i (o, " "); - if (this->pd_base_component != 0) + if (this->pd_base_component != nullptr) { this->dump_i (o, ": "); this->pd_base_component->local_name ()->dump (o); diff --git a/TAO/TAO_IDL/ast/ast_connector.cpp b/TAO/TAO_IDL/ast/ast_connector.cpp index 0b2fe0ca15b..136711e328c 100644 --- a/TAO/TAO_IDL/ast/ast_connector.cpp +++ b/TAO/TAO_IDL/ast/ast_connector.cpp @@ -19,17 +19,17 @@ AST_Connector::AST_Connector ( n), UTL_Scope (AST_Decl::NT_connector), AST_Interface (n, + nullptr, 0, - 0, - 0, + nullptr, 0, false, false), AST_Component (n, base_connector, + nullptr, 0, - 0, - 0, + nullptr, 0) { if (!this->imported ()) @@ -63,7 +63,7 @@ AST_Connector::dump (ACE_OSTREAM_TYPE &o) this->dump_i (o, " "); - if (this->pd_base_component != 0) + if (this->pd_base_component != nullptr) { this->dump_i (o, ": "); this->pd_base_component->local_name ()->dump (o); diff --git a/TAO/TAO_IDL/ast/ast_constant.cpp b/TAO/TAO_IDL/ast/ast_constant.cpp index 674d63dbdf4..99dea8cd83e 100644 --- a/TAO/TAO_IDL/ast/ast_constant.cpp +++ b/TAO/TAO_IDL/ast/ast_constant.cpp @@ -119,7 +119,7 @@ AST_Constant::exprtype_to_string (AST_Expression::ExprType et) break; } - return 0; + return nullptr; } AST_Decl::NodeType const @@ -201,11 +201,11 @@ AST_Constant::ast_accept (ast_visitor *visitor) void AST_Constant::destroy (void) { - if (this->pd_constant_value != 0) + if (this->pd_constant_value != nullptr) { this->pd_constant_value->destroy (); delete this->pd_constant_value; - this->pd_constant_value = 0; + this->pd_constant_value = nullptr; } this->AST_Decl::destroy (); @@ -277,10 +277,10 @@ AST_Constant::exprtype_to_string (void) case AST_Expression::EV_fixed: return "Fixed"; default: - return 0; + return nullptr; } - return 0; + return nullptr; } UTL_ScopedName * @@ -291,10 +291,10 @@ AST_Constant::enum_full_name (void) UTL_Scope * const s = this->defined_in (); AST_Decl * const d = s->lookup_by_name (this->pd_constant_value->n (), 1); - return (d ? (ScopeAsDecl (d->defined_in ()))->name () : 0); + return (d ? (ScopeAsDecl (d->defined_in ()))->name () : nullptr); } else { - return 0; + return nullptr; } } diff --git a/TAO/TAO_IDL/ast/ast_decl.cpp b/TAO/TAO_IDL/ast/ast_decl.cpp index 59152a256b2..b92e68eff73 100644 --- a/TAO/TAO_IDL/ast/ast_decl.cpp +++ b/TAO/TAO_IDL/ast/ast_decl.cpp @@ -128,28 +128,28 @@ AST_Decl::AST_Decl (NodeType nt, UTL_ScopedName *n, bool anonymous) : COMMON_Base (), - repoID_ (0), - flat_name_ (0), + repoID_ (nullptr), + flat_name_ (nullptr), contains_wstring_ (-1), - annotation_appls_ (0), + annotation_appls_ (nullptr), builtin_ (idl_global->in_eval_), pd_imported (idl_global->imported ()), pd_in_main_file (idl_global->in_main_file ()), pd_defined_in (idl_global->scopes ().depth () > 0 ? idl_global->scopes ().top () - : 0), + : nullptr), pd_node_type (nt), pd_line (idl_global->lineno ()), - pd_name (0), - pd_local_name (n ? n->last_component ()->copy () : 0), - pd_original_local_name (0), - full_name_ (0), - prefix_ (0), - version_ (0), + pd_name (nullptr), + pd_local_name (n ? n->last_component ()->copy () : nullptr), + pd_original_local_name (nullptr), + full_name_ (nullptr), + prefix_ (nullptr), + version_ (nullptr), anonymous_ (anonymous), typeid_set_ (false), - last_referenced_as_ (0), - prefix_scope_ (0), + last_referenced_as_ (nullptr), + prefix_scope_ (nullptr), in_tmpl_mod_not_aliased_ (idl_global->in_tmpl_mod_no_alias ()) { // If this is the root node, the filename won't have been set yet. @@ -158,7 +158,7 @@ AST_Decl::AST_Decl (NodeType nt, this->compute_full_name (n); - char *prefix = 0; + char *prefix = nullptr; idl_global->pragma_prefixes ().top (prefix); this->prefix_ = ACE::strnew (prefix ? prefix : ""); @@ -175,28 +175,28 @@ AST_Decl::AST_Decl ( UTL_ScopedName *name, AST_Decl *other) : COMMON_Base (), - repoID_ (0), - flat_name_ (0), + repoID_ (nullptr), + flat_name_ (nullptr), contains_wstring_ (-1), - annotation_appls_ (0), + annotation_appls_ (nullptr), builtin_ (idl_global->in_eval_), pd_imported (idl_global->imported ()), pd_in_main_file (idl_global->in_main_file ()), pd_defined_in (idl_global->scopes ().depth () > 0 ? idl_global->scopes ().top () - : 0), + : nullptr), pd_node_type (other->node_type ()), pd_line (idl_global->lineno ()), - pd_name (0), - pd_local_name (name ? name->last_component ()->copy () : 0), - pd_original_local_name (0), - full_name_ (0), - prefix_ (0), - version_ (0), + pd_name (nullptr), + pd_local_name (name ? name->last_component ()->copy () : nullptr), + pd_original_local_name (nullptr), + full_name_ (nullptr), + prefix_ (nullptr), + version_ (nullptr), anonymous_ (other->anonymous ()), typeid_set_ (false), - last_referenced_as_ (0), - prefix_scope_ (0), + last_referenced_as_ (nullptr), + prefix_scope_ (nullptr), in_tmpl_mod_not_aliased_ (idl_global->in_tmpl_mod_no_alias ()) { // If this is the root node, the filename won't have been set yet. @@ -205,7 +205,7 @@ AST_Decl::AST_Decl ( this->compute_full_name (name); - char *prefix = 0; + char *prefix = nullptr; idl_global->pragma_prefixes ().top (prefix); this->prefix_ = ACE::strnew (prefix ? prefix : ""); @@ -230,47 +230,47 @@ AST_Decl::destroy (void) { this->pd_name->destroy (); delete this->pd_name; - this->pd_name = 0; + this->pd_name = nullptr; } if (this->pd_local_name) { this->pd_local_name->destroy (); delete this->pd_local_name; - this->pd_local_name = 0; + this->pd_local_name = nullptr; } if (this->pd_original_local_name) { this->pd_original_local_name->destroy (); delete this->pd_original_local_name; - this->pd_original_local_name = 0; + this->pd_original_local_name = nullptr; } if (this->last_referenced_as_) { this->last_referenced_as_->destroy (); delete this->last_referenced_as_; - this->last_referenced_as_ = 0; + this->last_referenced_as_ = nullptr; } delete [] this->full_name_; - this->full_name_ = 0; + this->full_name_ = nullptr; delete [] this->repoID_; - this->repoID_ = 0; + this->repoID_ = nullptr; delete [] this->prefix_; - this->prefix_ = 0; + this->prefix_ = nullptr; delete [] this->version_; - this->version_ = 0; + this->version_ = nullptr; delete [] this->flat_name_; - this->flat_name_ = 0; + this->flat_name_ = nullptr; delete annotation_appls_; - annotation_appls_ = 0; + annotation_appls_ = nullptr; } AST_Decl * @@ -309,11 +309,11 @@ AST_Decl::compute_full_name (UTL_ScopedName *n) } // Initialize this name to 0. - this->pd_name = 0; + this->pd_name = nullptr; // OK, not global. So copy name of containing scope, then // smash last cdr of copy with new component - UTL_ScopedName *cn = 0; + UTL_ScopedName *cn = nullptr; AST_Decl *d = ScopeAsDecl (this->defined_in ()); if (d) { @@ -328,15 +328,15 @@ AST_Decl::compute_full_name (UTL_ScopedName *n) { if (this->pd_name) { - UTL_ScopedName *conc_name = 0; + UTL_ScopedName *conc_name = nullptr; ACE_NEW (conc_name, - UTL_ScopedName (this->pd_local_name->copy (), 0)); + UTL_ScopedName (this->pd_local_name->copy (), nullptr)); this->pd_name->nconc (conc_name); } else { ACE_NEW (this->pd_name, - UTL_ScopedName (this->pd_local_name->copy (), 0)); + UTL_ScopedName (this->pd_local_name->copy (), nullptr)); } } } @@ -362,7 +362,7 @@ AST_Decl::set_prefix_with_typeprefix_r (const char *value, } delete [] this->repoID_; - this->repoID_ = 0; + this->repoID_ = nullptr; this->prefix (value); this->prefix_scope_ = appeared_in; @@ -415,7 +415,7 @@ AST_Decl::compute_full_name (void) size_t namelen = 0; long first = true; long second = false; - char *name = 0; + char *name = nullptr; for (UTL_IdListActiveIterator i (this->name ()); !i.is_done (); @@ -496,10 +496,10 @@ AST_Decl::compute_repoID (void) size_t namelen = 4; // for the prefix "IDL:" long first = true; long second = false; - char *name = 0; + char *name = nullptr; const char *prefix = (this->prefix_ ? this->prefix_ : ""); UTL_Scope *scope = this->defined_in (); - const char *parent_prefix = 0; + const char *parent_prefix = nullptr; // If our prefix is empty, we check to see if an ancestor has one. while (scope && !ACE_OS::strcmp (prefix, "")) @@ -661,12 +661,12 @@ AST_Decl::flat_name (void) void AST_Decl::compute_flat_name (void) { - if (this->flat_name_ == 0) + if (this->flat_name_ == nullptr) { size_t namelen = 0; long first = true; long second = false; - char *item_name = 0; + char *item_name = nullptr; // In the first loop, compute the total length. for (UTL_IdListActiveIterator i (this->name ()); @@ -704,7 +704,7 @@ AST_Decl::compute_flat_name (void) tmp->destroy (); delete tmp; - tmp = 0; + tmp = nullptr; } ACE_NEW (this->flat_name_, char [namelen + 1]); @@ -747,7 +747,7 @@ AST_Decl::compute_flat_name (void) tmp->destroy (); delete tmp; - tmp = 0; + tmp = nullptr; } } } @@ -881,7 +881,7 @@ AST_Decl::has_ancestor (AST_Decl *s) work = work->pd_defined_in ? ScopeAsDecl (work->pd_defined_in) : - 0; + nullptr; } while (work); return false; @@ -998,8 +998,8 @@ AST_Decl::version (void) // All forms of repo id should contain two colons, the // version coming after the second one. - const char *tail1 = 0; - const char *tail2 = 0; + const char *tail1 = nullptr; + const char *tail2 = nullptr; if (repo_id) { @@ -1127,7 +1127,7 @@ AST_Decl::set_id_with_typeid (char *value) } delete [] this->repoID_; - this->repoID_ = 0; + this->repoID_ = nullptr; this->repoID (ACE::strnew (value)); this->typeid_set_ = true; } @@ -1239,7 +1239,7 @@ AST_Decl::compute_name (const char *prefix, { if (!prefix || !suffix) { - return 0; + return nullptr; } // Prepare prefix_<local_name>_suffix string. @@ -1252,19 +1252,19 @@ AST_Decl::compute_name (const char *prefix, result_local_str += suffix_str; // Identifier for the resulting local name. - Identifier *result_local_id = 0; + Identifier *result_local_id = nullptr; ACE_NEW_RETURN (result_local_id, Identifier (result_local_str.c_str ()), - 0); + nullptr); // UTL_Scoped name for the resulting local name. - UTL_ScopedName *result_local_name = 0; + UTL_ScopedName *result_local_name = nullptr; ACE_NEW_RETURN (result_local_name, - UTL_ScopedName (result_local_id, 0), - 0); + UTL_ScopedName (result_local_id, nullptr), + nullptr); // Global scope? - UTL_ScopedName *result_name = 0; + UTL_ScopedName *result_name = nullptr; if (!this->defined_in ()) { result_name = result_local_name; @@ -1333,13 +1333,13 @@ AST_Decl::set_name (UTL_ScopedName *n) // These will be recomputed on demand. delete [] this->flat_name_; - this->flat_name_ = 0; + this->flat_name_ = nullptr; delete [] this->full_name_; - this->full_name_ = 0; + this->full_name_ = nullptr; delete [] this->repoID_; - this->repoID_ = 0; + this->repoID_ = nullptr; } } @@ -1367,7 +1367,7 @@ AST_Decl::compute_local_name (const char *prefix, { if (!prefix || !suffix) { - return 0; + return nullptr; } // Init the result with prefix. @@ -1380,10 +1380,10 @@ AST_Decl::compute_local_name (const char *prefix, result_str += ACE_CString (suffix); // Identifier for the resulting local name. - Identifier *result_id = 0; + Identifier *result_id = nullptr; ACE_NEW_RETURN (result_id, Identifier (result_str.c_str ()), - 0); + nullptr); return result_id; } @@ -1538,7 +1538,7 @@ AST_Decl::masking_checks (AST_Decl *mod) AST_Module *me_mod = dynamic_cast<AST_Module*> (this); - if (me_mod != 0) + if (me_mod != nullptr) { AST_Module *po_mod = dynamic_cast<AST_Module*> (mod); if (po_mod) diff --git a/TAO/TAO_IDL/ast/ast_enum.cpp b/TAO/TAO_IDL/ast/ast_enum.cpp index 0be8d222345..3393f2a3366 100644 --- a/TAO/TAO_IDL/ast/ast_enum.cpp +++ b/TAO/TAO_IDL/ast/ast_enum.cpp @@ -111,8 +111,8 @@ AST_Enum::member_count (void) UTL_ScopedName * AST_Enum::value_to_name (const unsigned long v) { - AST_EnumVal *item = 0; - AST_Decl *d = 0; + AST_EnumVal *item = nullptr; + AST_Decl *d = nullptr; for (UTL_ScopeActiveIterator i (this, IK_decls); !i.is_done (); i.next ()) { @@ -125,15 +125,15 @@ AST_Enum::value_to_name (const unsigned long v) } } - return 0; + return nullptr; } // Look up an enumerator by the value of the supplied expression. AST_EnumVal * AST_Enum::lookup_by_value (const AST_Expression *v) { - AST_EnumVal *item = 0; - AST_Decl *d = 0; + AST_EnumVal *item = nullptr; + AST_Decl *d = nullptr; for (UTL_ScopeActiveIterator i (this, IK_decls); !i.is_done (); @@ -153,7 +153,7 @@ AST_Enum::lookup_by_value (const AST_Expression *v) // string name to look up the enum value with. UTL_ScopedName *v_n = const_cast<AST_Expression *> (v)->n (); - if (v_n != 0) + if (v_n != nullptr) { Identifier *cv_i = item->local_name (); Identifier *v_i = v_n->last_component (); @@ -165,7 +165,7 @@ AST_Enum::lookup_by_value (const AST_Expression *v) } } - return 0; + return nullptr; } // Compute the value to be assigned to the next enumerator. Bump the @@ -202,11 +202,11 @@ munge_name_for_enumval (UTL_ScopedName *n, n = (UTL_ScopedName *) n->tail (); } - UTL_IdList *id = 0; + UTL_IdList *id = nullptr; ACE_NEW_RETURN (id, UTL_IdList (last_component->copy (), - 0), - 0); + nullptr), + nullptr); n->set_tail (id); @@ -237,8 +237,8 @@ AST_Enum::compute_member_count (void) AST_EnumVal * AST_Enum::fe_add_enum_val (AST_EnumVal *t) { - AST_Decl *d = 0; - AST_EnumVal *t1 = 0; + AST_Decl *d = nullptr; + AST_EnumVal *t1 = nullptr; AST_Expression::AST_ExprValue *ev = t->constant_value ()->coerce (AST_Expression::EV_ulong); @@ -247,7 +247,7 @@ AST_Enum::fe_add_enum_val (AST_EnumVal *t) t->name ()); delete ev; - ev = 0; + ev = nullptr; UTL_ScopedName *sn = munge_name_for_enumval ((UTL_IdList *) t->name ()->copy (), @@ -261,7 +261,7 @@ AST_Enum::fe_add_enum_val (AST_EnumVal *t) t1->set_name (sn); // Already defined and cannot be redefined? Or already used? - if ((d = this->lookup_for_add (t)) != 0) + if ((d = this->lookup_for_add (t)) != nullptr) { if (!FE_Utils::can_be_redefined (d, t)) { @@ -269,7 +269,7 @@ AST_Enum::fe_add_enum_val (AST_EnumVal *t) t, this, d); - return 0; + return nullptr; } if (this->referenced (d, t->local_name ())) @@ -278,14 +278,14 @@ AST_Enum::fe_add_enum_val (AST_EnumVal *t) t, this, d); - return 0; + return nullptr; } if (t->has_ancestor (d)) { idl_global->err ()->redefinition_in_scope (t, d); - return 0; + return nullptr; } } @@ -297,10 +297,10 @@ AST_Enum::fe_add_enum_val (AST_EnumVal *t) false, t->local_name ()); - if (t1 == 0) + if (t1 == nullptr) { // Prevent dereferencing null pointer in nested calls. - return 0; + return nullptr; } // Add it to enclosing scope. @@ -315,7 +315,7 @@ AST_Enum::fe_add_enum_val (AST_EnumVal *t) void AST_Enum::dump (ACE_OSTREAM_TYPE &o) { - AST_Decl *d = 0; + AST_Decl *d = nullptr; if (this->is_local ()) { diff --git a/TAO/TAO_IDL/ast/ast_enum_val.cpp b/TAO/TAO_IDL/ast/ast_enum_val.cpp index 5769cb28487..9b53f2352c1 100644 --- a/TAO/TAO_IDL/ast/ast_enum_val.cpp +++ b/TAO/TAO_IDL/ast/ast_enum_val.cpp @@ -80,7 +80,7 @@ AST_EnumVal::AST_EnumVal (ACE_CDR::ULong v, AST_Decl::NT_enum_val, new AST_Expression (v), n), - enum_parent_ (0) + enum_parent_ (nullptr) { } diff --git a/TAO/TAO_IDL/ast/ast_exception.cpp b/TAO/TAO_IDL/ast/ast_exception.cpp index 387921a3218..78ede718bd2 100644 --- a/TAO/TAO_IDL/ast/ast_exception.cpp +++ b/TAO/TAO_IDL/ast/ast_exception.cpp @@ -139,7 +139,7 @@ AST_Exception::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) { AST_Field *field = dynamic_cast<AST_Field*> (i.item ()); - if (field == 0) + if (field == nullptr) // This will be an enum value or other legitimate non-field // member - in any case, no recursion. { @@ -154,7 +154,7 @@ AST_Exception::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) type = td->primitive_base_type (); } - if (type == 0) + if (type == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) AST_Exception::") diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp index c0303b60d21..e437c82e818 100644 --- a/TAO/TAO_IDL/ast/ast_expression.cpp +++ b/TAO/TAO_IDL/ast/ast_expression.cpp @@ -91,21 +91,21 @@ AST_Expression::fill_definition_details (void) { this->pd_defined_in = idl_global->scopes ().depth () > 0 ? idl_global->scopes().top () - : 0 ; + : nullptr ; this->pd_line = idl_global->lineno (); this->pd_file_name = idl_global->filename (); - enum_parent (0); + enum_parent (nullptr); } // An AST_Expression denoting a symbolic name. AST_Expression::AST_Expression (UTL_ScopedName *nm) : pd_ec (EC_symbol), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), pd_n (nm), - tdef (0), - param_holder_ (0) + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -124,12 +124,12 @@ AST_Expression::AST_Expression (UTL_ScopedName *nm) AST_Expression::AST_Expression (AST_Expression *v, ExprType t) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { AST_Param_Holder *ph = v->param_holder_; this->fill_definition_details (); @@ -158,11 +158,11 @@ AST_Expression::AST_Expression (AST_Expression *v, } else { - if (ph == 0) + if (ph == nullptr) { this->pd_ev = v->coerce (t); - if (this->pd_ev == 0) + if (this->pd_ev == nullptr) { idl_global->err ()->coercion_error (v, t); } @@ -177,7 +177,7 @@ AST_Expression::AST_Expression (AST_Expression *v, const_cast<FE_Utils::T_Param_Info *> (ph->info ())); } - if (0 != v->pd_n) + if (nullptr != v->pd_n) { this->pd_n = dynamic_cast<UTL_ScopedName *> (v->pd_n->copy ()); @@ -191,12 +191,12 @@ AST_Expression::AST_Expression (ExprComb c, AST_Expression *ev1, AST_Expression *ev2) : pd_ec (c), - pd_ev (0), + pd_ev (nullptr), pd_v1 (ev1), pd_v2 (ev2), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); } @@ -204,12 +204,12 @@ AST_Expression::AST_Expression (ExprComb c, // An AST_Expression denoting a short integer. AST_Expression::AST_Expression (ACE_CDR::Short sv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -223,12 +223,12 @@ AST_Expression::AST_Expression (ACE_CDR::Short sv) // An AST_Expression denoting an unsigned short integer. AST_Expression::AST_Expression (ACE_CDR::UShort usv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -242,12 +242,12 @@ AST_Expression::AST_Expression (ACE_CDR::UShort usv) // An AST_Expression denoting a long integer. AST_Expression::AST_Expression (ACE_CDR::Long lv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -261,12 +261,12 @@ AST_Expression::AST_Expression (ACE_CDR::Long lv) // An AST_Expression denoting a long integer. AST_Expression::AST_Expression (ACE_CDR::LongLong llv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -280,12 +280,12 @@ AST_Expression::AST_Expression (ACE_CDR::LongLong llv) // An AST_Expression denoting a boolean. AST_Expression::AST_Expression (ACE_CDR::Boolean b) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -299,12 +299,12 @@ AST_Expression::AST_Expression (ACE_CDR::Boolean b) // An AST_Expression denoting an unsigned long integer. AST_Expression::AST_Expression (ACE_CDR::ULong ulv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -318,12 +318,12 @@ AST_Expression::AST_Expression (ACE_CDR::ULong ulv) // An AST_Expression denoting an unsigned long long integer. AST_Expression::AST_Expression (ACE_CDR::ULongLong ulv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -338,12 +338,12 @@ AST_Expression::AST_Expression (ACE_CDR::ULongLong ulv) AST_Expression::AST_Expression (ACE_CDR::ULong ulv, ExprType t) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -357,12 +357,12 @@ AST_Expression::AST_Expression (ACE_CDR::ULong ulv, // An AST_Expression denoting a 32-bit floating point number. AST_Expression::AST_Expression (ACE_CDR::Float fv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -376,12 +376,12 @@ AST_Expression::AST_Expression (ACE_CDR::Float fv) // An AST_Expression denoting a 64-bit floating point number. AST_Expression::AST_Expression (ACE_CDR::Double dv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -395,12 +395,12 @@ AST_Expression::AST_Expression (ACE_CDR::Double dv) // An AST_Expression denoting a character. AST_Expression::AST_Expression (ACE_CDR::Char cv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -414,12 +414,12 @@ AST_Expression::AST_Expression (ACE_CDR::Char cv) // An AST_Expression denoting a wide character. AST_Expression::AST_Expression (ACE_OutputCDR::from_wchar wcv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -433,12 +433,12 @@ AST_Expression::AST_Expression (ACE_OutputCDR::from_wchar wcv) // An AST_Expression denoting an octet (unsigned char). AST_Expression::AST_Expression (ACE_CDR::Octet ov) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -452,19 +452,19 @@ AST_Expression::AST_Expression (ACE_CDR::Octet ov) // An AST_Expression denoting a string (char * encapsulated as a String). AST_Expression::AST_Expression (UTL_String *sv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); ACE_NEW (this->pd_ev, AST_ExprValue); - UTL_String *new_str = 0; + UTL_String *new_str = nullptr; ACE_NEW (new_str, UTL_String (sv, true)); @@ -475,12 +475,12 @@ AST_Expression::AST_Expression (UTL_String *sv) // An AST_Expression denoting a wide string. AST_Expression::AST_Expression (char *sv) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -493,12 +493,12 @@ AST_Expression::AST_Expression (char *sv) AST_Expression::AST_Expression (const ACE_CDR::Fixed &f) : pd_ec (EC_none), - pd_ev (0), - pd_v1 (0), - pd_v2 (0), - pd_n (0), - tdef (0), - param_holder_ (0) + pd_ev (nullptr), + pd_v1 (nullptr), + pd_v2 (nullptr), + pd_n (nullptr), + tdef (nullptr), + param_holder_ (nullptr) { this->fill_definition_details (); @@ -528,9 +528,9 @@ static AST_Expression::AST_ExprValue * coerce_value (AST_Expression::AST_ExprValue *ev, AST_Expression::ExprType t) { - if (ev == 0) + if (ev == nullptr) { - return 0; + return nullptr; } switch (t) @@ -543,7 +543,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ushort: if (ev->u.usval > (unsigned short) ACE_INT16_MAX) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.usval; @@ -553,7 +553,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.lval > (long) ACE_INT16_MAX || ev->u.lval < (long) ACE_INT16_MIN) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.lval; @@ -562,7 +562,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: if (ev->u.ulval > (unsigned long) ACE_INT16_MAX) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.ulval; @@ -572,7 +572,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval > (ACE_CDR::LongLong) ACE_INT16_MAX || ev->u.llval < (ACE_CDR::LongLong) ACE_INT16_MIN) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.llval; @@ -581,7 +581,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if ((ev->u.ullval & ACE_INT16_MAX) != ev->u.ullval) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.ullval; @@ -595,7 +595,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval > (float) ACE_INT16_MAX || ev->u.fval < (float) ACE_INT16_MIN) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.fval; @@ -605,7 +605,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval > (double) ACE_INT16_MAX || ev->u.dval < (double) ACE_INT16_MIN) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.dval; @@ -618,7 +618,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_wchar: if (ev->u.wcval > (ACE_CDR::WChar) ACE_INT16_MAX) { - return 0; + return nullptr; } ev->u.sval = (short) ev->u.wcval; @@ -629,7 +629,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_short; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_ushort: switch (ev->et) @@ -637,7 +637,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_short: if (ev->u.sval < 0) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.sval; @@ -649,7 +649,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.lval > (long) ACE_UINT16_MAX || ev->u.lval < 0) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.lval; @@ -658,7 +658,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: if (ev->u.ulval > (unsigned long) ACE_UINT16_MAX) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.ulval; @@ -668,7 +668,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval > (ACE_CDR::LongLong) ACE_UINT16_MAX || ev->u.llval < 0) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.llval; @@ -677,7 +677,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if ((ev->u.ullval & ACE_UINT16_MAX) != ev->u.ullval) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.ullval; @@ -691,7 +691,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval < 0.0 || ev->u.fval > (float) ACE_UINT16_MAX) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.fval; @@ -701,7 +701,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval < 0.0 || ev->u.dval > (double) ACE_UINT16_MAX) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.dval; @@ -710,7 +710,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_char: if ((signed char) ev->u.cval < 0) { - return 0; + return nullptr; } ev->u.usval = (unsigned short) ev->u.cval; @@ -725,7 +725,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_ushort; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_long: switch (ev->et) @@ -743,7 +743,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: if (ev->u.ulval > (unsigned long) ACE_INT32_MAX) { - return 0; + return nullptr; } ev->u.lval = (long) ev->u.ulval; @@ -753,7 +753,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval > (ACE_CDR::LongLong) ACE_INT32_MAX || ev->u.llval < (ACE_CDR::LongLong) ACE_INT32_MIN) { - return 0; + return nullptr; } ev->u.lval = (long) ev->u.llval; ev->et = AST_Expression::EV_long; @@ -761,7 +761,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if ((ev->u.ullval & ACE_INT32_MAX) != ev->u.ullval) { - return 0; + return nullptr; } ev->u.lval = (long) ev->u.ullval; @@ -775,7 +775,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval > (float) LONG_MAX || ev->u.fval < (float) ACE_INT32_MIN) { - return 0; + return nullptr; } ev->u.lval = (long) ev->u.fval; @@ -785,7 +785,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval > (double) LONG_MAX || ev->u.dval < (double) ACE_INT32_MIN) { - return 0; + return nullptr; } ev->u.lval = (long) ev->u.dval; @@ -804,7 +804,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_long; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_ulong: switch (ev->et) @@ -812,7 +812,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_short: if (ev->u.sval < 0) { - return 0; + return nullptr; } ev->u.ulval = (unsigned long) ev->u.sval; @@ -825,7 +825,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_long: if (ev->u.lval < 0) { - return 0; + return nullptr; } ev->u.ulval = (unsigned long) ev->u.lval; @@ -837,7 +837,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval > (ACE_CDR::LongLong) ACE_UINT32_MAX || ev->u.llval < 0) { - return 0; + return nullptr; } ev->u.ulval = (unsigned long) ev->u.llval; @@ -846,7 +846,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if ((ev->u.ullval & ACE_UINT32_MAX) != ev->u.ullval) { - return 0; + return nullptr; } ev->u.ulval = (unsigned long) ev->u.ullval; ev->et = AST_Expression::EV_ulong; @@ -859,7 +859,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval < 0.0 || ev->u.fval > (float) ACE_UINT32_MAX) { - return 0; + return nullptr; } ev->u.ulval = (unsigned long) ev->u.fval; @@ -869,7 +869,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval < 0.0 || ev->u.dval > (double) ACE_UINT32_MAX) { - return 0; + return nullptr; } ev->u.ulval = (unsigned long) ev->u.dval; @@ -878,7 +878,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_char: if ((signed char) ev->u.cval < 0) { - return 0; + return nullptr; } ev->u.ulval = (unsigned long) ev->u.cval; @@ -893,7 +893,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_ulong; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_longlong: switch (ev->et) @@ -919,7 +919,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if (ev->u.ullval > ACE_INT64_MAX) { - return 0; + return nullptr; } ev->u.llval = @@ -934,7 +934,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval > (float) ACE_INT64_MAX || ev->u.fval < (float) ACE_INT64_MIN) { - return 0; + return nullptr; } ev->u.llval = (ACE_CDR::LongLong) ev->u.fval; @@ -944,7 +944,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval > (double) ACE_INT64_MAX || ev->u.dval < (double) ACE_INT64_MIN) { - return 0; + return nullptr; } ev->u.llval = (ACE_CDR::LongLong) ev->u.dval; @@ -963,7 +963,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_longlong; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_ulonglong: switch (ev->et) @@ -971,7 +971,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_short: if (ev->u.sval < 0) { - return 0; + return nullptr; } ev->u.ullval = ev->u.sval; @@ -984,7 +984,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_long: if (ev->u.lval < 0) { - return 0; + return nullptr; } ev->u.ullval = ev->u.lval; @@ -997,7 +997,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_longlong: if (ev->u.llval < 0) { - return 0; + return nullptr; } ev->u.ullval = @@ -1014,7 +1014,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval < 0.0 || ev->u.fval > (float) ACE_UINT64_MAX) { - return 0; + return nullptr; } ev->u.ullval = static_cast<ACE_UINT64> (ev->u.fval); @@ -1025,7 +1025,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval < 0.0 || ev->u.dval > (double) ACE_UINT64_MAX) { - return 0; + return nullptr; } ev->u.ullval = static_cast<ACE_UINT64> (ev->u.dval); @@ -1035,7 +1035,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_char: if ((signed char) ev->u.cval < 0) { - return 0; + return nullptr; } ev->u.ullval = ev->u.cval; @@ -1050,7 +1050,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_ulonglong; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_bool: switch (ev->et) @@ -1102,7 +1102,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_bool; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_float: switch (ev->et) @@ -1127,7 +1127,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval > FLT_MAX || ev->u.llval < -(ACE_FLT_MAX)) { - return 0; + return nullptr; } ev->u.fval = (float) ev->u.llval; ev->et = AST_Expression::EV_float; @@ -1146,7 +1146,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval > ACE_FLT_MAX || ev->u.dval < -(ACE_FLT_MAX)) { - return 0; + return nullptr; } ev->u.fval = (float) ev->u.dval; @@ -1165,7 +1165,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_float; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_double: switch (ev->et) @@ -1195,7 +1195,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, // conversions, so we are stuck with the signed 64-bit max value. if (ev->u.ullval > ACE_INT64_MAX) { - return 0; + return nullptr; } ev->u.dval = (double) ((ACE_CDR::LongLong) ev->u.ullval); @@ -1224,7 +1224,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_double; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_char: switch (ev->et) @@ -1233,7 +1233,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.sval > (short) ACE_CHAR_MAX || ev->u.sval < (short) ACE_CHAR_MIN) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.sval; @@ -1242,7 +1242,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ushort: if (ev->u.usval > (unsigned short) ACE_CHAR_MAX) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.usval; @@ -1252,7 +1252,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.lval > (long) ACE_CHAR_MAX || ev->u.lval < (long) ACE_CHAR_MIN) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.lval; @@ -1261,7 +1261,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: if (ev->u.ulval > (unsigned long) ACE_CHAR_MAX) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.ulval; @@ -1271,7 +1271,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval > (ACE_CDR::LongLong) ACE_CHAR_MAX || ev->u.llval < (ACE_CDR::LongLong) ACE_CHAR_MIN) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.llval; @@ -1280,7 +1280,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if (( ev->u.ullval & ACE_CHAR_MAX) != ev->u.ullval) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.ullval; @@ -1294,7 +1294,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval > (float) ACE_CHAR_MAX || ev->u.fval < (float) ACE_CHAR_MIN) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.fval; @@ -1304,7 +1304,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval > (double) ACE_CHAR_MAX || ev->u.dval < (double) ACE_CHAR_MIN) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.dval; @@ -1315,7 +1315,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_wchar: if (ev->u.wcval > (ACE_CDR::WChar) ACE_CHAR_MAX) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.wcval; @@ -1324,14 +1324,14 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_octet: if (ev->u.oval > (unsigned char) ACE_CHAR_MAX) { - return 0; + return nullptr; } ev->u.cval = (char) ev->u.oval; ev->et = AST_Expression::EV_char; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_wchar: switch (ev->et) @@ -1339,7 +1339,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_short: if (ev->u.sval < 0) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.sval; @@ -1353,7 +1353,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.lval < 0 || ev->u.lval > ACE_WCHAR_MAX) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.lval; @@ -1362,7 +1362,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: if (ev->u.ulval > ACE_WCHAR_MAX) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.ulval; @@ -1372,7 +1372,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval > (ACE_CDR::LongLong) ACE_WCHAR_MAX || ev->u.llval < 0) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.llval; @@ -1381,7 +1381,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if ((ev->u.ullval & ACE_WCHAR_MAX) != ev->u.ullval ) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.ullval; @@ -1395,7 +1395,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval > (float) ACE_WCHAR_MAX || ev->u.fval < 0) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.fval; @@ -1405,7 +1405,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval > (double) ACE_WCHAR_MAX || ev->u.dval < 0) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.dval; @@ -1414,7 +1414,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_char: if ((signed char) ev->u.cval < 0) { - return 0; + return nullptr; } ev->u.wcval = (ACE_CDR::WChar) ev->u.cval; @@ -1427,7 +1427,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_wchar; return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_octet: switch (ev->et) @@ -1436,7 +1436,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.sval < 0 || ev->u.sval > (short) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.sval; @@ -1445,7 +1445,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ushort: if (ev->u.usval > (unsigned short) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.usval; @@ -1455,7 +1455,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.lval < 0 || ev->u.lval > (long) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.lval; @@ -1464,7 +1464,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: if (ev->u.ulval > (unsigned long) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.ulval; @@ -1474,7 +1474,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.llval < 0 || ev->u.llval > (ACE_CDR::LongLong) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.llval; @@ -1483,7 +1483,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulonglong: if ((ev->u.ullval & ACE_OCTET_MAX) != ev->u.ullval) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.ullval; @@ -1497,7 +1497,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.fval < 0.0 || ev->u.fval > (float) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.fval; @@ -1507,7 +1507,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, if (ev->u.dval < 0.0 || ev->u.dval > (double) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.dval; @@ -1516,7 +1516,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_char: if ((signed char) ev->u.cval < 0) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.cval; @@ -1525,7 +1525,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_wchar: if (ev->u.wcval > (ACE_CDR::WChar) ACE_OCTET_MAX) { - return 0; + return nullptr; } ev->u.oval = (unsigned char) ev->u.wcval; @@ -1534,7 +1534,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_octet: return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_enum: switch (ev->et) @@ -1543,7 +1543,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_void: switch (ev->et) @@ -1551,17 +1551,17 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_void: return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_none: - return 0; + return nullptr; case AST_Expression::EV_string: switch (ev->et) { case AST_Expression::EV_string: return ev; default: - return 0; + return nullptr; } case AST_Expression::EV_fixed: switch (ev->et) @@ -1569,13 +1569,13 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_fixed: return ev; default: - return 0; + return nullptr; } default: - return 0; + return nullptr; } - return 0; + return nullptr; } // Integer literals may not be assigned to floating point constants, @@ -1648,17 +1648,17 @@ static AST_Expression::AST_ExprValue * eval_kind (AST_Expression::AST_ExprValue *ev, AST_Expression::EvalKind ek) { // Make a copy to simplify the memory management logic. - AST_Expression::AST_ExprValue *newval = 0; + AST_Expression::AST_ExprValue *newval = nullptr; ACE_NEW_RETURN (newval, AST_Expression::AST_ExprValue, - 0); + nullptr); - if (ev != 0) + if (ev != nullptr) { *newval = *ev; } - AST_Expression::AST_ExprValue *retval = 0; + AST_Expression::AST_ExprValue *retval = nullptr; switch (ek) { @@ -1706,7 +1706,7 @@ eval_kind (AST_Expression::AST_ExprValue *ev, AST_Expression::EvalKind ek) if (retval != newval) { delete newval; - newval = 0; + newval = nullptr; } return retval; @@ -1728,24 +1728,24 @@ eval_kind (AST_Expression::AST_ExprValue *ev, AST_Expression::EvalKind ek) AST_Expression::AST_ExprValue * AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) { - AST_ExprValue *retval = 0; + AST_ExprValue *retval = nullptr; - if (this->pd_v1 == 0 || this->pd_v2 == 0) + if (this->pd_v1 == nullptr || this->pd_v2 == nullptr) { - return 0; + return nullptr; } this->pd_v1->set_ev (this->pd_v1->eval_internal (ek)); this->pd_v2->set_ev (this->pd_v2->eval_internal (ek)); - if (this->pd_v1->ev () == 0 || this->pd_v2->ev () == 0) + if (this->pd_v1->ev () == nullptr || this->pd_v2->ev () == nullptr) { - return 0; + return nullptr; } ACE_NEW_RETURN (retval, AST_ExprValue, - 0); + nullptr); if (ek == EK_ulonglong) { @@ -1771,8 +1771,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) if (this->pd_v2->ev ()->u.ullval == 0) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.ullval = @@ -1780,8 +1780,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } else if (ek == EK_longlong) @@ -1808,8 +1808,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) if (this->pd_v2->ev ()->u.llval == 0) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.llval = @@ -1817,8 +1817,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } else if (ek == EK_fixed_point) @@ -1845,8 +1845,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) if (!this->pd_v2->ev ()->u.fixedval) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.fixedval = @@ -1854,8 +1854,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } else @@ -1882,8 +1882,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) if (ACE::is_equal (this->pd_v2->ev ()->u.dval, 0.0)) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.dval = @@ -1891,8 +1891,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -1904,24 +1904,24 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) AST_Expression::AST_ExprValue * AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) { - AST_ExprValue *retval = 0; + AST_ExprValue *retval = nullptr; - if (this->pd_v1 == 0 || this->pd_v2 == 0) + if (this->pd_v1 == nullptr || this->pd_v2 == nullptr) { - return 0; + return nullptr; } this->pd_v1->set_ev (this->pd_v1->eval_internal (ek)); this->pd_v2->set_ev (this->pd_v2->eval_internal (ek)); - if (this->pd_v1->ev () == 0 || this->pd_v2->ev () == 0) + if (this->pd_v1->ev () == nullptr || this->pd_v2->ev () == nullptr) { - return 0; + return nullptr; } ACE_NEW_RETURN (retval, AST_ExprValue, - 0); + nullptr); if (ek == EK_ulonglong) { @@ -1932,8 +1932,8 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) if (this->pd_v2->ev ()->u.ullval == 0) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.ullval = @@ -1948,8 +1948,8 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) if (this->pd_v2->ev ()->u.llval == 0) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.llval = @@ -1965,8 +1965,8 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) if (this->pd_v2->ev ()->u.ulval == 0) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.ulval = @@ -1981,8 +1981,8 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) if (this->pd_v2->ev ()->u.lval == 0) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.lval = @@ -1991,8 +1991,8 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) else { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } return retval; @@ -2004,24 +2004,24 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) AST_Expression::AST_ExprValue * AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) { - AST_Expression::AST_ExprValue *retval = 0; + AST_Expression::AST_ExprValue *retval = nullptr; - if (this->pd_v1 == 0 || this->pd_v2 == 0) + if (this->pd_v1 == nullptr || this->pd_v2 == nullptr) { - return 0; + return nullptr; } this->pd_v1->set_ev (this->pd_v1->eval_internal (ek)); this->pd_v2->set_ev (this->pd_v2->eval_internal (ek)); - if (this->pd_v1->ev () == 0 || this->pd_v2->ev () == 0 ) + if (this->pd_v1->ev () == nullptr || this->pd_v2->ev () == nullptr ) { - return 0; + return nullptr; } ACE_NEW_RETURN (retval, AST_ExprValue, - 0); + nullptr); switch (ek) { @@ -2055,8 +2055,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -2091,8 +2091,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -2127,8 +2127,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -2163,8 +2163,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -2199,8 +2199,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -2235,8 +2235,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -2271,8 +2271,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } @@ -2316,16 +2316,16 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } } break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } return retval; @@ -2337,28 +2337,28 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) AST_Expression::AST_ExprValue * AST_Expression::eval_un_op (AST_Expression::EvalKind ek) { - AST_ExprValue *retval = 0; + AST_ExprValue *retval = nullptr; - if (this->pd_ev != 0) + if (this->pd_ev != nullptr) { return this->pd_ev; } - if (this->pd_v1 == 0) + if (this->pd_v1 == nullptr) { - return 0; + return nullptr; } this->pd_v1->set_ev (this->pd_v1->eval_internal (ek)); - if (this->pd_v1->ev () == 0) + if (this->pd_v1->ev () == nullptr) { - return 0; + return nullptr; } ACE_NEW_RETURN (retval, AST_ExprValue, - 0); + nullptr); if (this->pd_v1->ev ()->et == EV_fixed) { @@ -2373,7 +2373,7 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) break; default: delete retval; - return 0; + return nullptr; } return retval; } @@ -2385,11 +2385,11 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) case EC_u_plus: this->pd_v1->set_ev (this->pd_v1->coerce (EV_double)); - if (this->pd_v1->ev () == 0) + if (this->pd_v1->ev () == nullptr) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.dval = this->pd_v1->ev ()->u.dval; @@ -2397,21 +2397,21 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) case EC_u_minus: this->pd_v1->set_ev (this->pd_v1->coerce (EV_double)); - if (this->pd_v1->ev () == 0) + if (this->pd_v1->ev () == nullptr) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } retval->u.dval = -(this->pd_v1->ev ()->u.dval); break; case EC_bit_neg: - if (this->pd_v1->ev () == 0) + if (this->pd_v1->ev () == nullptr) { delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } switch (this->pd_v1->ev ()->et) @@ -2446,15 +2446,15 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } break; default: delete retval; - retval = 0; - return 0; + retval = nullptr; + return nullptr; } return retval; @@ -2465,15 +2465,15 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) AST_Expression::AST_ExprValue * AST_Expression::eval_symbol (AST_Expression::EvalKind ek) { - UTL_Scope *s = 0; - AST_Decl *d = 0; - AST_Constant *c = 0; + UTL_Scope *s = nullptr; + AST_Decl *d = nullptr; + AST_Constant *c = nullptr; // Is there a symbol stored? - if (this->pd_n == 0) + if (this->pd_n == nullptr) { idl_global->err ()->eval_error (this); - return 0; + return nullptr; } // Get current scope for lookup. @@ -2482,28 +2482,28 @@ AST_Expression::eval_symbol (AST_Expression::EvalKind ek) s = idl_global->scopes ().top_non_null (); } - if (s == 0) + if (s == nullptr) { idl_global->err ()->lookup_error (this->pd_n); - return 0; + return nullptr; } // If we are a template parameter placeholder, just skip the // rest - nothing needs to be evaluated until instantiation // time. - if (this->param_holder_ != 0) + if (this->param_holder_ != nullptr) { - return 0; + return nullptr; } // Do lookup. d = s->lookup_by_name (this->pd_n, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (this->pd_n); - return 0; + return nullptr; } // Is it a constant? @@ -2512,7 +2512,7 @@ AST_Expression::eval_symbol (AST_Expression::EvalKind ek) { idl_global->err ()->constant_expected (this->pd_n, d); - return 0; + return nullptr; } if (d->node_type () == AST_Decl::NT_enum_val) @@ -2524,9 +2524,9 @@ AST_Expression::eval_symbol (AST_Expression::EvalKind ek) // OK, now evaluate the constant we just got, to produce its value. c = dynamic_cast<AST_Constant*> (d); - if (c == 0) + if (c == nullptr) { - return 0; + return nullptr; } return c->constant_value ()->eval_internal (ek); @@ -2535,7 +2535,7 @@ AST_Expression::eval_symbol (AST_Expression::EvalKind ek) bool AST_Expression::type_mismatch (AST_Expression::ExprType t) { - if (this->pd_ev != 0) + if (this->pd_ev != nullptr) { return incompatible_types (this->pd_ev->et, t); } @@ -2543,12 +2543,12 @@ AST_Expression::type_mismatch (AST_Expression::ExprType t) bool v1_mismatch = 0; bool v2_mismatch = 0; - if (this->pd_v1 != 0) + if (this->pd_v1 != nullptr) { v1_mismatch = this->pd_v1->type_mismatch (t); } - if (this->pd_v2 != 0) + if (this->pd_v2 != nullptr) { v2_mismatch = this->pd_v2->type_mismatch (t); } @@ -2563,13 +2563,13 @@ AST_Expression::AST_ExprValue * AST_Expression::check_and_coerce (AST_Expression::ExprType t, AST_Decl *d) { - if (d != 0) + if (d != nullptr) { AST_Decl *enum_val = idl_global->scopes ().top_non_null ()->lookup_by_name (this->pd_n, 1); - if (enum_val != 0) + if (enum_val != nullptr) { AST_Decl *enum_decl = ScopeAsDecl (enum_val->defined_in ()); @@ -2582,7 +2582,7 @@ AST_Expression::check_and_coerce (AST_Expression::ExprType t, if (d != enum_decl) { idl_global->err ()->incompatible_type_error (this); - return 0; + return nullptr; } } } @@ -2590,10 +2590,10 @@ AST_Expression::check_and_coerce (AST_Expression::ExprType t, if (this->type_mismatch (t)) { idl_global->err ()->incompatible_type_error (this); - return 0; + return nullptr; } - if (d != 0 && d->node_type () == AST_Decl::NT_typedef) + if (d != nullptr && d->node_type () == AST_Decl::NT_typedef) { this->tdef = d; } @@ -2607,7 +2607,7 @@ AST_Expression::check_and_coerce (AST_Expression::ExprType t, AST_Expression::AST_ExprValue * AST_Expression::coerce (AST_Expression::ExprType t) { - AST_ExprValue *tmp = 0; + AST_ExprValue *tmp = nullptr; // First, evaluate it, then try to coerce result type. // If already evaluated, return the result. @@ -2645,9 +2645,9 @@ AST_Expression::coerce (AST_Expression::ExprType t) break; } - if (tmp == 0) + if (tmp == nullptr) { - return 0; + return nullptr; } else { @@ -2656,10 +2656,10 @@ AST_Expression::coerce (AST_Expression::ExprType t) } // Create a copy to contain coercion result. - AST_ExprValue *copy = 0; + AST_ExprValue *copy = nullptr; ACE_NEW_RETURN (copy, AST_ExprValue, - 0); + nullptr); copy->et = this->pd_ev->et; @@ -2669,8 +2669,8 @@ AST_Expression::coerce (AST_Expression::ExprType t) case EV_void: case EV_none: delete copy; - copy = 0; - return 0; + copy = nullptr; + return nullptr; case EV_enum: copy->u.ulval = this->pd_ev->u.ulval; break; @@ -2731,14 +2731,14 @@ AST_Expression::coerce (AST_Expression::ExprType t) { AST_ExprValue *ev = coerce_value (copy, t); - if (ev == 0) + if (ev == nullptr) { // coerce_value() will either return 'copy' or // return 0 without freeing 'copy'. It's // deleted here instead of putting a zillion // delete statments inside coerce_value(). delete copy; - copy = 0; + copy = nullptr; } return ev; @@ -2750,7 +2750,7 @@ AST_Expression::AST_ExprValue * AST_Expression::eval_internal (AST_Expression::EvalKind ek) { // Already evaluated? - if (this->pd_ev != 0) + if (this->pd_ev != nullptr) { return eval_kind (this->pd_ev, ek); @@ -2789,10 +2789,10 @@ AST_Expression::eval_internal (AST_Expression::EvalKind ek) return eval_kind (this->pd_ev, ek); case EC_none: - return 0; + return nullptr; } - return 0; + return nullptr; } // Public operations. @@ -2809,7 +2809,7 @@ AST_Expression::evaluate (EvalKind ek) // args. At this point, we have knowledge that we must be an // enum constant, so we set the expression type here, rather // than at the point of creation. - if (ek == AST_Expression::EK_const && this->pd_n != 0) + if (ek == AST_Expression::EK_const && this->pd_n != nullptr) { this->pd_ev->et = AST_Expression::EV_enum; } @@ -2827,7 +2827,7 @@ AST_Expression::operator== (AST_Expression *vc) this->evaluate (EK_const); vc->evaluate (EK_const); - if (pd_ev == 0 || vc->ev() == 0) + if (pd_ev == nullptr || vc->ev() == nullptr) { return false; } @@ -2894,7 +2894,7 @@ AST_Expression::compare (AST_Expression *vc) this->evaluate (EK_const); vc->evaluate (EK_const); - if (this->pd_ev == 0 || vc->ev () == 0) + if (this->pd_ev == nullptr || vc->ev () == nullptr) { return false; } @@ -2927,11 +2927,11 @@ AST_Expression::compare (AST_Expression *vc) case EV_bool: return this->pd_ev->u.lval == vc->ev ()->u.lval; case EV_string: - if (this->pd_ev->u.strval == 0) + if (this->pd_ev->u.strval == nullptr) { - return vc->ev ()->u.strval == 0; + return vc->ev ()->u.strval == nullptr; } - else if (vc->ev ()->u.strval == 0) + else if (vc->ev ()->u.strval == nullptr) { return false; } @@ -2980,14 +2980,14 @@ dump_binary_expr (ACE_OSTREAM_TYPE &o, AST_Expression *n1, AST_Expression *n2) { - if (n1 != 0) + if (n1 != nullptr) { n1->dump (o); } o << " " << s << " "; - if (n2 != 0) + if (n2 != nullptr) { n2->dump (o); } @@ -3040,7 +3040,7 @@ dump_expr_val (ACE_OSTREAM_TYPE &o, AST_Expression::AST_ExprValue *ev) o << (ev->u.bval == true ? "TRUE" : "FALSE"); break; case AST_Expression::EV_string: - if (ev->u.strval != 0) + if (ev->u.strval != nullptr) { ev->u.strval->dump (o); } @@ -3069,7 +3069,7 @@ void AST_Expression::dump (ACE_OSTREAM_TYPE &o) { // See if it was a constant or was evaluated already. - if (this->pd_ev != 0) + if (this->pd_ev != nullptr) { dump_expr_val (o, this->pd_ev); return; @@ -3180,49 +3180,49 @@ AST_Expression::ast_accept (ast_visitor *visitor) void AST_Expression::destroy (void) { - if (0 != this->pd_ev) + if (nullptr != this->pd_ev) { if (EV_string == this->pd_ev->et) { this->pd_ev->u.strval->destroy (); delete this->pd_ev->u.strval; - this->pd_ev->u.strval = 0; + this->pd_ev->u.strval = nullptr; } else if (EV_wstring == this->pd_ev->et) { ACE::strdelete (this->pd_ev->u.wstrval); - this->pd_ev->u.wstrval = 0; + this->pd_ev->u.wstrval = nullptr; } } delete this->pd_ev; - this->pd_ev = 0; + this->pd_ev = nullptr; - if (this->pd_v1 != 0) + if (this->pd_v1 != nullptr) { this->pd_v1->destroy (); } delete this->pd_v1; - this->pd_v1 = 0; + this->pd_v1 = nullptr; - if (this->pd_v2 != 0) + if (this->pd_v2 != nullptr) { this->pd_v2->destroy (); } delete this->pd_v2; - this->pd_v2 = 0; + this->pd_v2 = nullptr; - if (this->pd_n != 0) + if (this->pd_n != nullptr) { this->pd_n->destroy (); } delete this->pd_n; - this->pd_n = 0; + this->pd_n = nullptr; - if (this->param_holder_ != 0) + if (this->param_holder_ != nullptr) { this->param_holder_->destroy (); delete this->param_holder_; - this->param_holder_ = 0; + this->param_holder_ = nullptr; } } diff --git a/TAO/TAO_IDL/ast/ast_factory.cpp b/TAO/TAO_IDL/ast/ast_factory.cpp index 37ffc48726d..01c03c9cf90 100644 --- a/TAO/TAO_IDL/ast/ast_factory.cpp +++ b/TAO/TAO_IDL/ast/ast_factory.cpp @@ -86,7 +86,7 @@ AST_Factory::AST_Factory (UTL_ScopedName *n) AST_Decl (AST_Decl::NT_factory, n), UTL_Scope (AST_Decl::NT_factory), - pd_exceptions (0), + pd_exceptions (nullptr), pd_n_exceptions (0), argument_count_ (-1), has_native_ (0) @@ -132,10 +132,10 @@ AST_Factory::has_native (void) void AST_Factory::destroy (void) { - if (0 != this->pd_exceptions) + if (nullptr != this->pd_exceptions) { this->pd_exceptions->destroy (); - this->pd_exceptions = 0; + this->pd_exceptions = nullptr; } this->AST_Decl::destroy (); @@ -145,7 +145,7 @@ AST_Factory::destroy (void) UTL_ExceptList * AST_Factory::be_add_exceptions (UTL_ExceptList *t) { - if (this->pd_exceptions != 0) + if (this->pd_exceptions != nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); @@ -153,7 +153,7 @@ AST_Factory::be_add_exceptions (UTL_ExceptList *t) else { this->pd_exceptions = t; - this->pd_n_exceptions = (t == 0 ? 0 : t->length ()); + this->pd_n_exceptions = (t == nullptr ? 0 : t->length ()); } return this->pd_exceptions; @@ -170,9 +170,9 @@ AST_Factory::compute_argument_attr (void) return 0; } - AST_Decl *d = 0; - AST_Type *type = 0; - AST_Argument *arg = 0; + AST_Decl *d = nullptr; + AST_Type *type = nullptr; + AST_Argument *arg = nullptr; this->argument_count_ = 0; @@ -214,11 +214,11 @@ AST_Factory::fe_add_argument (AST_Argument *t) UTL_NameList * AST_Factory::fe_add_exceptions (UTL_NameList *t) { - UTL_ScopedName *nl_n = 0; - AST_Type *fe = 0; - AST_Decl *d = 0; + UTL_ScopedName *nl_n = nullptr; + AST_Type *fe = nullptr; + AST_Decl *d = nullptr; - this->pd_exceptions = 0; + this->pd_exceptions = nullptr; for (UTL_NamelistActiveIterator nl_i (t); !nl_i.is_done (); @@ -228,10 +228,10 @@ AST_Factory::fe_add_exceptions (UTL_NameList *t) d = this->defined_in ()->lookup_by_name (nl_n, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (nl_n); - return 0; + return nullptr; } AST_Decl::NodeType nt = d->node_type (); @@ -241,17 +241,17 @@ AST_Factory::fe_add_exceptions (UTL_NameList *t) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); - return 0; + return nullptr; } fe = dynamic_cast<AST_Type*> (d); - UTL_ExceptList *el = 0; + UTL_ExceptList *el = nullptr; ACE_NEW_RETURN (el, - UTL_ExceptList (fe, 0), - 0); + UTL_ExceptList (fe, nullptr), + nullptr); - if (this->pd_exceptions == 0) + if (this->pd_exceptions == nullptr) { this->pd_exceptions = el; } @@ -268,7 +268,7 @@ AST_Factory::fe_add_exceptions (UTL_NameList *t) // each place it is passed in. t->destroy (); delete t; - t = 0; + t = nullptr; return t; } @@ -277,7 +277,7 @@ AST_Factory::fe_add_exceptions (UTL_NameList *t) void AST_Factory::dump (ACE_OSTREAM_TYPE &o) { - AST_Decl *d = 0; + AST_Decl *d = nullptr; this->dump_i (o, "factory "); this->local_name ()->dump (o); diff --git a/TAO/TAO_IDL/ast/ast_field.cpp b/TAO/TAO_IDL/ast/ast_field.cpp index c0b90fecd14..8c70b35c599 100644 --- a/TAO/TAO_IDL/ast/ast_field.cpp +++ b/TAO/TAO_IDL/ast/ast_field.cpp @@ -202,7 +202,7 @@ AST_Field::destroy (void) { this->ref_type_->destroy (); delete this->ref_type_; - this->ref_type_ = 0; + this->ref_type_ = nullptr; } this->AST_Decl::destroy (); diff --git a/TAO/TAO_IDL/ast/ast_finder.cpp b/TAO/TAO_IDL/ast/ast_finder.cpp index fe474026188..b16ad2b375d 100644 --- a/TAO/TAO_IDL/ast/ast_finder.cpp +++ b/TAO/TAO_IDL/ast/ast_finder.cpp @@ -30,7 +30,7 @@ AST_Finder::destroy (void) void AST_Finder::dump (ACE_OSTREAM_TYPE &o) { - AST_Decl *d = 0; + AST_Decl *d = nullptr; this->dump_i (o, "finder "); this->local_name ()->dump (o); diff --git a/TAO/TAO_IDL/ast/ast_fixed.cpp b/TAO/TAO_IDL/ast/ast_fixed.cpp index a001d37421c..3048fd0f0bc 100644 --- a/TAO/TAO_IDL/ast/ast_fixed.cpp +++ b/TAO/TAO_IDL/ast/ast_fixed.cpp @@ -31,11 +31,11 @@ void AST_Fixed::destroy () { pd_digits->destroy (); delete pd_digits; - pd_digits = 0; + pd_digits = nullptr; pd_scale->destroy (); delete pd_scale; - pd_scale = 0; + pd_scale = nullptr; AST_ConcreteType::destroy (); } diff --git a/TAO/TAO_IDL/ast/ast_generator.cpp b/TAO/TAO_IDL/ast/ast_generator.cpp index ec289b43547..0e08c14098d 100644 --- a/TAO/TAO_IDL/ast/ast_generator.cpp +++ b/TAO/TAO_IDL/ast/ast_generator.cpp @@ -118,10 +118,10 @@ AST_PredefinedType * AST_Generator::create_predefined_type (AST_PredefinedType::PredefinedType t, UTL_ScopedName *n) { - AST_PredefinedType *retval = 0; + AST_PredefinedType *retval = nullptr; ACE_NEW_RETURN (retval, AST_PredefinedType (t, n), - 0); + nullptr); return retval; } @@ -130,7 +130,7 @@ AST_Module * AST_Generator::create_module (UTL_Scope *s, UTL_ScopedName *n) { - AST_Module *retval = 0; + AST_Module *retval = nullptr; // Check for another module of the same name in the scope. for (UTL_ScopeActiveIterator iter (s, UTL_Scope::IK_decls); @@ -144,7 +144,7 @@ AST_Generator::create_module (UTL_Scope *s, { // Create this new module with referance to the // "first" previous module found in scope. - ACE_NEW_RETURN (retval, AST_Module (n, m), 0); + ACE_NEW_RETURN (retval, AST_Module (n, m), nullptr); retval->prefix (const_cast<char *> (m->prefix ())); return retval; } @@ -169,7 +169,7 @@ AST_Generator::create_module (UTL_Scope *s, { // Create this new module with referance to the // "first" previous module found in scope. - ACE_NEW_RETURN (retval, AST_Module (n, m), 0); + ACE_NEW_RETURN (retval, AST_Module (n, m), nullptr); return retval; } } @@ -177,17 +177,17 @@ AST_Generator::create_module (UTL_Scope *s, } // There is no previous module to this one - ACE_NEW_RETURN (retval, AST_Module (n), 0); + ACE_NEW_RETURN (retval, AST_Module (n), nullptr); return retval; } AST_Root * AST_Generator::create_root (UTL_ScopedName *n) { - AST_Root *retval = 0; + AST_Root *retval = nullptr; ACE_NEW_RETURN (retval, AST_Root (n), - 0); + nullptr); return retval; } @@ -201,7 +201,7 @@ AST_Generator::create_interface (UTL_ScopedName *n, bool is_local, bool is_abstract) { - AST_Interface *retval = 0; + AST_Interface *retval = nullptr; ACE_NEW_RETURN (retval, AST_Interface (n, inherits, @@ -210,7 +210,7 @@ AST_Generator::create_interface (UTL_ScopedName *n, n_inherits_flat, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -222,16 +222,16 @@ AST_Generator::create_interface_fwd (UTL_ScopedName *n, { AST_Interface *full_defn = this->create_interface (n, - 0, + nullptr, -1, - 0, + nullptr, 0, is_local, is_abstract); - AST_InterfaceFwd *retval = 0; + AST_InterfaceFwd *retval = nullptr; ACE_NEW_RETURN (retval, AST_InterfaceFwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -251,7 +251,7 @@ AST_Generator::create_valuetype (UTL_ScopedName *n, bool is_truncatable, bool is_custom) { - AST_ValueType *retval = 0; + AST_ValueType *retval = nullptr; ACE_NEW_RETURN (retval, AST_ValueType (n, inherits, @@ -265,7 +265,7 @@ AST_Generator::create_valuetype (UTL_ScopedName *n, is_abstract, is_truncatable, is_custom), - 0); + nullptr); // The following helps with OBV_ namespace generation. AST_Module *m = dynamic_cast<AST_Module*> (retval->defined_in ()); @@ -282,23 +282,23 @@ AST_Generator::create_valuetype_fwd (UTL_ScopedName *n, bool is_abstract) { AST_ValueType *full_defn = this->create_valuetype (n, - 0, + nullptr, -1, + nullptr, + nullptr, 0, + nullptr, 0, - 0, - 0, - 0, - 0, + nullptr, is_abstract, false, false); - AST_ValueTypeFwd *retval = 0; + AST_ValueTypeFwd *retval = nullptr; ACE_NEW_RETURN (retval, AST_ValueTypeFwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -318,7 +318,7 @@ AST_Generator::create_eventtype (UTL_ScopedName *n, bool is_truncatable, bool is_custom) { - AST_EventType *retval = 0; + AST_EventType *retval = nullptr; ACE_NEW_RETURN (retval, AST_EventType (n, inherits, @@ -332,12 +332,12 @@ AST_Generator::create_eventtype (UTL_ScopedName *n, is_abstract, is_truncatable, is_custom), - 0); + nullptr); // The following helps with OBV_ namespace generation. AST_Module *m = dynamic_cast<AST_Module*> (retval->defined_in ()); - if (m != 0) + if (m != nullptr) { m->set_has_nested_valuetype (); } @@ -350,23 +350,23 @@ AST_Generator::create_eventtype_fwd (UTL_ScopedName *n, bool is_abstract) { AST_EventType *full_defn = this->create_eventtype (n, - 0, + nullptr, -1, + nullptr, + nullptr, 0, + nullptr, 0, - 0, - 0, - 0, - 0, + nullptr, is_abstract, false, false); - AST_EventTypeFwd *retval = 0; + AST_EventTypeFwd *retval = nullptr; ACE_NEW_RETURN (retval, AST_EventTypeFwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -380,7 +380,7 @@ AST_Generator::create_component (UTL_ScopedName *n, AST_Interface **supports_flat, long n_supports_flat) { - AST_Component *retval = 0; + AST_Component *retval = nullptr; ACE_NEW_RETURN (retval, AST_Component (n, base_component, @@ -388,7 +388,7 @@ AST_Generator::create_component (UTL_ScopedName *n, n_supports, supports_flat, n_supports_flat), - 0); + nullptr); return retval; } @@ -397,17 +397,17 @@ AST_ComponentFwd * AST_Generator::create_component_fwd (UTL_ScopedName *n) { AST_Component *full_defn = this->create_component (n, - 0, - 0, + nullptr, + nullptr, -1, - 0, + nullptr, 0); - AST_ComponentFwd *retval = 0; + AST_ComponentFwd *retval = nullptr; ACE_NEW_RETURN (retval, AST_ComponentFwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -423,7 +423,7 @@ AST_Generator::create_home (UTL_ScopedName *n, AST_Interface **supports_flat, long n_supports_flat) { - AST_Home *retval = 0; + AST_Home *retval = nullptr; ACE_NEW_RETURN (retval, AST_Home (n, base_home, @@ -433,7 +433,7 @@ AST_Generator::create_home (UTL_ScopedName *n, n_supports, supports_flat, n_supports_flat), - 0); + nullptr); return retval; } @@ -443,12 +443,12 @@ AST_Generator::create_exception (UTL_ScopedName *n, bool is_local, bool is_abstract) { - AST_Exception *retval = 0; + AST_Exception *retval = nullptr; ACE_NEW_RETURN (retval, AST_Exception (n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -458,12 +458,12 @@ AST_Generator::create_structure (UTL_ScopedName *n, bool is_local, bool is_abstract) { - AST_Structure *retval = 0; + AST_Structure *retval = nullptr; ACE_NEW_RETURN (retval, AST_Structure (n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -474,11 +474,11 @@ AST_Generator::create_structure_fwd (UTL_ScopedName *n) AST_Structure *full_defn = this->create_structure (n, false, false); - AST_StructureFwd *retval = 0; + AST_StructureFwd *retval = nullptr; ACE_NEW_RETURN (retval, AST_StructureFwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -489,12 +489,12 @@ AST_Generator::create_enum (UTL_ScopedName *n, bool is_local, bool is_abstract) { - AST_Enum *retval = 0; + AST_Enum *retval = nullptr; ACE_NEW_RETURN (retval, AST_Enum (n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -506,14 +506,14 @@ AST_Generator::create_operation (AST_Type *rt, bool is_local, bool is_abstract) { - AST_Operation *retval = 0; + AST_Operation *retval = nullptr; ACE_NEW_RETURN (retval, AST_Operation (rt, fl, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -523,12 +523,12 @@ AST_Generator::create_field (AST_Type *ft, UTL_ScopedName *n, AST_Field::Visibility vis) { - AST_Field *retval = 0; + AST_Field *retval = nullptr; ACE_NEW_RETURN (retval, AST_Field (ft, n, vis), - 0); + nullptr); return retval; } @@ -538,12 +538,12 @@ AST_Generator::create_argument (AST_Argument::Direction d, AST_Type *ft, UTL_ScopedName *n) { - AST_Argument *retval = 0; + AST_Argument *retval = nullptr; ACE_NEW_RETURN (retval, AST_Argument (d, ft, n), - 0); + nullptr); return retval; } @@ -555,14 +555,14 @@ AST_Generator::create_attribute (bool ro, bool is_local, bool is_abstract) { - AST_Attribute *retval = 0; + AST_Attribute *retval = nullptr; ACE_NEW_RETURN (retval, AST_Attribute (ro, ft, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -573,13 +573,13 @@ AST_Generator::create_union (AST_ConcreteType *dt, bool is_local, bool is_abstract) { - AST_Union *retval = 0; + AST_Union *retval = nullptr; ACE_NEW_RETURN (retval, AST_Union (dt, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -587,15 +587,15 @@ AST_Generator::create_union (AST_ConcreteType *dt, AST_UnionFwd * AST_Generator::create_union_fwd (UTL_ScopedName *n) { - AST_Union *full_defn = this->create_union (0, + AST_Union *full_defn = this->create_union (nullptr, n, false, false); - AST_UnionFwd *retval = 0; + AST_UnionFwd *retval = nullptr; ACE_NEW_RETURN (retval, AST_UnionFwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -606,12 +606,12 @@ AST_Generator::create_union_branch (UTL_LabelList *ll, AST_Type *ft, UTL_ScopedName *n) { - AST_UnionBranch *retval = 0; + AST_UnionBranch *retval = nullptr; ACE_NEW_RETURN (retval, AST_UnionBranch (ll, ft, n), - 0); + nullptr); return retval; } @@ -620,11 +620,11 @@ AST_UnionLabel * AST_Generator::create_union_label (AST_UnionLabel::UnionLabel ul, AST_Expression *v) { - AST_UnionLabel *retval = 0; + AST_UnionLabel *retval = nullptr; ACE_NEW_RETURN (retval, AST_UnionLabel (ul, v), - 0); + nullptr); return retval; } @@ -634,12 +634,12 @@ AST_Generator::create_constant (AST_Expression::ExprType et, AST_Expression *ev, UTL_ScopedName *n) { - AST_Constant *retval = 0; + AST_Constant *retval = nullptr; ACE_NEW_RETURN (retval, AST_Constant (et, ev, n), - 0); + nullptr); return retval; } @@ -647,10 +647,10 @@ AST_Generator::create_constant (AST_Expression::ExprType et, AST_Expression * AST_Generator::create_expr (UTL_ScopedName *n) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (n), - 0); + nullptr); return retval; } @@ -659,11 +659,11 @@ AST_Expression * AST_Generator::create_expr (AST_Expression *v, AST_Expression::ExprType t) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (v, t), - 0); + nullptr); return retval; } @@ -673,12 +673,12 @@ AST_Generator::create_expr (AST_Expression::ExprComb c, AST_Expression *v1, AST_Expression *v2) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (c, v1, v2), - 0); + nullptr); return retval; } @@ -686,10 +686,10 @@ AST_Generator::create_expr (AST_Expression::ExprComb c, AST_Expression * AST_Generator::create_expr (ACE_CDR::Long v) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (v), - 0); + nullptr); return retval; } @@ -697,10 +697,10 @@ AST_Generator::create_expr (ACE_CDR::Long v) AST_Expression * AST_Generator::create_expr (ACE_CDR::LongLong l) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (l), - 0); + nullptr); return retval; } @@ -708,10 +708,10 @@ AST_Generator::create_expr (ACE_CDR::LongLong l) AST_Expression * AST_Generator::create_expr (ACE_CDR::Boolean b) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (b), - 0); + nullptr); return retval; } @@ -719,10 +719,10 @@ AST_Generator::create_expr (ACE_CDR::Boolean b) AST_Expression * AST_Generator::create_expr (ACE_CDR::ULong v) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (v), - 0); + nullptr); return retval; } @@ -730,10 +730,10 @@ AST_Generator::create_expr (ACE_CDR::ULong v) AST_Expression * AST_Generator::create_expr (ACE_CDR::ULongLong l) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (l), - 0); + nullptr); return retval; } @@ -742,10 +742,10 @@ AST_Expression * AST_Generator::create_expr (ACE_CDR::ULong v, AST_Expression::ExprType t) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (v, t), - 0); + nullptr); return retval; } @@ -753,10 +753,10 @@ AST_Generator::create_expr (ACE_CDR::ULong v, AST_Expression * AST_Generator::create_expr (UTL_String *s) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (s), - 0); + nullptr); return retval; } @@ -764,10 +764,10 @@ AST_Generator::create_expr (UTL_String *s) AST_Expression * AST_Generator::create_expr (ACE_CDR::Char c) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (c), - 0); + nullptr); return retval; } @@ -775,10 +775,10 @@ AST_Generator::create_expr (ACE_CDR::Char c) AST_Expression * AST_Generator::create_expr (ACE_OutputCDR::from_wchar wc) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (wc), - 0); + nullptr); return retval; } @@ -786,10 +786,10 @@ AST_Generator::create_expr (ACE_OutputCDR::from_wchar wc) AST_Expression * AST_Generator::create_expr (char *s) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (s), - 0); + nullptr); return retval; } @@ -797,10 +797,10 @@ AST_Generator::create_expr (char *s) AST_Expression * AST_Generator::create_expr (ACE_CDR::Double d) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (d), - 0); + nullptr); return retval; } @@ -808,10 +808,10 @@ AST_Generator::create_expr (ACE_CDR::Double d) AST_Expression * AST_Generator::create_expr (const ACE_CDR::Fixed &f) { - AST_Expression *retval = 0; + AST_Expression *retval = nullptr; ACE_NEW_RETURN (retval, AST_Expression (f), - 0); + nullptr); return retval; } @@ -820,11 +820,11 @@ AST_EnumVal * AST_Generator::create_enum_val (ACE_CDR::ULong v, UTL_ScopedName *n) { - AST_EnumVal *retval = 0; + AST_EnumVal *retval = nullptr; ACE_NEW_RETURN (retval, AST_EnumVal (v, n), - 0); + nullptr); return retval; } @@ -836,14 +836,14 @@ AST_Generator::create_array (UTL_ScopedName *n, bool is_local, bool is_abstract) { - AST_Array *retval = 0; + AST_Array *retval = nullptr; ACE_NEW_RETURN (retval, AST_Array (n, ndims, dims, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -855,14 +855,14 @@ AST_Generator::create_sequence (AST_Expression *ms, bool is_local, bool is_abstract) { - AST_Sequence *retval = 0; + AST_Sequence *retval = nullptr; ACE_NEW_RETURN (retval, AST_Sequence (ms, bt, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -872,14 +872,14 @@ AST_Generator::create_string (AST_Expression *ms) { Identifier id ("string"); UTL_ScopedName n (&id, - 0); + nullptr); - AST_String *retval = 0; + AST_String *retval = nullptr; ACE_NEW_RETURN (retval, AST_String (AST_Decl::NT_string, &n, ms), - 0); + nullptr); return retval; } @@ -891,18 +891,18 @@ AST_Generator::create_wstring (AST_Expression *ms) ? "string" : "wstring"); UTL_ScopedName n (&id, - 0); + nullptr); AST_Decl::NodeType nt = sizeof (ACE_CDR::WChar) == 1 ? AST_Decl::NT_string : AST_Decl::NT_wstring; - AST_String *retval = 0; + AST_String *retval = nullptr; ACE_NEW_RETURN (retval, AST_String (nt, &n, ms, sizeof (ACE_OS::WChar)), - 0); + nullptr); return retval; } @@ -912,9 +912,9 @@ AST_Generator::create_fixed (AST_Expression *digits, AST_Expression *scale) { Identifier id ("fixed"); - UTL_ScopedName name (&id, 0); - AST_Fixed *retval = 0; - ACE_NEW_RETURN (retval, AST_Fixed (&name, digits, scale), 0); + UTL_ScopedName name (&id, nullptr); + AST_Fixed *retval = nullptr; + ACE_NEW_RETURN (retval, AST_Fixed (&name, digits, scale), nullptr); return retval; } @@ -924,13 +924,13 @@ AST_Generator::create_typedef (AST_Type *bt, bool is_local, bool is_abstract) { - AST_Typedef *retval = 0; + AST_Typedef *retval = nullptr; ACE_NEW_RETURN (retval, AST_Typedef (bt, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -938,10 +938,10 @@ AST_Generator::create_typedef (AST_Type *bt, AST_Native * AST_Generator::create_native (UTL_ScopedName *n) { - AST_Native *retval = 0; + AST_Native *retval = nullptr; ACE_NEW_RETURN (retval, AST_Native (n), - 0); + nullptr); return retval; } @@ -949,10 +949,10 @@ AST_Generator::create_native (UTL_ScopedName *n) AST_Factory * AST_Generator::create_factory (UTL_ScopedName *n) { - AST_Factory *retval = 0; + AST_Factory *retval = nullptr; ACE_NEW_RETURN (retval, AST_Factory (n), - 0); + nullptr); return retval; } @@ -960,10 +960,10 @@ AST_Generator::create_factory (UTL_ScopedName *n) AST_Finder * AST_Generator::create_finder (UTL_ScopedName *n) { - AST_Finder *retval = 0; + AST_Finder *retval = nullptr; ACE_NEW_RETURN (retval, AST_Finder (n), - 0); + nullptr); return retval; } @@ -972,10 +972,10 @@ AST_ValueBox * AST_Generator::create_valuebox (UTL_ScopedName *n, AST_Type *boxed_type) { - AST_ValueBox *retval = 0; + AST_ValueBox *retval = nullptr; ACE_NEW_RETURN (retval, AST_ValueBox (n, boxed_type), - 0); + nullptr); return retval; } @@ -983,10 +983,10 @@ AST_Generator::create_valuebox (UTL_ScopedName *n, AST_PortType * AST_Generator::create_porttype (UTL_ScopedName *n) { - AST_PortType *retval = 0; + AST_PortType *retval = nullptr; ACE_NEW_RETURN (retval, AST_PortType (n), - 0); + nullptr); return retval; } @@ -995,11 +995,11 @@ AST_Provides * AST_Generator::create_provides (UTL_ScopedName *n, AST_Type *provides_type) { - AST_Provides *retval = 0; + AST_Provides *retval = nullptr; ACE_NEW_RETURN (retval, AST_Provides (n, provides_type), - 0); + nullptr); return retval; } @@ -1009,12 +1009,12 @@ AST_Generator::create_uses (UTL_ScopedName *n, AST_Type *uses_type, bool is_multiple) { - AST_Uses *retval = 0; + AST_Uses *retval = nullptr; ACE_NEW_RETURN (retval, AST_Uses (n, uses_type, is_multiple), - 0); + nullptr); return retval; } @@ -1023,11 +1023,11 @@ AST_Publishes * AST_Generator::create_publishes (UTL_ScopedName *n, AST_Type *publishes_type) { - AST_Publishes *retval = 0; + AST_Publishes *retval = nullptr; ACE_NEW_RETURN (retval, AST_Publishes (n, publishes_type), - 0); + nullptr); return retval; } @@ -1036,11 +1036,11 @@ AST_Emits * AST_Generator::create_emits (UTL_ScopedName *n, AST_Type *emits_type) { - AST_Emits *retval = 0; + AST_Emits *retval = nullptr; ACE_NEW_RETURN (retval, AST_Emits (n, emits_type), - 0); + nullptr); return retval; } @@ -1048,11 +1048,11 @@ AST_Consumes * AST_Generator::create_consumes (UTL_ScopedName *n, AST_Type *consumes_type) { - AST_Consumes *retval = 0; + AST_Consumes *retval = nullptr; ACE_NEW_RETURN (retval, AST_Consumes (n, consumes_type), - 0); + nullptr); return retval; } @@ -1062,11 +1062,11 @@ AST_Generator::create_extended_port ( UTL_ScopedName *n, AST_PortType *porttype_ref) { - AST_Extended_Port *retval = 0; + AST_Extended_Port *retval = nullptr; ACE_NEW_RETURN (retval, AST_Extended_Port (n, porttype_ref), - 0); + nullptr); return retval; } @@ -1076,11 +1076,11 @@ AST_Generator::create_mirror_port ( UTL_ScopedName *n, AST_PortType *porttype_ref) { - AST_Mirror_Port *retval = 0; + AST_Mirror_Port *retval = nullptr; ACE_NEW_RETURN (retval, AST_Mirror_Port (n, porttype_ref), - 0); + nullptr); return retval; } @@ -1090,11 +1090,11 @@ AST_Generator::create_connector ( UTL_ScopedName *n, AST_Connector *base_connector) { - AST_Connector *retval = 0; + AST_Connector *retval = nullptr; ACE_NEW_RETURN (retval, AST_Connector (n, base_connector), - 0); + nullptr); return retval; } @@ -1104,11 +1104,11 @@ AST_Generator::create_template_module ( UTL_ScopedName *n, FE_Utils::T_PARAMLIST_INFO *template_params) { - AST_Template_Module *retval = 0; + AST_Template_Module *retval = nullptr; ACE_NEW_RETURN (retval, AST_Template_Module (n, template_params), - 0); + nullptr); return retval; } @@ -1119,12 +1119,12 @@ AST_Generator::create_template_module_inst ( AST_Template_Module *ref, FE_Utils::T_ARGLIST *template_args) { - AST_Template_Module_Inst *retval = 0; + AST_Template_Module_Inst *retval = nullptr; ACE_NEW_RETURN (retval, AST_Template_Module_Inst (n, ref, template_args), - 0); + nullptr); return retval; } @@ -1135,12 +1135,12 @@ AST_Generator::create_template_module_ref ( AST_Template_Module *ref, UTL_StrList *param_refs) { - AST_Template_Module_Ref *retval = 0; + AST_Template_Module_Ref *retval = nullptr; ACE_NEW_RETURN (retval, AST_Template_Module_Ref (n, ref, param_refs), - 0); + nullptr); return retval; } @@ -1150,11 +1150,11 @@ AST_Generator::create_param_holder ( UTL_ScopedName *parameter_name, FE_Utils::T_Param_Info *info) { - AST_Param_Holder *retval = 0; + AST_Param_Holder *retval = nullptr; ACE_NEW_RETURN (retval, AST_Param_Holder (parameter_name, info), - 0); + nullptr); return retval; } @@ -1163,8 +1163,8 @@ AST_Annotation_Decl * AST_Generator::create_annotation_decl ( UTL_ScopedName *name) { - AST_Annotation_Decl *retval = 0; - ACE_NEW_RETURN (retval, AST_Annotation_Decl (name), 0); + AST_Annotation_Decl *retval = nullptr; + ACE_NEW_RETURN (retval, AST_Annotation_Decl (name), nullptr); return retval; } @@ -1173,8 +1173,8 @@ AST_Generator::create_annotation_appl ( UTL_ScopedName *name, AST_Annotation_Appl::Params *params) { - AST_Annotation_Appl *retval = 0; - ACE_NEW_RETURN (retval, AST_Annotation_Appl (name, params), 0); + AST_Annotation_Appl *retval = nullptr; + ACE_NEW_RETURN (retval, AST_Annotation_Appl (name, params), nullptr); return retval; } @@ -1184,7 +1184,7 @@ AST_Generator::create_annotation_member ( AST_Type *type, UTL_ScopedName *name) { - AST_Annotation_Member *retval = 0; - ACE_NEW_RETURN (retval, AST_Annotation_Member (expr_type, type, name), 0); + AST_Annotation_Member *retval = nullptr; + ACE_NEW_RETURN (retval, AST_Annotation_Member (expr_type, type, name), nullptr); return retval; } diff --git a/TAO/TAO_IDL/ast/ast_home.cpp b/TAO/TAO_IDL/ast/ast_home.cpp index 057080b35e2..94125b24147 100644 --- a/TAO/TAO_IDL/ast/ast_home.cpp +++ b/TAO/TAO_IDL/ast/ast_home.cpp @@ -45,11 +45,11 @@ AST_Home::AST_Home (UTL_ScopedName *n, AST_ValueType *pk = dynamic_cast<AST_ValueType*> (primary_key); - if (pk != 0) + if (pk != nullptr) { idl_global->primary_keys ().enqueue_tail (pk); } - else if (primary_key != 0) + else if (primary_key != nullptr) { // If we are here, it's a param holder and we must destroy it. this->owns_primary_key_ = true; @@ -64,9 +64,9 @@ AST_Decl * AST_Home::look_in_inherited (UTL_ScopedName *e, bool full_def_only) { - AST_Decl *d = 0; + AST_Decl *d = nullptr; - if (this->pd_base_home != 0) + if (this->pd_base_home != nullptr) { d = this->pd_base_home->lookup_by_name (e, full_def_only); @@ -80,8 +80,8 @@ AST_Decl * AST_Home::look_in_supported (UTL_ScopedName *e, bool full_def_only) { - AST_Decl *d = 0; - AST_Type **is = 0; + AST_Decl *d = nullptr; + AST_Type **is = nullptr; long nis = -1; // Can't look in an interface which was not yet defined. @@ -89,7 +89,7 @@ AST_Home::look_in_supported (UTL_ScopedName *e, { idl_global->err ()->fwd_decl_lookup (this, e); - return 0; + return nullptr; } // OK, loop through supported interfaces. @@ -110,7 +110,7 @@ AST_Home::look_in_supported (UTL_ScopedName *e, d = (i)->lookup_by_name_r (e, full_def_only); - if (d != 0) + if (d != nullptr) { break; } @@ -126,7 +126,7 @@ AST_Home::special_lookup (UTL_ScopedName *e, { AST_Decl *d = this->look_in_inherited (e, full_def_only); - if (d == 0) + if (d == nullptr) { d = this->look_in_supported (e, full_def_only); } @@ -147,7 +147,7 @@ AST_Type ** AST_Home::supports (void) const { return - this->pd_base_home == 0 + this->pd_base_home == nullptr ? this->inherits () : this->inherits () + 1; } @@ -179,13 +179,13 @@ AST_Home::transfer_scope_elements (AST_Interface *dst) { AST_Decl *d = src_iter.item (); - Identifier *local_id = 0; + Identifier *local_id = nullptr; ACE_NEW (local_id, Identifier (d->local_name ()->get_string ())); - UTL_ScopedName *last_segment = 0; + UTL_ScopedName *last_segment = nullptr; ACE_NEW (last_segment, UTL_ScopedName (local_id, - 0)); + nullptr)); UTL_ScopedName *full_name = static_cast<UTL_ScopedName *> (dst->name ()->copy ()); full_name->nconc (last_segment); @@ -199,7 +199,7 @@ AST_Home::transfer_scope_elements (AST_Interface *dst) long const end = this->pd_decls_used; for (long i = 0; i < end; ++i) { - this->pd_decls[i] = 0; + this->pd_decls[i] = nullptr; --this->pd_decls_used; } } @@ -212,7 +212,7 @@ AST_Home::destroy (void) { this->pd_primary_key->destroy (); delete this->pd_primary_key; - this->pd_primary_key = 0; + this->pd_primary_key = nullptr; } this->AST_Interface::destroy (); @@ -227,20 +227,20 @@ AST_Home::dump (ACE_OSTREAM_TYPE &o) this->dump_i (o, " "); - if (this->pd_base_home != 0) + if (this->pd_base_home != nullptr) { this->dump_i (o, ": "); this->pd_base_home->local_name ()->dump (o); } - if (this->pd_managed_component != 0) + if (this->pd_managed_component != nullptr) { this->dump_i (o, "\n"); this->dump_i (o, "manages "); this->pd_managed_component->local_name ()->dump (o); } - if (this->pd_primary_key != 0) + if (this->pd_primary_key != nullptr) { this->dump_i (o, "\n"); this->dump_i (o, "primary key "); diff --git a/TAO/TAO_IDL/ast/ast_interface.cpp b/TAO/TAO_IDL/ast/ast_interface.cpp index e40a624b733..10c016d309f 100644 --- a/TAO/TAO_IDL/ast/ast_interface.cpp +++ b/TAO/TAO_IDL/ast/ast_interface.cpp @@ -121,10 +121,10 @@ AST_Interface::AST_Interface (UTL_ScopedName *n, pd_inherits_flat (ih_flat), pd_n_inherits_flat (nih_flat), home_equiv_ (false), - fwd_decl_ (0), + fwd_decl_ (nullptr), has_mixed_parentage_ (-1), - ami_handler_ (0), - ami4ccm_uses_ (0) + ami_handler_ (nullptr), + ami4ccm_uses_ (nullptr) { this->size_type (AST_Type::VARIABLE); // always the case this->has_constructor (true); // always the case @@ -176,7 +176,7 @@ AST_Interface::is_defined (void) // is found, then we are defined for code generation // purposes. See AST_InterfaceFwd::destroy() to // see the difference for cleanup purposes. - return (0 == this->fwd_decl_ + return (nullptr == this->fwd_decl_ ? this->pd_n_inherits >= 0 : this->fwd_decl_->is_defined ()); } @@ -304,22 +304,22 @@ void AST_Interface::fwd_redefinition_helper (AST_Interface *&i, UTL_Scope *s) { - if (i == 0) + if (i == nullptr) { return; } UTL_Scope *scope = i->defined_in (); - const char *prefix_holder = 0; + const char *prefix_holder = nullptr; // If our prefix is empty, we check to see if an ancestor has one. - while (ACE_OS::strcmp (i->prefix (), "") == 0 && scope != 0) + while (ACE_OS::strcmp (i->prefix (), "") == 0 && scope != nullptr) { AST_Decl *parent = ScopeAsDecl (scope); prefix_holder = parent->prefix (); // We have reached global scope. - if (prefix_holder == 0) + if (prefix_holder == nullptr) { break; } @@ -331,18 +331,18 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i, // Fwd redefinition should be in the same scope, so local // lookup is all that's needed. AST_Decl *d = s->lookup_by_name_local (i->local_name (), false); - if (d != 0) + if (d != nullptr) { scope = d->defined_in (); // If the lookup prefix is empty, we check to see if an ancestor has one. - while (ACE_OS::strcmp (d->prefix (), "") == 0 && scope != 0) + while (ACE_OS::strcmp (d->prefix (), "") == 0 && scope != nullptr) { AST_Decl *parent = ScopeAsDecl (scope); prefix_holder = parent->prefix (); // We have reached global scope. - if (prefix_holder == 0) + if (prefix_holder == nullptr) { break; } @@ -352,7 +352,7 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i, } AST_Interface *fd = dynamic_cast<AST_Interface *> (d); - if (fd == 0) + if (fd == nullptr) { AST_Decl::NodeType nt = d->node_type (); @@ -395,7 +395,7 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i, fd->redefine (i); AST_InterfaceFwd *fwd = fd->fwd_decl (); - if (fwd != 0) + if (fwd != nullptr) { fwd->set_as_defined (); } @@ -491,7 +491,7 @@ AST_Interface::insert_non_dup (AST_Type *t, // them inside the queue making sure that there are no duplicates. // If we are doing a component, the inheritance list is actually a // supports list. - if (f != 0) + if (f != nullptr) { for (long i = 0; i < f->n_inherits (); ++i) { @@ -519,7 +519,7 @@ AST_Interface::insert_non_dup (AST_Type *t, (void) q_iter.advance ()) { // Queue element. - AST_Type **temp = 0; + AST_Type **temp = nullptr; (void) q_iter.next (temp); @@ -539,7 +539,7 @@ AST_Interface::insert_non_dup (AST_Type *t, (void) del_q_iter.advance ()) { // Queue element. - AST_Type **temp = 0; + AST_Type **temp = nullptr; (void) del_q_iter.next (temp); @@ -653,10 +653,10 @@ AST_Interface::redef_clash (void) this->insert_queue.reset (); this->redef_clash_populate_r (this); - AST_Type **group1_member = 0; - AST_Type **group2_member = 0; - AST_Decl *group1_member_item = 0; - AST_Decl *group2_member_item = 0; + AST_Type **group1_member = nullptr; + AST_Type **group2_member = nullptr; + AST_Decl *group1_member_item = nullptr; + AST_Decl *group2_member_item = nullptr; int i = 1; @@ -671,7 +671,7 @@ AST_Interface::redef_clash (void) (void) group1_iter.next (group1_member); UTL_Scope *s = DeclAsScope (*group1_member); - if (s != 0) + if (s != nullptr) { for (UTL_ScopeActiveIterator group1_member_items ( s, @@ -715,7 +715,7 @@ AST_Interface::redef_clash (void) (void) group2_iter.next (group2_member); UTL_Scope *ss = DeclAsScope (*group2_member); - if (ss != 0) + if (ss != nullptr) { for (UTL_ScopeActiveIterator group2_member_items ( ss, @@ -786,15 +786,15 @@ AST_Decl * AST_Interface::look_in_inherited (UTL_ScopedName *e, bool full_def_only) { - AST_Decl *d = 0; - AST_Decl *d_before = 0; - AST_Type **is = 0; + AST_Decl *d = nullptr; + AST_Decl *d_before = nullptr; + AST_Type **is = nullptr; long nis = -1; // Can't look in an interface which was not yet defined. if (!this->is_defined ()) { - return 0; + return nullptr; } // OK, loop through inherited interfaces. @@ -808,15 +808,15 @@ AST_Interface::look_in_inherited (UTL_ScopedName *e, { AST_Interface *i = dynamic_cast<AST_Interface*> (*is); - if (i == 0) + if (i == nullptr) { continue; } d = (i)->lookup_by_name_r (e, full_def_only); - if (d != 0) + if (d != nullptr) { - if (d_before == 0) + if (d_before == nullptr) { // First result found. d_before = d; @@ -861,11 +861,11 @@ AST_Interface::look_in_inherited_local (Identifier *e, // Can't look in an interface which was not yet defined. if (!this->is_defined ()) { - return 0; + return nullptr; } - AST_Decl *d = 0; - AST_Type **is = 0; + AST_Decl *d = nullptr; + AST_Type **is = nullptr; long nis = -1; /// OK, loop through inherited interfaces. @@ -875,14 +875,14 @@ AST_Interface::look_in_inherited_local (Identifier *e, { AST_Interface *i = dynamic_cast<AST_Interface*> (*is); - if (i == 0) + if (i == nullptr) { continue; } d = i->lookup_by_name_local (e, full_def_only); - if (d != 0) + if (d != nullptr) { break; } @@ -894,25 +894,25 @@ AST_Interface::look_in_inherited_local (Identifier *e, AST_Decl * AST_Interface::lookup_for_add (AST_Decl *d) { - if (d == 0) + if (d == nullptr) { - return 0; + return nullptr; } Identifier *id = d->local_name (); - AST_Decl *prev = 0; + AST_Decl *prev = nullptr; AST_Decl::NodeType nt = NT_root; long nis = -1; - AST_Interface **is = 0; + AST_Interface **is = nullptr; if (this->idl_keyword_clash (id) != 0) { - return 0; + return nullptr; } prev = this->lookup_by_name_local (id, false); - if (prev != 0) + if (prev != nullptr) { nt = prev->node_type (); @@ -928,7 +928,7 @@ AST_Interface::lookup_for_add (AST_Decl *d) { prev = (*is)->lookup_by_name_local (id, false); - if (prev != 0) + if (prev != nullptr) { nt = prev->node_type (); @@ -939,7 +939,7 @@ AST_Interface::lookup_for_add (AST_Decl *d) } } - return 0; + return nullptr; } int @@ -987,7 +987,7 @@ AST_Interface::analyze_parentage (void) { AST_Interface *parent = dynamic_cast<AST_Interface*> (this->pd_inherits[i]); - if (parent == 0) + if (parent == nullptr) { // The item is a template param holder. continue; @@ -1007,11 +1007,11 @@ AST_Interface::analyze_parentage (void) bool in_tmpl_module = false; UTL_Scope *s = this->defined_in (); - while (s != 0) + while (s != nullptr) { AST_Template_Module *m = dynamic_cast<AST_Template_Module*> (s); - if (m != 0) + if (m != nullptr) { in_tmpl_module = true; break; @@ -1043,18 +1043,18 @@ AST_Interface::special_lookup (UTL_ScopedName *e, AST_Decl *d = this->look_in_inherited_local (e->head (), full_def_only); - if (d != 0) + if (d != nullptr) { UTL_Scope *s = DeclAsScope (d); UTL_ScopedName *sn = static_cast<UTL_ScopedName *> (e->tail ()); - return (s != 0 && sn != 0 + return (s != nullptr && sn != nullptr ? s->lookup_by_name_r (sn, full_def_only, final_parent_decl) : d); } - return 0; + return nullptr; } AST_Interface * @@ -1089,12 +1089,12 @@ AST_Interface::destroy (void) !i.done (); (void) i.advance ()) { - AST_Type **tt = 0; + AST_Type **tt = nullptr; i.next (tt); AST_Type *t = *tt; t->destroy (); delete t; - t = 0; + t = nullptr; } // The destroy() we are in gets called twice if we start from @@ -1103,11 +1103,11 @@ AST_Interface::destroy (void) this->param_holders_.reset (); delete [] this->pd_inherits; - this->pd_inherits = 0; + this->pd_inherits = nullptr; this->pd_n_inherits = 0; delete [] this->pd_inherits_flat; - this->pd_inherits_flat = 0; + this->pd_inherits_flat = nullptr; this->pd_n_inherits_flat = 0; this->UTL_Scope::destroy (); diff --git a/TAO/TAO_IDL/ast/ast_interface_fwd.cpp b/TAO/TAO_IDL/ast/ast_interface_fwd.cpp index d9055bc54bf..651cd763d7a 100644 --- a/TAO/TAO_IDL/ast/ast_interface_fwd.cpp +++ b/TAO/TAO_IDL/ast/ast_interface_fwd.cpp @@ -128,7 +128,7 @@ bool AST_InterfaceFwd::full_def_seen (void) { UTL_Scope *s = this->defined_in (); - AST_Interface *i = 0; + AST_Interface *i = nullptr; // If a full definition is seen in a previous module opening // or anywhere in the current scope (before or after our @@ -141,11 +141,11 @@ AST_InterfaceFwd::full_def_seen (void) m->look_in_prev_mods_local (this->local_name (), false); - if (0 != d) + if (nullptr != d) { i = dynamic_cast<AST_Interface*> (d); - if (0 != i && i->is_defined ()) + if (nullptr != i && i->is_defined ()) { return true; } @@ -158,7 +158,7 @@ AST_InterfaceFwd::full_def_seen (void) { i = dynamic_cast<AST_Interface*> (iter.item ()); - if (0 != i && this->local_name ()->compare (i->local_name ())) + if (nullptr != i && this->local_name ()->compare (i->local_name ())) { if (i->is_defined ()) { @@ -225,17 +225,17 @@ AST_InterfaceFwd::is_defined (void) { AST_Module *m = dynamic_cast<AST_Module*> (this->defined_in ()); - if (0 != m) + if (nullptr != m) { AST_Decl *d = m->look_in_prev_mods_local (this->local_name ()); - if (0 != d) + if (nullptr != d) { // We could be looking at a superfluous forward decl // of an interface already defined. AST_Interface *full = dynamic_cast<AST_Interface *> (d); - if (0 != full) + if (nullptr != full) { set_as_defined (); } @@ -248,7 +248,7 @@ AST_InterfaceFwd::is_defined (void) // is a sufficient way to tell if our full // definition has already gone through the // add_to_scope process. - if (0 != fwd && fwd->is_defined ()) + if (nullptr != fwd && fwd->is_defined ()) { set_as_defined (); } @@ -276,7 +276,7 @@ AST_InterfaceFwd::destroy (void) { if (has_ownership_) { - set_full_definition (0); + set_full_definition (nullptr); } this->AST_Type::destroy (); @@ -299,7 +299,7 @@ AST_InterfaceFwd::adjust_found ( if (ignore_fwd) { AST_Interface *i = this->full_definition (); - return (full_def_only && !i->is_defined () ? 0 : i); + return (full_def_only && !i->is_defined () ? nullptr : i); } return this; diff --git a/TAO/TAO_IDL/ast/ast_module.cpp b/TAO/TAO_IDL/ast/ast_module.cpp index 7f57889f270..8be259c0559 100644 --- a/TAO/TAO_IDL/ast/ast_module.cpp +++ b/TAO/TAO_IDL/ast/ast_module.cpp @@ -108,8 +108,8 @@ AST_Module::AST_Module (UTL_ScopedName *n, AST_Module *previous) pd_has_nested_valuetype_ (0), previous_opening_ (previous), last_in_same_parent_scope_ (this), - from_inst_ (0), - from_ref_ (0) + from_inst_ (nullptr), + from_ref_ (nullptr) { // NOTE previous passed into this constructor should be // the FIRST module that is a previous opening of this same @@ -255,7 +255,7 @@ AST_Module::look_in_prev_mods_local (Identifier *e, } } - return 0; + return nullptr; } AST_Decl * @@ -296,7 +296,7 @@ AST_Module::look_in_prev_mods (UTL_ScopedName *e, } } - return 0; // Not found. + return nullptr; // Not found. } int @@ -374,7 +374,7 @@ AST_Module::fe_add_module (AST_Module *t) } // Already defined and cannot be redefined? Or already used? - AST_Module *m = 0; + AST_Module *m = nullptr; AST_Decl *d = this->lookup_for_add (t); if (d) @@ -385,7 +385,7 @@ AST_Module::fe_add_module (AST_Module *t) t, this, d); - return 0; + return nullptr; } // has_ancestor() returns TRUE if both nodes are the same. @@ -393,7 +393,7 @@ AST_Module::fe_add_module (AST_Module *t) if (t != m && t->has_ancestor (d)) { idl_global->err ()->redefinition_in_scope (t, d); - return 0; + return nullptr; } const char *prev_prefix = d->prefix (); diff --git a/TAO/TAO_IDL/ast/ast_operation.cpp b/TAO/TAO_IDL/ast/ast_operation.cpp index 8152f257cf9..98c0742ab85 100644 --- a/TAO/TAO_IDL/ast/ast_operation.cpp +++ b/TAO/TAO_IDL/ast/ast_operation.cpp @@ -104,16 +104,16 @@ AST_Operation::AST_Operation (AST_Type *rt, UTL_Scope(AST_Decl::NT_op), pd_return_type (rt), pd_flags (fl), - pd_context (0), - pd_exceptions (0), + pd_context (nullptr), + pd_exceptions (nullptr), argument_count_ (-1), has_in_arguments_ (false), has_native_ (0) { - AST_PredefinedType *pdt = 0; + AST_PredefinedType *pdt = nullptr; // Check that if the operation is oneway, the return type must be void. - if (rt != 0 && pd_flags == OP_oneway) + if (rt != nullptr && pd_flags == OP_oneway) { if (rt->node_type () != AST_Decl::NT_pre_defined) { @@ -124,7 +124,7 @@ AST_Operation::AST_Operation (AST_Type *rt, { pdt = dynamic_cast<AST_PredefinedType*> (rt); - if (pdt == 0 || pdt->pt () != AST_PredefinedType::PT_void) + if (pdt == nullptr || pdt->pt () != AST_PredefinedType::PT_void) { idl_global->err ()->error1 (UTL_Error::EIDL_NONVOID_ONEWAY, this); @@ -205,10 +205,10 @@ AST_Operation::destroy (void) // destroy() method does NOT delete the contained // exception nodes. - if (this->pd_exceptions != 0) + if (this->pd_exceptions != nullptr) { this->pd_exceptions->destroy (); - this->pd_exceptions = 0; + this->pd_exceptions = nullptr; } this->UTL_Scope::destroy (); @@ -218,7 +218,7 @@ AST_Operation::destroy (void) UTL_ExceptList * AST_Operation::be_add_exceptions (UTL_ExceptList *t) { - if (this->pd_exceptions != 0) + if (this->pd_exceptions != nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); @@ -242,9 +242,9 @@ AST_Operation::compute_argument_attr (void) return 0; } - AST_Decl *d = 0; - AST_Type *type = 0; - AST_Argument *arg = 0; + AST_Decl *d = nullptr; + AST_Type *type = nullptr; + AST_Argument *arg = nullptr; this->argument_count_ = 0; @@ -311,26 +311,26 @@ AST_Operation::fe_add_context (UTL_StrList *t) UTL_NameList * AST_Operation::fe_add_exceptions (UTL_NameList *t) { - if (0 == t) + if (nullptr == t) { - return 0; + return nullptr; } - UTL_ScopedName *nl_n = 0; - AST_Type *fe = 0; - AST_Decl *d = 0; + UTL_ScopedName *nl_n = nullptr; + AST_Type *fe = nullptr; + AST_Decl *d = nullptr; - this->pd_exceptions = 0; + this->pd_exceptions = nullptr; for (UTL_NamelistActiveIterator nl_i (t); !nl_i.is_done (); nl_i.next ()) { nl_n = nl_i.item (); d = this->lookup_by_name (nl_n, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (nl_n); - return 0; + return nullptr; } AST_Decl::NodeType nt = d->node_type (); @@ -398,33 +398,33 @@ AST_Operation::fe_add_exceptions (UTL_NameList *t) fe = dynamic_cast<AST_Type*> (d); - if (oneway_op && fe != 0) + if (oneway_op && fe != nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); } - if (fe == 0) + if (fe == nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_RAISES, this); - return 0; + return nullptr; } - if (this->pd_exceptions == 0) + if (this->pd_exceptions == nullptr) { ACE_NEW_RETURN (this->pd_exceptions, UTL_ExceptList (fe, - 0), - 0); + nullptr), + nullptr); } else { - UTL_ExceptList *el = 0; + UTL_ExceptList *el = nullptr; ACE_NEW_RETURN (el, UTL_ExceptList (fe, - 0), - 0); + nullptr), + nullptr); this->pd_exceptions->nconc (el); } @@ -435,8 +435,8 @@ AST_Operation::fe_add_exceptions (UTL_NameList *t) // each place it is passed in. t->destroy (); delete t; - t = 0; - return 0; + t = nullptr; + return nullptr; } AST_Argument * @@ -449,9 +449,9 @@ AST_Operation::fe_add_argument (AST_Argument *t) void AST_Operation::dump (ACE_OSTREAM_TYPE &o) { - AST_Decl *d = 0; - AST_Type *e = 0; - UTL_String *s = 0; + AST_Decl *d = nullptr; + AST_Type *e = nullptr; + UTL_String *s = nullptr; if (this->pd_flags == OP_oneway) { @@ -482,7 +482,7 @@ AST_Operation::dump (ACE_OSTREAM_TYPE &o) this->dump_i (o, ")"); - if (this->pd_exceptions != 0) + if (this->pd_exceptions != nullptr) { this->dump_i (o, " raises("); @@ -503,7 +503,7 @@ AST_Operation::dump (ACE_OSTREAM_TYPE &o) this->dump_i (o, ")"); } - if (this->pd_context != 0) + if (this->pd_context != nullptr) { this->dump_i (o, " context("); diff --git a/TAO/TAO_IDL/ast/ast_predefined_type.cpp b/TAO/TAO_IDL/ast/ast_predefined_type.cpp index 8ce1533a825..1e71009b033 100644 --- a/TAO/TAO_IDL/ast/ast_predefined_type.cpp +++ b/TAO/TAO_IDL/ast/ast_predefined_type.cpp @@ -91,8 +91,8 @@ AST_PredefinedType::AST_PredefinedType (PredefinedType t, n), pd_pt (t) { - UTL_ScopedName *new_name = 0; - Identifier *id = 0; + UTL_ScopedName *new_name = nullptr; + Identifier *id = nullptr; // Generate a new Scoped Name for us such that we belong to the CORBA // namespace. @@ -103,7 +103,7 @@ AST_PredefinedType::AST_PredefinedType (PredefinedType t, ACE_NEW (new_name, UTL_ScopedName (id, - 0)); + nullptr)); } else { @@ -112,9 +112,9 @@ AST_PredefinedType::AST_PredefinedType (PredefinedType t, ACE_NEW (new_name, UTL_ScopedName (id, - 0)); + nullptr)); - UTL_ScopedName *conc_name = 0; + UTL_ScopedName *conc_name = nullptr; switch (this->pt ()) { @@ -197,7 +197,7 @@ AST_PredefinedType::AST_PredefinedType (PredefinedType t, ACE_NEW (conc_name, UTL_ScopedName (id, - 0)); + nullptr)); new_name->nconc (conc_name); } diff --git a/TAO/TAO_IDL/ast/ast_recursive.cpp b/TAO/TAO_IDL/ast/ast_recursive.cpp index 6f483984d17..61f9204c416 100644 --- a/TAO/TAO_IDL/ast/ast_recursive.cpp +++ b/TAO/TAO_IDL/ast/ast_recursive.cpp @@ -86,7 +86,7 @@ bool AST_illegal_interface_recursion (AST_Decl *t) { // Can't be 0 since we know we have an interface or valuetype. - AST_Decl *d = 0; + AST_Decl *d = nullptr; // If we encounter the argument in an enclosing scope, it's illegal. for (UTL_ScopeStackActiveIterator i (idl_global->scopes ()); @@ -114,7 +114,7 @@ AST_illegal_interface_recursion (AST_Decl *t) bool AST_illegal_recursive_type (AST_Decl *t) { - if (t == 0) + if (t == nullptr) { return false; } @@ -122,7 +122,7 @@ AST_illegal_recursive_type (AST_Decl *t) AST_Decl::NodeType nt; AST_Type *ut = dynamic_cast<AST_Type*> (t); - if (ut != 0) + if (ut != nullptr) { ut = ut->unaliased_type (); nt = ut->node_type (); @@ -145,8 +145,8 @@ AST_illegal_recursive_type (AST_Decl *t) bool check_for_struct = false; bool check_for_union = false; - AST_Structure *st1 = 0; - AST_Union *un1 = 0; + AST_Structure *st1 = nullptr; + AST_Union *un1 = nullptr; // Narrow the type appropriately so comparison will work. if (t->node_type () == AST_Decl::NT_struct) @@ -154,7 +154,7 @@ AST_illegal_recursive_type (AST_Decl *t) check_for_struct = true; st1 = dynamic_cast<AST_Structure*> (t); - if (st1 == 0) + if (st1 == nullptr) { return false; // NOT ILLEGAL. } @@ -164,15 +164,15 @@ AST_illegal_recursive_type (AST_Decl *t) check_for_union = true; un1 = dynamic_cast<AST_Union*> (t); - if (un1 == 0) + if (un1 == nullptr) { return false; // NOT ILLEGAL. } } - UTL_Scope *s = 0; - AST_Structure *st2 = 0; - AST_Union *un2 = 0; + UTL_Scope *s = nullptr; + AST_Structure *st2 = nullptr; + AST_Union *un2 = nullptr; // OK, iterate up the stack. for (UTL_ScopeStackActiveIterator i (idl_global->scopes ()); @@ -183,7 +183,7 @@ AST_illegal_recursive_type (AST_Decl *t) // If we hit a NULL we're done since it means that we're nested inside // a sequence, where recursive types may be used. - if (s == 0) + if (s == nullptr) { return false; // NOT ILLEGAL. } @@ -194,7 +194,7 @@ AST_illegal_recursive_type (AST_Decl *t) { st2 = dynamic_cast<AST_Structure*> (s); - if (st2 != 0 && st2 == st1) + if (st2 != nullptr && st2 == st1) { return true; // ILLEGAL RECURSIVE TYPE USE. } @@ -204,7 +204,7 @@ AST_illegal_recursive_type (AST_Decl *t) { un2 = dynamic_cast<AST_Union*> (s); - if (un2 != 0 && un2 == un1) + if (un2 != nullptr && un2 == un1) { return true; // ILLEGAL RECURSIVE TYPE USE. } diff --git a/TAO/TAO_IDL/ast/ast_root.cpp b/TAO/TAO_IDL/ast/ast_root.cpp index 51106457bd3..b102233d5f2 100644 --- a/TAO/TAO_IDL/ast/ast_root.cpp +++ b/TAO/TAO_IDL/ast/ast_root.cpp @@ -118,9 +118,9 @@ AST_Root::nmembers (void) AST_Sequence * AST_Root::fe_add_sequence (AST_Sequence *t) { - if (t == 0) + if (t == nullptr) { - return 0; + return nullptr; } this->add_to_local_types (t); @@ -131,9 +131,9 @@ AST_Root::fe_add_sequence (AST_Sequence *t) AST_String * AST_Root::fe_add_string (AST_String *t) { - if (t == 0) + if (t == nullptr) { - return 0; + return nullptr; } this->add_to_local_types (t); @@ -144,9 +144,9 @@ AST_Root::fe_add_string (AST_String *t) AST_Array * AST_Root::fe_add_array (AST_Array *t) { - if (t == 0) + if (t == nullptr) { - return 0; + return nullptr; } this->add_to_local_types (t); @@ -172,7 +172,7 @@ void AST_Root::destroy (void) { long i = 0; - AST_Decl *d = 0; + AST_Decl *d = nullptr; // Just destroy and delete everything but the CORBA // module, and the 'void' keyword, in case we are @@ -186,7 +186,7 @@ AST_Root::destroy (void) d->destroy (); delete d; - d = 0; + d = nullptr; --this->pd_decls_used; } @@ -198,7 +198,7 @@ AST_Root::destroy (void) // up when AST_Root::fini() calls UTL_Scope::destroy (). for (i = 2; i < this->pd_referenced_used; ++i) { - this->pd_referenced[i] = 0; + this->pd_referenced[i] = nullptr; } this->pd_referenced_used = 2; @@ -208,7 +208,7 @@ AST_Root::destroy (void) Identifier *id = this->pd_name_referenced[i]; id->destroy (); delete id; - id = 0; + id = nullptr; } this->pd_name_referenced_used = 2; diff --git a/TAO/TAO_IDL/ast/ast_sequence.cpp b/TAO/TAO_IDL/ast/ast_sequence.cpp index 3ea5ea2649f..1747a0234d4 100644 --- a/TAO/TAO_IDL/ast/ast_sequence.cpp +++ b/TAO/TAO_IDL/ast/ast_sequence.cpp @@ -120,7 +120,7 @@ AST_Sequence::AST_Sequence (AST_Expression *ms, idl_global->err ()->not_a_type (bt); bt->destroy (); delete bt; - bt = 0; + bt = nullptr; throw Bailout (); } } @@ -128,7 +128,7 @@ AST_Sequence::AST_Sequence (AST_Expression *ms, // Check if we are bounded or unbounded. An expression value of 0 means // unbounded. If our bound is a template parameter, skip the // check altogether, this node will trigger no code generation. - if (ms->param_holder () == 0) + if (ms->param_holder () == nullptr) { this->unbounded_ = (ms->ev ()->u.ulval == 0); } @@ -160,7 +160,7 @@ AST_Sequence::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) AST_Type *type = dynamic_cast<AST_Type*> (this->base_type ()); - if (type == 0) + if (type == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("AST_Sequence::in_recursion - ") @@ -186,7 +186,7 @@ AST_Sequence::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) } bool recursion_found = false; - AST_Type** recursable_type = 0; + AST_Type** recursable_type = nullptr; list.get (recursable_type, 0); if (!ACE_OS::strcmp (type->full_name (), (*recursable_type)->full_name ())) @@ -270,12 +270,12 @@ AST_Sequence::destroy (void) { this->pd_base_type->destroy (); delete this->pd_base_type; - this->pd_base_type = 0; + this->pd_base_type = nullptr; } this->pd_max_size->destroy (); delete this->pd_max_size; - this->pd_max_size = 0; + this->pd_max_size = nullptr; this->AST_ConcreteType::destroy (); } diff --git a/TAO/TAO_IDL/ast/ast_string.cpp b/TAO/TAO_IDL/ast/ast_string.cpp index 21b82bade87..8ba0f1126be 100644 --- a/TAO/TAO_IDL/ast/ast_string.cpp +++ b/TAO/TAO_IDL/ast/ast_string.cpp @@ -94,9 +94,9 @@ AST_String::AST_String (AST_Decl::NodeType nt, // Always the case. this->size_type (AST_Type::VARIABLE); - Identifier *id = 0; - UTL_ScopedName *new_name = 0; - UTL_ScopedName *conc_name = 0; + Identifier *id = nullptr; + UTL_ScopedName *new_name = nullptr; + UTL_ScopedName *conc_name = nullptr; bool narrow = this->width () == (ssize_t) sizeof (char); ACE_NEW (id, @@ -104,7 +104,7 @@ AST_String::AST_String (AST_Decl::NodeType nt, ACE_NEW (conc_name, UTL_ScopedName (id, - 0)); + nullptr)); if (narrow) { @@ -174,7 +174,7 @@ AST_String::destroy (void) { this->pd_max_size->destroy (); delete this->pd_max_size; - this->pd_max_size = 0; + this->pd_max_size = nullptr; this->AST_ConcreteType::destroy (); } diff --git a/TAO/TAO_IDL/ast/ast_structure.cpp b/TAO/TAO_IDL/ast/ast_structure.cpp index 12418207f0c..f18c4c0d48a 100644 --- a/TAO/TAO_IDL/ast/ast_structure.cpp +++ b/TAO/TAO_IDL/ast/ast_structure.cpp @@ -95,7 +95,7 @@ AST_Structure::AST_Structure (UTL_ScopedName *n, UTL_Scope (AST_Decl::NT_struct), member_count_ (-1), local_struct_ (-1), - fwd_decl_ (0) + fwd_decl_ (nullptr) { } @@ -114,7 +114,7 @@ AST_Structure::AST_Structure (AST_Decl::NodeType nt, UTL_Scope (nt), member_count_ (-1), local_struct_ (-1), - fwd_decl_ (0) + fwd_decl_ (nullptr) { } @@ -161,7 +161,7 @@ AST_Structure::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) { AST_Field *field = dynamic_cast<AST_Field*> (si.item ()); - if (field == 0) + if (field == nullptr) // This will be an enum value or other legitimate non-field // member - in any case, no recursion. { @@ -176,7 +176,7 @@ AST_Structure::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) type = td->primitive_base_type (); } - if (type == 0) + if (type == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) AST_Structure::") @@ -283,7 +283,7 @@ AST_Structure::contains_wstring (void) bool AST_Structure::is_defined (void) { - return 0 == this->fwd_decl_ || this->fwd_decl_->is_defined (); + return nullptr == this->fwd_decl_ || this->fwd_decl_->is_defined (); } bool @@ -302,7 +302,7 @@ AST_Structure::legal_for_primary_key (void) const { AST_Field *f = dynamic_cast<AST_Field*> (si.item ()); - if (f != 0 && !f->field_type ()->legal_for_primary_key ()) + if (f != nullptr && !f->field_type ()->legal_for_primary_key ()) { retval = false; break; @@ -412,7 +412,7 @@ void AST_Structure::fwd_redefinition_helper (AST_Structure *&i, UTL_Scope *s) { - if (i == 0) + if (i == nullptr) { return; } @@ -422,9 +422,9 @@ AST_Structure::fwd_redefinition_helper (AST_Structure *&i, AST_Decl *d = s->lookup_by_name_local (i->local_name (), false); - AST_Structure *fd = 0; + AST_Structure *fd = nullptr; - if (d != 0) + if (d != nullptr) { // Full definition must have the same prefix as the forward declaration. if (ACE_OS::strcmp (i->prefix (), d->prefix ()) != 0) @@ -456,7 +456,7 @@ AST_Structure::fwd_redefinition_helper (AST_Structure *&i, } // Successful? - if (fd == 0) + if (fd == nullptr) { // Should we give an error here? // No, look in fe_add_interface. @@ -492,7 +492,7 @@ AST_Structure::fwd_redefinition_helper (AST_Structure *&i, fd->redefine (i); AST_StructureFwd *fwd = fd->fwd_decl (); - if (0 != fwd) + if (nullptr != fwd) { // So the fwd decl won't destroy us at cleanup time. // Unlike interfaces, valuetypes and components, it's @@ -549,7 +549,7 @@ AST_Structure::compute_size_type (void) AST_Field *f = dynamic_cast<AST_Field*> (d); AST_Type *t = f->field_type (); - if (t != 0) + if (t != nullptr) { this->size_type (t->size_type ()); @@ -591,7 +591,7 @@ AST_Structure::operator[] (const size_t index) size_t count = member_count_ <= 0 ? 0 : member_count_; if (index >= count) { - return 0; + return nullptr; } size_t i = 0; for (UTL_ScopeActiveIterator si (this, UTL_Scope::IK_decls); @@ -604,7 +604,7 @@ AST_Structure::operator[] (const size_t index) } i++; } - return 0; + return nullptr; } AST_Decl * @@ -620,5 +620,5 @@ AST_Structure::operator[] (const char* name) return field; } } - return 0; + return nullptr; } diff --git a/TAO/TAO_IDL/ast/ast_structure_fwd.cpp b/TAO/TAO_IDL/ast/ast_structure_fwd.cpp index ea9771c9770..7508232512a 100644 --- a/TAO/TAO_IDL/ast/ast_structure_fwd.cpp +++ b/TAO/TAO_IDL/ast/ast_structure_fwd.cpp @@ -77,11 +77,11 @@ AST_StructureFwd::set_as_defined (void) void AST_StructureFwd::destroy (void) { - if (!this->is_defined_ && 0 != this->pd_full_definition) + if (!this->is_defined_ && nullptr != this->pd_full_definition) { this->pd_full_definition->destroy (); delete this->pd_full_definition; - this->pd_full_definition = 0; + this->pd_full_definition = nullptr; } this->AST_Type::destroy (); @@ -104,7 +104,7 @@ AST_StructureFwd::adjust_found ( if (ignore_fwd) { AST_Structure *s = this->full_definition (); - return (full_def_only && !s->is_defined () ? 0 : s); + return (full_def_only && !s->is_defined () ? nullptr : s); } return this; diff --git a/TAO/TAO_IDL/ast/ast_template_module.cpp b/TAO/TAO_IDL/ast/ast_template_module.cpp index 0672f4f0155..ed80af0a4b3 100644 --- a/TAO/TAO_IDL/ast/ast_template_module.cpp +++ b/TAO/TAO_IDL/ast/ast_template_module.cpp @@ -55,7 +55,7 @@ AST_Template_Module::match_arg_names (FE_Utils::T_ARGLIST *args) !i.done (); i.advance (), ++slot) { - AST_Decl **item = 0; + AST_Decl **item = nullptr; i.next (item); AST_Decl *d = *item; @@ -66,15 +66,15 @@ AST_Template_Module::match_arg_names (FE_Utils::T_ARGLIST *args) d = td->primitive_base_type (); } - FE_Utils::T_Param_Info *param = 0; + FE_Utils::T_Param_Info *param = nullptr; (void) this->template_params_->get (param, slot); - const char *s = 0; + const char *s = nullptr; if (! this->match_one_param (param, d)) { UTL_ScopedName *n = d->name (); - if (n == 0) + if (n == nullptr) { AST_Constant *c = dynamic_cast<AST_Constant*> (d); @@ -99,15 +99,15 @@ AST_Template_Module::match_param_refs (UTL_StrList *refs, UTL_Scope *decl_scope) { UTL_Scope *s = decl_scope; - AST_Template_Module *enclosing = 0; + AST_Template_Module *enclosing = nullptr; - while (enclosing == 0 && s != 0) + while (enclosing == nullptr && s != nullptr) { enclosing = dynamic_cast<AST_Template_Module*> (s); s = ScopeAsDecl (s)->defined_in (); } - if (enclosing == 0) + if (enclosing == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("AST_Template_Module::") @@ -124,7 +124,7 @@ AST_Template_Module::match_param_refs (UTL_StrList *refs, FE_Utils::T_Param_Info *enclosing_param = enclosing->find_param (i.item ()); - if (enclosing_param == 0) + if (enclosing_param == nullptr) { // Enclosing param not found return false; @@ -144,7 +144,7 @@ void AST_Template_Module::destroy (void) { delete this->template_params_; - this->template_params_ = 0; + this->template_params_ = nullptr; this->AST_Module::destroy (); } @@ -194,15 +194,15 @@ AST_Template_Module::match_one_param (FE_Utils::T_Param_Info *param, ex->check_and_coerce (param->const_type_, param->enum_const_type_decl_); - if (ev == 0) + if (ev == nullptr) { idl_global->err ()->coercion_error (ex, param->const_type_); } - bool retval = (ev != 0); + bool retval = (ev != nullptr); delete ev; - ev = 0; + ev = nullptr; return retval; } @@ -217,7 +217,7 @@ AST_Template_Module::find_param (UTL_String *name) !i.done (); i.advance ()) { - FE_Utils::T_Param_Info *param = 0; + FE_Utils::T_Param_Info *param = nullptr; i.next (param); if (param->name_ == name->get_string ()) @@ -226,7 +226,7 @@ AST_Template_Module::find_param (UTL_String *name) } } - return 0; + return nullptr; } bool @@ -238,7 +238,7 @@ AST_Template_Module::match_param_by_type ( !i.done (); i.advance ()) { - FE_Utils::T_Param_Info *my_param = 0; + FE_Utils::T_Param_Info *my_param = nullptr; i.next (my_param); if (param->type_ == my_param->type_) diff --git a/TAO/TAO_IDL/ast/ast_template_module_inst.cpp b/TAO/TAO_IDL/ast/ast_template_module_inst.cpp index 0283863f685..9a5ca38cb38 100644 --- a/TAO/TAO_IDL/ast/ast_template_module_inst.cpp +++ b/TAO/TAO_IDL/ast/ast_template_module_inst.cpp @@ -47,7 +47,7 @@ AST_Template_Module_Inst::destroy (void) { this->template_args_->destroy (); delete this->template_args_; - this->template_args_ = 0; + this->template_args_ = nullptr; this->AST_Field::destroy (); } diff --git a/TAO/TAO_IDL/ast/ast_template_module_ref.cpp b/TAO/TAO_IDL/ast/ast_template_module_ref.cpp index 4ecb803e548..d99aea1d280 100644 --- a/TAO/TAO_IDL/ast/ast_template_module_ref.cpp +++ b/TAO/TAO_IDL/ast/ast_template_module_ref.cpp @@ -50,7 +50,7 @@ AST_Template_Module_Ref::destroy (void) { this->param_refs_->destroy (); delete this->param_refs_; - this->param_refs_ = 0; + this->param_refs_ = nullptr; this->AST_Field::destroy (); } @@ -72,7 +72,7 @@ AST_Template_Module_Ref::adjust_found ( bool ignore_fwd, bool /*full_def_only*/) { - return ignore_fwd ? 0 : this; + return ignore_fwd ? nullptr : this; } bool diff --git a/TAO/TAO_IDL/ast/ast_type.cpp b/TAO/TAO_IDL/ast/ast_type.cpp index f9cb40d2297..7de482fe6e4 100644 --- a/TAO/TAO_IDL/ast/ast_type.cpp +++ b/TAO/TAO_IDL/ast/ast_type.cpp @@ -85,7 +85,7 @@ AST_Type::AST_Type (AST_Decl::NodeType nt, ifr_fwd_added_ (0), size_type_ (AST_Type::SIZE_UNKNOWN), has_constructor_ (0), - nested_type_name_ (0), + nested_type_name_ (nullptr), in_recursion_ (-1), recursing_in_legal_pk_ (false) { @@ -212,7 +212,7 @@ AST_Type * AST_Type::unaliased_type (void) { AST_Type *t = this; - AST_Typedef *td = 0; + AST_Typedef *td = nullptr; AST_Decl::NodeType nt = this->node_type (); while (nt == AST_Decl::NT_typedef) @@ -252,11 +252,11 @@ AST_Type::nested_name (const char* local_name, // Thus we need some sort of relative name to be generated. - if (this->nested_type_name_ == 0) + if (this->nested_type_name_ == nullptr) { ACE_NEW_RETURN (this->nested_type_name_, char[NAMEBUFSIZE], - 0); + nullptr); } // Hold the fully scoped name. @@ -265,9 +265,9 @@ AST_Type::nested_name (const char* local_name, // These point to the prev, curr and next component in the scope. char *def_curr = def_name; - char *def_next = 0; + char *def_next = nullptr; char *use_curr = use_name; - char *use_next = 0; + char *use_next = nullptr; // How many chars to compare. int len_to_match = 0; @@ -296,12 +296,12 @@ AST_Type::nested_name (const char* local_name, // CORBA namespace, replacing the ad hoc spot // generations of "::" here and there, which have now been removed. UTL_Scope *s = this->defined_in (); - AST_Decl *def_scope = s != 0 ? ScopeAsDecl (s) : 0; + AST_Decl *def_scope = s != nullptr ? ScopeAsDecl (s) : nullptr; // TypeCode is a special case for predefined types, since it's // defined in the CORBA module. bool in_root = - (def_scope != 0 && def_scope->node_type () == AST_Decl::NT_root) + (def_scope != nullptr && def_scope->node_type () == AST_Decl::NT_root) || ((this->node_type () == AST_Decl::NT_pre_defined && ACE_OS::strcmp (this->flat_name (), "CORBA_TypeCode") == 0)); @@ -313,7 +313,7 @@ AST_Type::nested_name (const char* local_name, ACE_OS::strcat (this->nested_type_name_, "::"); } - if (def_scope != 0 && !in_root && use_scope != 0) + if (def_scope != nullptr && !in_root && use_scope != nullptr) // If both scopes exist and that we are not in the root scope. { ACE_OS::strcpy (def_name, @@ -330,7 +330,7 @@ AST_Type::nested_name (const char* local_name, // If the scopes are identical, don't supply them. if (ACE_OS::strcmp (def_name, use_name) == 0) { - if (prefix != 0) + if (prefix != nullptr) { ACE_OS::strcat (this->nested_type_name_, prefix); @@ -338,7 +338,7 @@ AST_Type::nested_name (const char* local_name, ACE_OS::strcat (this->nested_type_name_, local_name); - if (suffix != 0) + if (suffix != nullptr) { ACE_OS::strcat (this->nested_type_name_, suffix); @@ -347,7 +347,7 @@ AST_Type::nested_name (const char* local_name, return this->nested_type_name_; } - if (def_next != 0) + if (def_next != nullptr) { len_to_match = static_cast<int> (ACE_OS::strlen (def_curr)) - @@ -358,7 +358,7 @@ AST_Type::nested_name (const char* local_name, len_to_match = static_cast<int> (ACE_OS::strlen (def_curr)); } - if (use_next != 0) + if (use_next != nullptr) { const int len = static_cast<int> (ACE_OS::strlen (use_curr)) - @@ -390,8 +390,8 @@ AST_Type::nested_name (const char* local_name, len_to_match); // Shift the current scopes to the next level. - def_curr = (def_next ? (def_next + 2) : 0); // Skip the :: - use_curr = (use_next ? (use_next + 2) : 0); // Skip the :: + def_curr = (def_next ? (def_next + 2) : nullptr); // Skip the :: + use_curr = (use_next ? (use_next + 2) : nullptr); // Skip the :: while (def_curr && use_curr) { @@ -400,7 +400,7 @@ AST_Type::nested_name (const char* local_name, def_next = ACE_OS::strstr (def_curr, "::"); use_next = ACE_OS::strstr (use_curr, "::"); - if (def_next != 0) + if (def_next != nullptr) { len_to_match = static_cast<int> (ACE_OS::strlen (def_curr)) - @@ -411,7 +411,7 @@ AST_Type::nested_name (const char* local_name, len_to_match = static_cast<int> (ACE_OS::strlen (def_curr)); } - if (use_next != 0) + if (use_next != nullptr) { int len = static_cast<int> (ACE_OS::strlen (use_curr)) - @@ -445,8 +445,8 @@ AST_Type::nested_name (const char* local_name, def_curr, len_to_match); - def_curr = (def_next ? (def_next + 2) : 0); // Skip the :: - use_curr = (use_next ? (use_next + 2) : 0); // Skip the :: + def_curr = (def_next ? (def_next + 2) : nullptr); // Skip the :: + use_curr = (use_next ? (use_next + 2) : nullptr); // Skip the :: } else { @@ -460,7 +460,7 @@ AST_Type::nested_name (const char* local_name, ACE_OS::strcat (this->nested_type_name_, "::"); // Copy the remaining def_name (if any are left). - if (def_curr != 0) + if (def_curr != nullptr) { ACE_OS::strcat (this->nested_type_name_, def_curr); @@ -470,7 +470,7 @@ AST_Type::nested_name (const char* local_name, } // Append our local name. - if (prefix != 0) + if (prefix != nullptr) { ACE_OS::strcat (this->nested_type_name_, prefix); } @@ -478,7 +478,7 @@ AST_Type::nested_name (const char* local_name, ACE_OS::strcat (this->nested_type_name_, local_name); - if (suffix != 0) + if (suffix != nullptr) { ACE_OS::strcat (this->nested_type_name_, suffix); @@ -489,7 +489,7 @@ AST_Type::nested_name (const char* local_name, } // Otherwise just emit our full_name. - if (prefix != 0) + if (prefix != nullptr) { ACE_OS::strcat (this->nested_type_name_, prefix); } @@ -497,7 +497,7 @@ AST_Type::nested_name (const char* local_name, ACE_OS::strcat (this->nested_type_name_, full_name); - if (suffix != 0) + if (suffix != nullptr) { ACE_OS::strcat (this->nested_type_name_, suffix); @@ -514,7 +514,7 @@ AST_Type::match_names (AST_Type *t, ACE_Unbounded_Queue<AST_Type *> &list) (void) iter.advance ()) { // Queue element. - AST_Type **temp = 0; + AST_Type **temp = nullptr; (void) iter.next (temp); @@ -538,7 +538,7 @@ void AST_Type::destroy (void) { delete [] this->nested_type_name_; - this->nested_type_name_ = 0; + this->nested_type_name_ = nullptr; this->AST_Decl::destroy (); } diff --git a/TAO/TAO_IDL/ast/ast_typedef.cpp b/TAO/TAO_IDL/ast/ast_typedef.cpp index d54bd51ec86..d76cad36244 100644 --- a/TAO/TAO_IDL/ast/ast_typedef.cpp +++ b/TAO/TAO_IDL/ast/ast_typedef.cpp @@ -107,7 +107,7 @@ AST_Type * AST_Typedef::primitive_base_type (void) const { AST_Type *d = const_cast<AST_Typedef *> (this); - AST_Typedef *temp = 0; + AST_Typedef *temp = nullptr; while (d && d->node_type () == AST_Decl::NT_typedef) { @@ -166,7 +166,7 @@ AST_Typedef::compute_size_type (void) { AST_Type *type = this->ref_type_; - if (type == 0) + if (type == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_typedef::compute_size_type - " diff --git a/TAO/TAO_IDL/ast/ast_union.cpp b/TAO/TAO_IDL/ast/ast_union.cpp index 65a9c767cb3..5e15b08d45b 100644 --- a/TAO/TAO_IDL/ast/ast_union.cpp +++ b/TAO/TAO_IDL/ast/ast_union.cpp @@ -109,11 +109,11 @@ AST_Union::AST_Union (AST_ConcreteType *dt, { this->default_value_.computed_ = -2; - AST_PredefinedType *pdt = 0; + AST_PredefinedType *pdt = nullptr; - if (dt == 0) + if (dt == nullptr) { - this->pd_disc_type = 0; + this->pd_disc_type = nullptr; this->pd_udisc_type = AST_Expression::EV_none; return; } @@ -125,9 +125,9 @@ AST_Union::AST_Union (AST_ConcreteType *dt, { pdt = dynamic_cast<AST_PredefinedType*> (dt); - if (pdt == 0) + if (pdt == nullptr) { - this->pd_disc_type = 0; + this->pd_disc_type = nullptr; this->pd_udisc_type = AST_Expression::EV_none; return; } @@ -168,7 +168,7 @@ AST_Union::AST_Union (AST_ConcreteType *dt, break; default: this->pd_udisc_type = AST_Expression::EV_none; - this->pd_disc_type = 0; + this->pd_disc_type = nullptr; break; } } @@ -180,10 +180,10 @@ AST_Union::AST_Union (AST_ConcreteType *dt, else { this->pd_udisc_type = AST_Expression::EV_none; - this->pd_disc_type = 0; + this->pd_disc_type = nullptr; } - if (this->pd_disc_type == 0) + if (this->pd_disc_type == nullptr) { idl_global->err ()->error2 (UTL_Error::EIDL_DISC_TYPE, this, @@ -202,7 +202,7 @@ AST_Union::redefine (AST_Structure *from) { AST_Union *u = dynamic_cast<AST_Union*> (from); - if (u == 0) + if (u == nullptr) { idl_global->err ()->redef_error (from->local_name ()->get_string (), this->local_name ()->get_string ()); @@ -267,7 +267,7 @@ AST_Union::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) { AST_UnionBranch *field = dynamic_cast<AST_UnionBranch*> (si.item ()); - if (field == 0) + if (field == nullptr) // This will be an enum value or other legitimate non-field // member - in any case, no recursion. { @@ -282,7 +282,7 @@ AST_Union::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) type = td->primitive_base_type (); } - if (type == 0) + if (type == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) AST_Union::") @@ -311,8 +311,8 @@ AST_Union::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) AST_UnionBranch * AST_Union::lookup_default (void) { - AST_UnionBranch *b = 0; - AST_Decl *d = 0; + AST_UnionBranch *b = nullptr; + AST_Decl *d = nullptr; for (UTL_ScopeActiveIterator i (this, UTL_Scope::IK_both); !i.is_done(); @@ -324,12 +324,12 @@ AST_Union::lookup_default (void) { b = dynamic_cast<AST_UnionBranch*> (d); - if (b == 0) + if (b == nullptr) { continue; } - if (b->label () != 0 + if (b->label () != nullptr && b->label ()->label_kind () == AST_UnionLabel::UL_default) { idl_global->err ()->error2 (UTL_Error::EIDL_MULTIPLE_BRANCH, @@ -340,7 +340,7 @@ AST_Union::lookup_default (void) } } - return 0; + return nullptr; } // Look up a branch by label. @@ -350,17 +350,17 @@ AST_Union::lookup_label (AST_UnionBranch *b) AST_UnionLabel *label = b->label (); AST_Expression *lv = label->label_val (); - if (label->label_val () == 0) + if (label->label_val () == nullptr) { return b; } - AST_Decl *d = 0; - AST_UnionBranch *fb = 0; + AST_Decl *d = nullptr; + AST_UnionBranch *fb = nullptr; lv->set_ev (lv->coerce (this->pd_udisc_type)); - if (lv->ev () == 0) + if (lv->ev () == nullptr) { idl_global->err ()->eval_error (lv); return b; @@ -376,12 +376,12 @@ AST_Union::lookup_label (AST_UnionBranch *b) { fb = dynamic_cast<AST_UnionBranch*> (d); - if (fb == 0) + if (fb == nullptr) { continue; } - if (fb->label() != 0 + if (fb->label() != nullptr && fb->label ()->label_kind () == AST_UnionLabel::UL_label && fb->label ()->label_val ()->compare (lv)) { @@ -393,7 +393,7 @@ AST_Union::lookup_label (AST_UnionBranch *b) } } - return 0; + return nullptr; } // Look up a branch in an enum which is the discriminator type for this @@ -405,15 +405,15 @@ AST_Union::lookup_enum (AST_UnionBranch *b) AST_UnionLabel *label = b->label(); AST_Expression *lv = label->label_val (); AST_Enum *e = dynamic_cast<AST_Enum*> (this->pd_disc_type); - AST_Decl *d = 0; - AST_UnionBranch *fb = 0; + AST_Decl *d = nullptr; + AST_UnionBranch *fb = nullptr; - if (e == 0) + if (e == nullptr) { - return 0; + return nullptr; } - if (lv == 0) + if (lv == nullptr) { return b; } @@ -431,7 +431,7 @@ AST_Union::lookup_enum (AST_UnionBranch *b) d = e->lookup_by_name (sn, true); - if (d == 0 || d->defined_in () != e) + if (d == nullptr || d->defined_in () != e) { idl_global->err ()->enum_val_lookup_failure (this, e, @@ -451,12 +451,12 @@ AST_Union::lookup_enum (AST_UnionBranch *b) { fb = dynamic_cast<AST_UnionBranch*> (d); - if (fb == 0) + if (fb == nullptr) { continue; } - if (fb->label() != 0 + if (fb->label() != nullptr && fb->label ()->label_kind () == AST_UnionLabel::UL_label && fb->label ()->label_val ()->compare (lv)) { @@ -468,7 +468,7 @@ AST_Union::lookup_enum (AST_UnionBranch *b) } } - return 0; + return nullptr; } // Look up a branch by value. This is the top level branch label resolution @@ -477,14 +477,14 @@ AST_Union::lookup_enum (AST_UnionBranch *b) AST_UnionBranch * AST_Union::lookup_branch (AST_UnionBranch *branch) { - AST_UnionLabel *label = 0; + AST_UnionLabel *label = nullptr; - if (branch != 0) + if (branch != nullptr) { label = branch->label (); } - if (label != 0) + if (label != nullptr) { if (label->label_kind () == AST_UnionLabel::UL_default) { @@ -500,7 +500,7 @@ AST_Union::lookup_branch (AST_UnionBranch *branch) return this->lookup_label (branch); } - return 0; + return nullptr; } // Return the default value. @@ -549,7 +549,7 @@ AST_Union::compute_default_value (void) // Get the next AST decl node. AST_UnionBranch *ub = dynamic_cast<AST_UnionBranch*> (si.item ()); - if (ub != 0) + if (ub != nullptr) { // If the label is a case label, increment by 1. for (unsigned long i = 0; i < ub->label_list_length (); ++i) @@ -715,7 +715,7 @@ AST_Union::compute_default_value (void) // Get the next AST decl node AST_UnionBranch *ub = dynamic_cast<AST_UnionBranch*> (si.item ()); - if (ub != 0) + if (ub != nullptr) { for (unsigned long i = 0; i < ub->label_list_length () && !break_loop; @@ -726,7 +726,7 @@ AST_Union::compute_default_value (void) // Not a default. AST_Expression *expr = ub->label (i)->label_val (); - if (expr == 0) + if (expr == nullptr) { // Error. this->default_value_.computed_ = -1; @@ -864,8 +864,8 @@ AST_Union::compute_default_value (void) int AST_Union::compute_default_index (void) { - AST_Decl *d = 0; - AST_UnionBranch *ub = 0; + AST_Decl *d = nullptr; + AST_UnionBranch *ub = nullptr; int i = 0; // If default case does not exist, it will have a value of -1 according to @@ -992,7 +992,7 @@ AST_Union::compute_size_type (void) AST_Field *f = dynamic_cast<AST_Field*> (d); - if (f != 0) + if (f != nullptr) { AST_Type *t = f->field_type (); // Our sizetype depends on the sizetype of our members. Although diff --git a/TAO/TAO_IDL/ast/ast_union_branch.cpp b/TAO/TAO_IDL/ast/ast_union_branch.cpp index 19c0291fa1c..ca7a968330f 100644 --- a/TAO/TAO_IDL/ast/ast_union_branch.cpp +++ b/TAO/TAO_IDL/ast/ast_union_branch.cpp @@ -134,7 +134,7 @@ AST_UnionBranch::destroy (void) { this->pd_ll->destroy (); delete this->pd_ll; - this->pd_ll = 0; + this->pd_ll = nullptr; this->AST_Field::destroy (); } @@ -162,7 +162,7 @@ AST_UnionBranch::label (unsigned long index) ++i; } - return 0; + return nullptr; } unsigned long @@ -214,7 +214,7 @@ AST_UnionBranch::add_labels (AST_Union *u) AST_Enum *disc = dynamic_cast<AST_Enum*> (u->disc_type ()); AST_EnumVal *dval = disc->lookup_by_value (ex); - if (dval == 0) + if (dval == nullptr) { idl_global->err ()->incompatible_disc_error (disc, ex); throw Bailout (); diff --git a/TAO/TAO_IDL/ast/ast_union_label.cpp b/TAO/TAO_IDL/ast/ast_union_label.cpp index 5dc0ee1ffb3..91d89f84bd9 100644 --- a/TAO/TAO_IDL/ast/ast_union_label.cpp +++ b/TAO/TAO_IDL/ast/ast_union_label.cpp @@ -79,7 +79,7 @@ AST_UnionLabel::AST_UnionLabel (UnionLabel lk, : pd_label_kind (lk), pd_label_val (lv) { - if (lv != 0) + if (lv != nullptr) { lv->evaluate (AST_Expression::EK_const); } @@ -119,7 +119,7 @@ AST_UnionLabel::destroy (void) { this->pd_label_val->destroy (); delete this->pd_label_val; - this->pd_label_val = 0; + this->pd_label_val = nullptr; } } diff --git a/TAO/TAO_IDL/ast/ast_valuetype.cpp b/TAO/TAO_IDL/ast/ast_valuetype.cpp index b877a90bb55..8df73c43d5e 100644 --- a/TAO/TAO_IDL/ast/ast_valuetype.cpp +++ b/TAO/TAO_IDL/ast/ast_valuetype.cpp @@ -68,7 +68,7 @@ AST_ValueType::AST_ValueType (UTL_ScopedName *n, FE_Utils::tmpl_mod_ref_check (this, supports[i]); } - if (inherits_concrete != 0) + if (inherits_concrete != nullptr) { if (inherits_concrete->node_type () == AST_Decl::NT_param_holder) { @@ -109,7 +109,7 @@ AST_ValueType::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) else { // get the head element which is the type being tested - AST_Type** recursable_type = 0; + AST_Type** recursable_type = nullptr; list.get (recursable_type, 0); // Check if we are the possibly recursive type being tested if (!ACE_OS::strcmp (this->full_name (), @@ -145,14 +145,14 @@ AST_ValueType::in_recursion (ACE_Unbounded_Queue<AST_Type *> &list) AST_Field *field = dynamic_cast<AST_Field*> (d); - if (field == 0) + if (field == nullptr) { continue; } AST_Type *type = field->field_type (); - if (type == 0) + if (type == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_valuetype::in_recursion - " @@ -188,7 +188,7 @@ AST_ValueType::redefine (AST_Interface *from) { AST_ValueType *vt = dynamic_cast<AST_ValueType*> (from); - if (vt == 0) + if (vt == nullptr) { idl_global->err ()->redef_error (from->local_name ()->get_string (), this->local_name ()->get_string ()); @@ -250,15 +250,15 @@ AST_Decl * AST_ValueType::look_in_supported (UTL_ScopedName *e, bool full_def_only) { - AST_Decl *d = 0; - AST_Decl *d_before = 0; - AST_Type **is = 0; + AST_Decl *d = nullptr; + AST_Decl *d_before = nullptr; + AST_Type **is = nullptr; long nis = -1; // Can't look in an interface which was not yet defined. if (!this->is_defined ()) { - return 0; + return nullptr; } // OK, loop through supported interfaces. @@ -279,9 +279,9 @@ AST_ValueType::look_in_supported (UTL_ScopedName *e, d = (i)->lookup_by_name_r (e, full_def_only); - if (d != 0) + if (d != nullptr) { - if (d_before == 0) + if (d_before == nullptr) { // First result found. d_before = d; @@ -326,7 +326,7 @@ AST_ValueType::special_lookup (UTL_ScopedName *e, { AST_Decl *d = this->look_in_inherited (e, full_def_only); - if (d == 0) + if (d == nullptr) { d = this->look_in_supported (e, full_def_only); } @@ -359,7 +359,7 @@ AST_ValueType::legal_for_primary_key (void) const AST_Field *f = dynamic_cast<AST_Field*> (i.item ()); // We're not interested in any valuetype decls that aren't fields. - if (f == 0) + if (f == nullptr) { continue; } @@ -400,7 +400,7 @@ AST_ValueType::destroy (void) this->AST_Interface::destroy (); delete [] this->pd_supports; - this->pd_supports = 0; + this->pd_supports = nullptr; this->pd_n_supports = 0; } @@ -483,7 +483,7 @@ bool AST_ValueType::derived_from_primary_key_base (const AST_ValueType *node, const AST_ValueType *pk_base) const { - if (0 == node) + if (nullptr == node) { return false; } @@ -520,10 +520,10 @@ AST_ValueType::lookup_primary_key_base (void) const { AST_ValueType *retval = idl_global->primary_key_base (); - if (retval == 0) + if (retval == nullptr) { Identifier local_id ("PrimaryKeyBase"); - UTL_ScopedName local_name (&local_id, 0); + UTL_ScopedName local_name (&local_id, nullptr); Identifier scope_name ("Components"); UTL_ScopedName pk_name (&scope_name, &local_name); @@ -533,18 +533,18 @@ AST_ValueType::lookup_primary_key_base (void) const local_id.destroy (); scope_name.destroy (); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (&pk_name); - return 0; + return nullptr; } retval = dynamic_cast<AST_ValueType*> (d); - if (retval == 0) + if (retval == nullptr) { idl_global->err ()->valuetype_expected (d); - return 0; + return nullptr; } idl_global->primary_key_base (retval); diff --git a/TAO/TAO_IDL/ast/ast_visitor_context.cpp b/TAO/TAO_IDL/ast/ast_visitor_context.cpp index 4c078cb7997..4ea0767a563 100644 --- a/TAO/TAO_IDL/ast/ast_visitor_context.cpp +++ b/TAO/TAO_IDL/ast/ast_visitor_context.cpp @@ -13,8 +13,8 @@ #include "ast_visitor_context.h" ast_visitor_context::ast_visitor_context (void) - : template_params_ (0), - template_args_ (0) + : template_params_ (nullptr), + template_args_ (nullptr) { } diff --git a/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp b/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp index bfece5f5e12..3409df49814 100644 --- a/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp +++ b/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp @@ -38,7 +38,7 @@ ast_visitor_reifying::ast_visitor_reifying ( ast_visitor_context *ctx) : ast_visitor (), ctx_ (ctx), - reified_node_ (0) + reified_node_ (nullptr) { } @@ -352,22 +352,22 @@ ast_visitor_reifying::visit_array (AST_Array *node) bt = dynamic_cast<AST_Type*> (this->reified_node_); AST_Expression **dims = node->dims (); - AST_Expression *v = 0; - UTL_ExprList *v_list = 0; + AST_Expression *v = nullptr; + UTL_ExprList *v_list = nullptr; for (ACE_CDR::ULong i = 0; i < node->n_dims (); ++i) { AST_Param_Holder *ph = dims[i]->param_holder (); - if (ph != 0) + if (ph != nullptr) { if (this->visit_param_holder (ph) != 0) { - if (v_list != 0) + if (v_list != nullptr) { v_list->destroy (); delete v_list; - v_list = 0; + v_list = nullptr; } ACE_ERROR_RETURN ((LM_ERROR, @@ -393,12 +393,12 @@ ast_visitor_reifying::visit_array (AST_Array *node) -1); } - UTL_ExprList *el = 0; + UTL_ExprList *el = nullptr; ACE_NEW_RETURN (el, - UTL_ExprList (v, 0), + UTL_ExprList (v, nullptr), -1); - if (v_list == 0) + if (v_list == nullptr) { v_list = el; } @@ -408,7 +408,7 @@ ast_visitor_reifying::visit_array (AST_Array *node) } } - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Array *arr = idl_global->gen ()->create_array (&sn, @@ -420,11 +420,11 @@ ast_visitor_reifying::visit_array (AST_Array *node) // No need to add this new node to any scope - it's anonymous // and owned by the node that references it. - if (v_list != 0) + if (v_list != nullptr) { v_list->destroy (); delete v_list; - v_list = 0; + v_list = nullptr; } arr->set_base_type (bt); @@ -452,7 +452,7 @@ ast_visitor_reifying::visit_sequence (AST_Sequence *node) AST_Expression *v = node->max_size (); AST_Param_Holder *ph = v->param_holder (); - if (ph != 0) + if (ph != nullptr) { if (this->visit_param_holder (ph) != 0) { @@ -473,7 +473,7 @@ ast_visitor_reifying::visit_sequence (AST_Sequence *node) idl_global->gen ()->create_expr (v, AST_Expression::EV_ulong); Identifier id ("sequence"); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); this->reified_node_ = idl_global->gen ()->create_sequence (bound, @@ -501,7 +501,7 @@ ast_visitor_reifying::visit_string (AST_String *node) AST_Expression *b = node->max_size (); AST_Param_Holder *ph = b->param_holder (); - if (ph != 0) + if (ph != nullptr) { if (this->visit_param_holder (ph) != 0) { @@ -523,14 +523,14 @@ ast_visitor_reifying::visit_string (AST_String *node) return 0; } - AST_Expression *bound = 0; + AST_Expression *bound = nullptr; ACE_NEW_RETURN (bound, AST_Expression (b, AST_Expression::EV_ulong), -1); Identifier id ("string"); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); ACE_NEW_RETURN (this->reified_node_, AST_String (AST_Decl::NT_string, @@ -563,7 +563,7 @@ ast_visitor_reifying::visit_param_holder (AST_Param_Holder *node) !iter.done (); iter.advance (), ++i) { - FE_Utils::T_Param_Info *item = 0; + FE_Utils::T_Param_Info *item = nullptr; iter.next (item); ACE_CString name (item->name_); @@ -576,7 +576,7 @@ ast_visitor_reifying::visit_param_holder (AST_Param_Holder *node) /// name, which is what we want. if (name == node->local_name ()->get_string ()) { - AST_Decl **ret_ptr = 0; + AST_Decl **ret_ptr = nullptr; if (t_args->get (ret_ptr, i) == 0) { @@ -614,7 +614,7 @@ ast_visitor_reifying::check_and_store (AST_Decl *node) UTL_ScopedName *tmpl_tail = this->template_module_rel_name (node); - if (tmpl_tail != 0) + if (tmpl_tail != nullptr) { AST_Decl *d = idl_global->scopes ().top ()->lookup_by_name ( @@ -626,7 +626,7 @@ ast_visitor_reifying::check_and_store (AST_Decl *node) tmpl_tail->destroy (); delete tmpl_tail; - tmpl_tail = 0; + tmpl_tail = nullptr; } else { @@ -640,9 +640,9 @@ ast_visitor_reifying::template_module_rel_name (AST_Decl *d) AST_Decl *tmp = d; ACE_CString name (d->full_name ()); - while (tmp != 0) + while (tmp != nullptr) { - if (dynamic_cast<AST_Template_Module*> (tmp) != 0) + if (dynamic_cast<AST_Template_Module*> (tmp) != nullptr) { ACE_CString head (tmp->local_name ()->get_string ()); @@ -656,6 +656,6 @@ ast_visitor_reifying::template_module_rel_name (AST_Decl *d) tmp = ScopeAsDecl (tmp->defined_in ()); } - return 0; + return nullptr; } diff --git a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp index e2ffabd2391..48a41a75afd 100644 --- a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp +++ b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp @@ -54,7 +54,7 @@ ast_visitor_tmpl_module_inst::ast_visitor_tmpl_module_inst ( ast_visitor_context *ctx, bool ref_only) : ast_visitor (), - tmi_ (0), + tmi_ (nullptr), ctx_ (ctx), for_eventtype_ (false), for_finder_ (false), @@ -80,7 +80,7 @@ ast_visitor_tmpl_module_inst::visit_scope (UTL_Scope *node) { AST_Decl *d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ast_visitor_tmpl_module_inst::") @@ -90,7 +90,7 @@ ast_visitor_tmpl_module_inst::visit_scope (UTL_Scope *node) } // Send the visitor. - if (d == 0 || d->ast_accept (this) == -1) + if (d == nullptr || d->ast_accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ast_visitor_tmpl_module_inst::") @@ -136,11 +136,11 @@ ast_visitor_tmpl_module_inst::visit_valuetype_fwd (AST_ValueTypeFwd *) int ast_visitor_tmpl_module_inst::visit_component (AST_Component *node) { - UTL_ScopedName *base_name = 0; + UTL_ScopedName *base_name = nullptr; AST_Decl *parent = this->reify_type (node->base_component ()); - if (parent != 0) + if (parent != nullptr) { base_name = parent->name (); } @@ -149,14 +149,14 @@ ast_visitor_tmpl_module_inst::visit_component (AST_Component *node) this->create_name_list (node->supports (), node->n_supports ()); - Identifier *node_id = 0; + Identifier *node_id = nullptr; ACE_NEW_RETURN (node_id, Identifier (node->local_name ()->get_string ()), -1); - UTL_ScopedName *local_name = 0; + UTL_ScopedName *local_name = nullptr; ACE_NEW_RETURN (local_name, - UTL_ScopedName (node_id, 0), + UTL_ScopedName (node_id, nullptr), -1); FE_ComponentHeader header (local_name, @@ -172,11 +172,11 @@ ast_visitor_tmpl_module_inst::visit_component (AST_Component *node) header.supports_flat (), header.n_supports_flat ()); - if (supports_names != 0) + if (supports_names != nullptr) { supports_names->destroy (); delete supports_names; - supports_names = 0; + supports_names = nullptr; } idl_global->scopes ().top ()->add_to_scope (added_comp); @@ -235,7 +235,7 @@ ast_visitor_tmpl_module_inst::visit_template_module_ref ( int ast_visitor_tmpl_module_inst::visit_porttype (AST_PortType *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_PortType *added_porttype = idl_global->gen ()->create_porttype (&sn); @@ -261,7 +261,7 @@ ast_visitor_tmpl_module_inst::visit_porttype (AST_PortType *node) int ast_visitor_tmpl_module_inst::visit_provides (AST_Provides *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Type *p_type = dynamic_cast<AST_Type*> (this->reify_type (node->provides_type ())); @@ -277,7 +277,7 @@ ast_visitor_tmpl_module_inst::visit_provides (AST_Provides *node) int ast_visitor_tmpl_module_inst::visit_uses (AST_Uses *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Type *u_type = dynamic_cast<AST_Type*> (this->reify_type (node->uses_type ())); @@ -294,7 +294,7 @@ ast_visitor_tmpl_module_inst::visit_uses (AST_Uses *node) int ast_visitor_tmpl_module_inst::visit_publishes (AST_Publishes *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Type *p_type = dynamic_cast<AST_Type*> ( @@ -312,7 +312,7 @@ ast_visitor_tmpl_module_inst::visit_publishes (AST_Publishes *node) int ast_visitor_tmpl_module_inst::visit_emits (AST_Emits *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Type *e_type = dynamic_cast<AST_Type*> ( @@ -329,7 +329,7 @@ ast_visitor_tmpl_module_inst::visit_emits (AST_Emits *node) int ast_visitor_tmpl_module_inst::visit_consumes (AST_Consumes *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Type *c_type = dynamic_cast<AST_Type*> (this->reify_type (node->consumes_type ())); @@ -347,7 +347,7 @@ ast_visitor_tmpl_module_inst::visit_extended_port ( { AST_PortType *pt = dynamic_cast<AST_PortType*> (this->reify_type (node->port_type ())); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Extended_Port *added_ep = idl_global->gen ()->create_extended_port (&sn, pt); @@ -363,7 +363,7 @@ ast_visitor_tmpl_module_inst::visit_mirror_port ( { AST_PortType *pt = dynamic_cast<AST_PortType*> (this->reify_type (node->port_type ())); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Mirror_Port *added_mp = idl_global->gen ()->create_mirror_port (&sn, pt); @@ -378,7 +378,7 @@ ast_visitor_tmpl_module_inst::visit_connector (AST_Connector *node) { AST_Connector *parent = dynamic_cast<AST_Connector*> (this->reify_type (node->base_connector ())); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Connector *added_connector = idl_global->gen ()->create_connector (&sn, parent); @@ -404,11 +404,11 @@ ast_visitor_tmpl_module_inst::visit_connector (AST_Connector *node) int ast_visitor_tmpl_module_inst::visit_home (AST_Home *node) { - UTL_ScopedName *base_name = 0; + UTL_ScopedName *base_name = nullptr; AST_Decl *parent = this->reify_type (node->base_home ()); - if (parent != 0) + if (parent != nullptr) { base_name = parent->name (); } @@ -417,32 +417,32 @@ ast_visitor_tmpl_module_inst::visit_home (AST_Home *node) this->create_name_list (node->supports (), node->n_supports ()); - UTL_ScopedName *managed_comp_name = 0; + UTL_ScopedName *managed_comp_name = nullptr; AST_Component *managed_comp = dynamic_cast<AST_Component*> (this->reify_type (node->managed_component ())); - if (managed_comp != 0) + if (managed_comp != nullptr) { managed_comp_name = managed_comp->name (); } - UTL_ScopedName *p_key_name = 0; + UTL_ScopedName *p_key_name = nullptr; AST_ValueType *p_key = dynamic_cast<AST_ValueType*> (this->reify_type (node->primary_key ())); - if (p_key != 0) + if (p_key != nullptr) { p_key_name = p_key->name (); } - Identifier *node_id = 0; + Identifier *node_id = nullptr; ACE_NEW_RETURN (node_id, Identifier (node->local_name ()->get_string ()), -1); - UTL_ScopedName *local_name = 0; + UTL_ScopedName *local_name = nullptr; ACE_NEW_RETURN (local_name, - UTL_ScopedName (node_id, 0), + UTL_ScopedName (node_id, nullptr), -1); FE_HomeHeader header (local_name, @@ -461,11 +461,11 @@ ast_visitor_tmpl_module_inst::visit_home (AST_Home *node) header.supports_flat (), header.n_supports_flat ()); - if (supports_names != 0) + if (supports_names != nullptr) { supports_names->destroy (); delete supports_names; - supports_names = 0; + supports_names = nullptr; } idl_global->scopes ().top ()->add_to_scope (added_home); @@ -509,7 +509,7 @@ ast_visitor_tmpl_module_inst::visit_expression (AST_Expression *) int ast_visitor_tmpl_module_inst::visit_enum (AST_Enum *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Enum *added_enum = idl_global->gen ()->create_enum (&sn, @@ -537,7 +537,7 @@ ast_visitor_tmpl_module_inst::visit_enum (AST_Enum *node) int ast_visitor_tmpl_module_inst::visit_union (AST_Union *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Union *added_union = idl_global->gen ()->create_union (node->disc_type (), @@ -580,7 +580,7 @@ ast_visitor_tmpl_module_inst::visit_union_branch (AST_UnionBranch *node) dynamic_cast<AST_Type*> ( this->reify_type (node->field_type ())); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); // The union branch owns its label list so we have to copy it. UTL_LabelList *ll = node->labels ()->copy (); @@ -608,7 +608,7 @@ ast_visitor_tmpl_module_inst::visit_union_label (AST_UnionLabel *) int ast_visitor_tmpl_module_inst::visit_enum_val (AST_EnumVal *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_EnumVal *added_enum_val = idl_global->gen ()->create_enum_val ( @@ -659,7 +659,7 @@ ast_visitor_tmpl_module_inst::visit_native (AST_Native *) int ast_visitor_tmpl_module_inst::visit_module (AST_Module *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Module *added_module = idl_global->gen ()->create_module (idl_global->scopes ().top (), @@ -677,7 +677,7 @@ ast_visitor_tmpl_module_inst::visit_module (AST_Module *node) AST_Template_Module_Ref *ref = node->from_ref (); UTL_StrList const *old_refs = idl_global->alias_params (); - if (ref != 0) + if (ref != nullptr) { added_module->from_ref (ref); idl_global->alias_params (ref->param_refs ()); @@ -759,7 +759,7 @@ ast_visitor_tmpl_module_inst::visit_template_module_inst ( // need to know this, for example while visiting an IDL module, // to decide whether to create an implied IDL module or just // visit its scope. - this->ctx_->template_args (0); + this->ctx_->template_args (nullptr); // Restore the scope stack. idl_global->scopes ().pop (); @@ -785,22 +785,22 @@ ast_visitor_tmpl_module_inst::visit_valuetype (AST_ValueType *node) this->create_name_list (node->supports (), node->n_supports ()); - Identifier *node_id = 0; + Identifier *node_id = nullptr; ACE_NEW_RETURN (node_id, Identifier (node->local_name ()->get_string ()), -1); - UTL_ScopedName *local_name = 0; + UTL_ScopedName *local_name = nullptr; ACE_NEW_RETURN (local_name, - UTL_ScopedName (node_id, 0), + UTL_ScopedName (node_id, nullptr), -1); - AST_ValueType *added_vtype = 0; + AST_ValueType *added_vtype = nullptr; FE_OBVHeader header (local_name, parent_names, supports_names, - (parent_names != 0 + (parent_names != nullptr ? parent_names->truncatable () : false), this->for_eventtype_); @@ -838,18 +838,18 @@ ast_visitor_tmpl_module_inst::visit_valuetype (AST_ValueType *node) false); } - if (parent_names != 0) + if (parent_names != nullptr) { parent_names->destroy (); delete parent_names; - parent_names = 0; + parent_names = nullptr; } - if (supports_names != 0) + if (supports_names != nullptr) { supports_names->destroy (); delete supports_names; - supports_names = 0; + supports_names = nullptr; } idl_global->scopes ().top ()->add_to_scope (added_vtype); @@ -882,14 +882,14 @@ ast_visitor_tmpl_module_inst::visit_interface (AST_Interface *node) this->create_name_list (node->inherits (), node->n_inherits ()); - Identifier *node_id = 0; + Identifier *node_id = nullptr; ACE_NEW_RETURN (node_id, Identifier (node->local_name ()->get_string ()), -1); - UTL_ScopedName *local_name = 0; + UTL_ScopedName *local_name = nullptr; ACE_NEW_RETURN (local_name, - UTL_ScopedName (node_id, 0), + UTL_ScopedName (node_id, nullptr), -1); FE_InterfaceHeader header (local_name, @@ -907,11 +907,11 @@ ast_visitor_tmpl_module_inst::visit_interface (AST_Interface *node) header.is_local (), header.is_abstract ()); - if (parent_names != 0) + if (parent_names != nullptr) { parent_names->destroy (); delete parent_names; - parent_names = 0; + parent_names = nullptr; } idl_global->scopes ().top ()->add_to_scope (added_iface); @@ -976,7 +976,7 @@ ast_visitor_tmpl_module_inst::visit_operation (AST_Operation *node) this->reify_type (node->return_type ())); Identifier id (node->local_name ()->get_string ()); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); AST_Operation *added_op = idl_global->gen ()->create_operation (rt, @@ -1017,7 +1017,7 @@ ast_visitor_tmpl_module_inst::visit_argument (AST_Argument *node) dynamic_cast<AST_Type*> ( this->reify_type (node->field_type ())); - if (t == 0) + if (t == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("ast_visitor_tmpl_module_inst::") @@ -1043,7 +1043,7 @@ ast_visitor_tmpl_module_inst::visit_typedef (AST_Typedef *node) dynamic_cast<AST_Type*> ( this->reify_type (node->base_type ())); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Typedef *added_td = idl_global->gen ()->create_typedef (bt, @@ -1062,10 +1062,10 @@ ast_visitor_tmpl_module_inst::visit_constant (AST_Constant *node) AST_Param_Holder *ph = node->constant_value ()->param_holder (); - AST_Expression *v = 0; + AST_Expression *v = nullptr; AST_Expression::ExprType et = node->et (); - if (ph != 0) + if (ph != nullptr) { ast_visitor_reifying rv (this->ctx_); @@ -1115,7 +1115,7 @@ ast_visitor_tmpl_module_inst::visit_constant (AST_Constant *node) int ast_visitor_tmpl_module_inst::visit_structure (AST_Structure *node) { - UTL_ScopedName sn (node->name ()->last_component (), 0); + UTL_ScopedName sn (node->name ()->last_component (), nullptr); AST_Structure *added_struct = idl_global->gen ()->create_structure (&sn, @@ -1163,9 +1163,9 @@ int ast_visitor_tmpl_module_inst::visit_factory (AST_Factory *node) { Identifier id (node->local_name ()->get_string ()); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); - AST_Factory *added_factory = 0; + AST_Factory *added_factory = nullptr; if (this->for_finder_) { @@ -1216,9 +1216,9 @@ ast_visitor_tmpl_module_inst::visit_finder (AST_Finder *node) AST_Decl * ast_visitor_tmpl_module_inst::reify_type (AST_Decl *d) { - if (d == 0) + if (d == nullptr) { - return 0; + return nullptr; } if (this->ref_only_) @@ -1249,7 +1249,7 @@ ast_visitor_tmpl_module_inst::reify_type (AST_Decl *d) ACE_TEXT ("visitor failed on %C\n"), d->full_name ())); - return 0; + return nullptr; } return rv.reified_node (); @@ -1259,12 +1259,12 @@ UTL_ExceptList * ast_visitor_tmpl_module_inst::reify_exception_list ( UTL_ExceptList *orig) { - if (orig == 0) + if (orig == nullptr) { - return 0; + return nullptr; } - UTL_ExceptList *retval = 0; + UTL_ExceptList *retval = nullptr; for (UTL_ExceptlistActiveIterator i (orig); !i.is_done (); @@ -1273,12 +1273,12 @@ ast_visitor_tmpl_module_inst::reify_exception_list ( AST_Type *ex = dynamic_cast<AST_Type*> (this->reify_type (i.item ())); - UTL_ExceptList *ex_list = 0; + UTL_ExceptList *ex_list = nullptr; ACE_NEW_RETURN (ex_list, - UTL_ExceptList (ex, 0), - 0); + UTL_ExceptList (ex, nullptr), + nullptr); - if (retval == 0) + if (retval == nullptr) { retval = ex_list; } @@ -1295,7 +1295,7 @@ UTL_NameList * ast_visitor_tmpl_module_inst::create_name_list (AST_Type **list, long length) { - UTL_NameList *retval = 0; + UTL_NameList *retval = nullptr; for (long i = 0; i < length; ++i) { @@ -1305,12 +1305,12 @@ ast_visitor_tmpl_module_inst::create_name_list (AST_Type **list, // We copy each name added so we can call destroy() on the // list, which disposes of the contents as well as the // nested tail pointers. - UTL_NameList *name_item = 0; + UTL_NameList *name_item = nullptr; ACE_NEW_RETURN (name_item, - UTL_NameList (item->name ()->copy (), 0), - 0); + UTL_NameList (item->name ()->copy (), nullptr), + nullptr); - if (retval == 0) + if (retval == nullptr) { retval = name_item; } diff --git a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp index 39568129e3b..87b91c971b0 100644 --- a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp +++ b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp @@ -52,7 +52,7 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref ( // to the module of the same name in the instantiated template // module scope (see ast_visitor_reifying::check_and_store() // and ast_visitor_reifying::template_module_rel_name()). - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Module *added_module = idl_global->gen ()->create_module (idl_global->scopes (). top (), @@ -70,7 +70,7 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref ( /// that's what will be search for any matches. We save the /// current list to restore after the traversal. - if (idl_global->for_new_holder () == 0) + if (idl_global->for_new_holder () == nullptr) { idl_global->for_new_holder ( const_cast<UTL_StrList *> ( @@ -102,7 +102,7 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref ( idl_global->current_params ( const_cast<FE_Utils::T_PARAMLIST_INFO *> ( old_params)); - idl_global->for_new_holder (0); + idl_global->for_new_holder (nullptr); idl_global->alias_params (const_cast<UTL_StrList *> (old_refs)); idl_global->scopes ().pop (); diff --git a/TAO/TAO_IDL/be/be_argument.cpp b/TAO/TAO_IDL/be/be_argument.cpp index 5a22098460c..95d72a2c683 100644 --- a/TAO/TAO_IDL/be/be_argument.cpp +++ b/TAO/TAO_IDL/be/be_argument.cpp @@ -42,7 +42,7 @@ be_argument::be_argument (AST_Argument::Direction d, // declared in an included file UNLESS the enclosing // interface is abstract, in which case we regenerate the // operation. - if (dcl != 0 + if (dcl != nullptr && !dcl->is_local () && (idl_global->in_main_file () || dcl->is_abstract ())) { diff --git a/TAO/TAO_IDL/be/be_array.cpp b/TAO/TAO_IDL/be/be_array.cpp index b7013e03ae0..05b13feba41 100644 --- a/TAO/TAO_IDL/be/be_array.cpp +++ b/TAO/TAO_IDL/be/be_array.cpp @@ -61,8 +61,8 @@ be_array::create_name (void) { char namebuf [NAMEBUFSIZE]; unsigned long i; - UTL_ScopedName *n = 0; - be_decl *scope = 0; + UTL_ScopedName *n = nullptr; + be_decl *scope = nullptr; ACE_OS::memset (namebuf, '\0', @@ -90,7 +90,7 @@ be_array::create_name (void) AST_Expression *expr = this->dims ()[i]; // Dimension value. - if ((expr == 0) || ((expr != 0) && (expr->ev () == 0))) + if ((expr == nullptr) || ((expr != nullptr) && (expr->ev () == nullptr))) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_array::" @@ -123,15 +123,15 @@ be_array::create_name (void) // Make a copy of the enclosing scope's name. n = (UTL_ScopedName *)scope->name ()->copy (); - Identifier *id = 0; + Identifier *id = nullptr; ACE_NEW_RETURN (id, Identifier (ACE_OS::strdup (namebuf)), -1); - UTL_ScopedName *sn = 0; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); // Add our local name as the last component. @@ -157,37 +157,37 @@ be_array::compute_tc_name (void) // TypeCode. Generate a TypeCode name that is meant for internal // use alone. - Identifier * tao_id = 0; + Identifier * tao_id = nullptr; ACE_NEW (tao_id, Identifier ("TAO")); ACE_NEW (this->tc_name_, UTL_ScopedName (tao_id, - 0)); + nullptr)); ACE_CString local_tc_name = ACE_CString ("tc_") + ACE_CString (this->flat_name ()); - Identifier * typecode_scope = 0; + Identifier * typecode_scope = nullptr; ACE_NEW (typecode_scope, Identifier ("TypeCode")); - UTL_ScopedName * tc_scope_conc_name = 0; + UTL_ScopedName * tc_scope_conc_name = nullptr; ACE_NEW (tc_scope_conc_name, UTL_ScopedName (typecode_scope, - 0)); + nullptr)); this->tc_name_->nconc (tc_scope_conc_name); - Identifier * id = 0; + Identifier * id = nullptr; ACE_NEW (id, Identifier (local_tc_name.c_str ())); - UTL_ScopedName * conc_name = 0; + UTL_ScopedName * conc_name = nullptr; ACE_NEW (conc_name, UTL_ScopedName (id, - 0)); + nullptr)); this->tc_name_->nconc (conc_name); } @@ -208,7 +208,7 @@ be_array::gen_dimensions (TAO_OutStream *os, AST_Expression *expr = this->dims ()[i]; // Dimension value. - if ((expr == 0) || ((expr != 0) && (expr->ev () == 0))) + if ((expr == nullptr) || ((expr != nullptr) && (expr->ev () == nullptr))) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_array::" diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index afd56feaac4..5aad12917c3 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -28,32 +28,32 @@ #include "ace/OS_NS_unistd.h" #include "ace/Numeric_Limits.h" -TAO_CodeGen * tao_cg = 0; +TAO_CodeGen * tao_cg = nullptr; TAO_CodeGen::TAO_CodeGen (void) - : client_header_ (0), - client_stubs_ (0), - client_inline_ (0), - server_header_ (0), - implementation_header_(0), - implementation_skeleton_(0), - server_template_header_ (0), - server_skeletons_ (0), - server_template_skeletons_ (0), - anyop_header_ (0), - anyop_source_ (0), - gperf_input_stream_ (0), - ciao_svnt_header_ (0), - ciao_svnt_source_ (0), - ciao_svnt_template_header_ (0), - ciao_svnt_template_source_ (0), - ciao_exec_header_ (0), - ciao_exec_source_ (0), - ciao_exec_idl_ (0), - ciao_conn_header_ (0), - ciao_conn_source_ (0), - ciao_ami_conn_idl_ (0), - gperf_input_filename_ (0), + : client_header_ (nullptr), + client_stubs_ (nullptr), + client_inline_ (nullptr), + server_header_ (nullptr), + implementation_header_(nullptr), + implementation_skeleton_(nullptr), + server_template_header_ (nullptr), + server_skeletons_ (nullptr), + server_template_skeletons_ (nullptr), + anyop_header_ (nullptr), + anyop_source_ (nullptr), + gperf_input_stream_ (nullptr), + ciao_svnt_header_ (nullptr), + ciao_svnt_source_ (nullptr), + ciao_svnt_template_header_ (nullptr), + ciao_svnt_template_source_ (nullptr), + ciao_exec_header_ (nullptr), + ciao_exec_source_ (nullptr), + ciao_exec_idl_ (nullptr), + ciao_conn_header_ (nullptr), + ciao_conn_source_ (nullptr), + ciao_ami_conn_idl_ (nullptr), + gperf_input_filename_ (nullptr), strategy_ (TAO_PERFECT_HASH) { } @@ -123,7 +123,7 @@ TAO_CodeGen::downcase (const char *str) int TAO_CodeGen::start_client_header (const char *fname) { - if (0 == fname) + if (nullptr == fname) { // Bad file name. return -1; @@ -173,14 +173,14 @@ TAO_CodeGen::start_client_header (const char *fname) "_H_"); } - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { *this->client_header_ << "#include /**/ \"" << be_global->pre_include () << "\"\n\n"; } - if (be_global->include_guard () != 0) + if (be_global->include_guard () != nullptr) { *this->client_header_ << "#ifndef " << be_global->include_guard () @@ -189,7 +189,7 @@ TAO_CodeGen::start_client_header (const char *fname) *this->client_header_ << "#error " << "You should not include " << fname; - if (be_global->safe_include () != 0) + if (be_global->safe_include () != nullptr) { *this->client_header_ << ", use " << be_global->safe_include (); } @@ -226,14 +226,14 @@ TAO_CodeGen::start_client_header (const char *fname) // Other include files. - if (be_global->stub_export_include () != 0) + if (be_global->stub_export_include () != nullptr) { *this->client_header_ << "\n#include /**/ \"" << be_global->stub_export_include () << "\""; } - if (be_global->unique_include () != 0) + if (be_global->unique_include () != nullptr) { *this->client_header_ << "\n#include \"" << be_global->unique_include () @@ -276,7 +276,7 @@ TAO_CodeGen::start_client_header (const char *fname) idl_name_str.destroy (); // Sanity check and then print. - if (client_hdr != 0) + if (client_hdr != nullptr) { this->client_header_->print ("\n#include \"%s\"", client_hdr); @@ -296,7 +296,7 @@ TAO_CodeGen::start_client_header (const char *fname) !i.done (); i.advance ()) { - char **tmp = 0; + char **tmp = nullptr; i.next (tmp); // Make a String out of it. @@ -310,7 +310,7 @@ TAO_CodeGen::start_client_header (const char *fname) idl_name_str.destroy (); // Sanity check and then print. - if (client_hdr != 0) + if (client_hdr != nullptr) { this->client_header_->print ("\n#include \"%s\"", client_hdr); @@ -460,7 +460,7 @@ TAO_CodeGen::start_server_header (const char *fname) "_TAO_IDL_", "_H_"); - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { *this->server_header_ << "#include /**/ \"" << be_global->pre_include () @@ -523,7 +523,7 @@ TAO_CodeGen::start_server_header (const char *fname) this->gen_skel_hdr_includes (); - if (be_global->skel_export_include () != 0) + if (be_global->skel_export_include () != nullptr) { *this->server_header_ << "\n\n#include /**/ \"" << be_global->skel_export_include () @@ -591,7 +591,7 @@ TAO_CodeGen::start_server_template_header (const char *fname) "_TAO_IDL_", "_H_"); - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { *this->server_template_header_ << "#include /**/ \"" << be_global->pre_include () @@ -786,7 +786,7 @@ TAO_CodeGen::start_anyop_header (const char *fname) "_TAO_IDL_", "_H_"); - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { *this->anyop_header_ << "#include /**/ \"" << be_global->pre_include () @@ -794,13 +794,13 @@ TAO_CodeGen::start_anyop_header (const char *fname) } // If anyop macro hasn't been set, default to stub macro. - if (be_global->anyop_export_include () != 0) + if (be_global->anyop_export_include () != nullptr) { *this->anyop_header_ << "\n#include /**/ \"" << be_global->anyop_export_include () << "\""; } - else if (be_global->stub_export_include () != 0) + else if (be_global->stub_export_include () != nullptr) { *this->anyop_header_ << "\n#include /**/ \"" << be_global->stub_export_include () @@ -822,7 +822,7 @@ TAO_CodeGen::start_anyop_header (const char *fname) { const char *stub_incl_dir = be_global->stub_include_dir (); - if (stub_incl_dir == 0) + if (stub_incl_dir == nullptr) { tao_prefix = "tao/"; } @@ -1021,7 +1021,7 @@ TAO_CodeGen::start_ciao_svnt_header (const char *fname) "CIAO_SESSION_", "_H_"); - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { os << "#include /**/ \"" << be_global->pre_include () @@ -1032,13 +1032,13 @@ TAO_CodeGen::start_ciao_svnt_header (const char *fname) // generated code in the same library, using the skel export macro, // so the values for the servant export default to the skel values. // Eventually, there should be a way to completely decouple them. - if (be_global->svnt_export_include () != 0) + if (be_global->svnt_export_include () != nullptr) { os << "\n#include /**/ \"" << be_global->svnt_export_include () << "\"\n"; } - else if (be_global->skel_export_include () != 0) + else if (be_global->skel_export_include () != nullptr) { os << "\n#include /**/ \"" << be_global->skel_export_include () @@ -1053,7 +1053,7 @@ TAO_CodeGen::start_ciao_svnt_header (const char *fname) << be_nl; - char **path_tmp = 0; + char **path_tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *>riter ( idl_global->ciao_lem_file_names ()); @@ -1167,7 +1167,7 @@ TAO_CodeGen::start_ciao_svnt_template_header (const char *fname) "CIAO_SERVANT_", "_H_"); - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { os << "#include /**/ \"" << be_global->pre_include () @@ -1178,13 +1178,13 @@ TAO_CodeGen::start_ciao_svnt_template_header (const char *fname) // generated code in the same library, using the skel export macro, // so the values for the servant export default to the skel values. // Eventually, there should be a way to completely decouple them. - if (be_global->svnt_export_include () != 0) + if (be_global->svnt_export_include () != nullptr) { os << "\n#include /**/ \"" << be_global->svnt_export_include () << "\"\n"; } - else if (be_global->skel_export_include () != 0) + else if (be_global->skel_export_include () != nullptr) { os << "\n#include /**/ \"" << be_global->skel_export_include () @@ -1311,7 +1311,7 @@ TAO_CodeGen::start_ciao_exec_header (const char *fname) "CIAO_", "_H_"); - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { os << "#include /**/ \"" << be_global->pre_include () @@ -1456,7 +1456,7 @@ TAO_CodeGen::start_ciao_conn_header (const char *fname) "CIAO_", "_H_"); - if (be_global->pre_include () != 0) + if (be_global->pre_include () != nullptr) { os << "#include /**/ \"" << be_global->pre_include () @@ -1464,7 +1464,7 @@ TAO_CodeGen::start_ciao_conn_header (const char *fname) } // This will almost certainly be true, but just in case... - if (be_global->conn_export_include () != 0) + if (be_global->conn_export_include () != nullptr) { this->gen_standard_include ( this->ciao_conn_header_, @@ -1702,7 +1702,7 @@ TAO_CodeGen::end_client_header (void) // Code to put the last #endif. - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *this->client_header_ << "#include /**/ \"" << be_global->post_include () @@ -1761,7 +1761,7 @@ TAO_CodeGen::end_server_header (void) } } - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *os << be_nl_2 << "#include /**/ \"" @@ -1779,7 +1779,7 @@ TAO_CodeGen::end_server_header (void) int TAO_CodeGen::end_implementation_header (const char *fname) { - if (fname == 0) + if (fname == nullptr) { // Bad file name. return -1; @@ -1787,7 +1787,7 @@ TAO_CodeGen::end_implementation_header (const char *fname) const char *suffix = ACE_OS::strrchr (fname, '.'); - if (suffix == 0) + if (suffix == nullptr) { // File seems to have no extension, so let us take the name // as it is. @@ -1856,7 +1856,7 @@ TAO_CodeGen::end_server_template_header (void) // Code to put the last #endif. *this->server_template_header_ << "\n\n"; - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *this->server_template_header_ << "#include /**/ \"" << be_global->post_include () @@ -1904,7 +1904,7 @@ TAO_CodeGen::end_anyop_header (void) *this->anyop_header_ << be_global->versioning_end (); - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *this->anyop_header_ << "\n\n#include /**/ \"" << be_global->post_include () @@ -1932,7 +1932,7 @@ TAO_CodeGen::end_anyop_source (void) int TAO_CodeGen::end_ciao_svnt_header (void) { - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *this->ciao_svnt_header_ << "\n\n#include /**/ \"" << be_global->post_include () @@ -1969,7 +1969,7 @@ TAO_CodeGen::end_ciao_svnt_template_header (void) << be_nl << "#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */" << be_nl; - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *this->ciao_svnt_template_header_ << "\n\n#include /**/ \"" << be_global->post_include () @@ -1994,7 +1994,7 @@ TAO_CodeGen::end_ciao_svnt_template_source (void) int TAO_CodeGen::end_ciao_exec_header (void) { - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *this->ciao_exec_header_ << "\n\n#include /**/ \"" << be_global->post_include () @@ -2025,7 +2025,7 @@ TAO_CodeGen::end_ciao_exec_idl (void) int TAO_CodeGen::end_ciao_conn_header (void) { - if (be_global->post_include () != 0) + if (be_global->post_include () != nullptr) { *this->ciao_conn_header_ << "\n\n#include /**/ \"" << be_global->post_include () @@ -2089,7 +2089,7 @@ TAO_CodeGen::gen_ident_string (TAO_OutStream *stream) const { const char *str = idl_global->ident_string (); - if (str != 0) + if (str != nullptr) { *stream << "#" << str << be_nl_2; } @@ -2099,29 +2099,29 @@ void TAO_CodeGen::gen_export_files (void) { if (be_global->gen_stub_export_hdr_file () - && be_global->stub_export_macro () != 0 - && (be_global->stub_export_include () != 0 || be_global->stub_export_file () != 0)) + && be_global->stub_export_macro () != nullptr + && (be_global->stub_export_include () != nullptr || be_global->stub_export_file () != nullptr)) { this->gen_export_file ( - (be_global->stub_export_file () != 0) ? be_global->stub_export_file () : be_global->stub_export_include (), + (be_global->stub_export_file () != nullptr) ? be_global->stub_export_file () : be_global->stub_export_include (), be_global->stub_export_macro (), "stub"); } if (be_global->gen_skel_export_hdr_file () - && be_global->skel_export_macro () != 0 - && be_global->skel_export_include () != 0) + && be_global->skel_export_macro () != nullptr + && be_global->skel_export_include () != nullptr) { this->gen_export_file ( - (be_global->skel_export_file () != 0) ? be_global->skel_export_file () : be_global->skel_export_include (), + (be_global->skel_export_file () != nullptr) ? be_global->skel_export_file () : be_global->skel_export_include (), be_global->skel_export_macro (), "skel", true); } if (be_global->gen_svnt_export_hdr_file () - && be_global->svnt_export_macro () != 0 - && be_global->svnt_export_include () != 0) + && be_global->svnt_export_macro () != nullptr + && be_global->svnt_export_include () != nullptr) { this->gen_export_file ( be_global->svnt_export_include (), @@ -2130,8 +2130,8 @@ TAO_CodeGen::gen_export_files (void) } if (be_global->gen_exec_export_hdr_file () - && be_global->exec_export_macro () != 0 - && be_global->exec_export_include () != 0) + && be_global->exec_export_macro () != nullptr + && be_global->exec_export_include () != nullptr) { this->gen_export_file ( be_global->exec_export_include (), @@ -2140,8 +2140,8 @@ TAO_CodeGen::gen_export_files (void) } if (be_global->gen_conn_export_hdr_file () - && be_global->conn_export_macro () != 0 - && be_global->conn_export_include () != 0) + && be_global->conn_export_macro () != nullptr + && be_global->conn_export_include () != nullptr) { this->gen_export_file ( be_global->conn_export_include (), @@ -2159,7 +2159,7 @@ TAO_CodeGen::gen_export_file (const char *filename, // Svnt export macro may correctly default to skel // export macro, so we just return silently. The // null filename check below will catch a real error. - if (macro == 0) + if (macro == nullptr) { return; } @@ -2170,7 +2170,7 @@ TAO_CodeGen::gen_export_file (const char *filename, const char *output_path = be_util::get_output_path (false, for_skel, false); - if (output_path != 0) + if (output_path != nullptr) { // Turn '\' and '\\' into '/'. char* i = const_cast<char*> (output_path); @@ -2313,7 +2313,7 @@ TAO_CodeGen::gen_ifndef_string (const char *fname, const char *extension = ACE_OS::strrchr (fname, '.'); - if (extension == 0) + if (extension == nullptr) { // File seems to have no extension, so let us take the name // as it is. @@ -2468,7 +2468,7 @@ TAO_CodeGen::gen_stub_hdr_includes (void) { ACE_Unbounded_Queue<char *> &ts_files = idl_global->ciao_oci_ts_file_names (); - char **tmp = 0; + char **tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *> i (ts_files); !i.done (); @@ -2640,7 +2640,7 @@ TAO_CodeGen::gen_stub_hdr_includes (void) "tao/Versioned_Namespace.h", true); - if ((be_global->versioning_include () != 0) && (ACE_OS::strlen (be_global->versioning_include ()) > 0)) + if ((be_global->versioning_include () != nullptr) && (ACE_OS::strlen (be_global->versioning_include ()) > 0)) { this->gen_standard_include (this->client_header_, be_global->versioning_include (), @@ -3469,7 +3469,7 @@ TAO_CodeGen::gen_exec_hdr_includes (void) // generated code in the same library, using the skel export macro, // so the values for the servant export default to the skel values. // Eventually, there should be a way to completely decouple them. - if (be_global->exec_export_include () != 0) + if (be_global->exec_export_include () != nullptr) { this->gen_standard_include ( this->ciao_exec_header_, @@ -3562,7 +3562,7 @@ TAO_CodeGen::gen_exec_idl_includes (void) idl_global->stripped_filename ()->get_string ()); } - char **path_tmp = 0; + char **path_tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *>riter ( idl_global->ciao_lem_file_names ()); @@ -3578,7 +3578,7 @@ TAO_CodeGen::gen_exec_idl_includes (void) // special case for ami4ccm, if xxxE.idl. don't include xxxAE.idl. char *exe_idl_fname = ACE_OS::strdup(exec_idl_fname); char * base = ACE_OS::strstr(exe_idl_fname, "E.idl"); - if (base != 0) + if (base != nullptr) { static char test[MAXPATHLEN]; ACE_OS::memset (test, 0, MAXPATHLEN); @@ -3586,7 +3586,7 @@ TAO_CodeGen::gen_exec_idl_includes (void) ACE_OS::strncpy(test, exe_idl_fname, base - exe_idl_fname); ACE_OS::strcat (test, "AE.idl"); - if (ACE_OS::strstr ( *path_tmp, test) != 0) + if (ACE_OS::strstr ( *path_tmp, test) != nullptr) { //skip include skip_incl = true; @@ -3618,7 +3618,7 @@ TAO_CodeGen::gen_conn_hdr_includes (void) ACE_Unbounded_Queue<char *> &lem_file_names = idl_global->ciao_lem_file_names (); - char **path_tmp = 0; + char **path_tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *> riter ( lem_file_names); @@ -3823,7 +3823,7 @@ TAO_CodeGen::gen_conn_ts_includes ( *this->ciao_conn_header_ << be_nl; } - char **tmp = 0; + char **tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *> i (ts_files); !i.done (); diff --git a/TAO/TAO_IDL/be/be_component.cpp b/TAO/TAO_IDL/be/be_component.cpp index ac4dff9851d..f9f18465a61 100644 --- a/TAO/TAO_IDL/be/be_component.cpp +++ b/TAO/TAO_IDL/be/be_component.cpp @@ -169,16 +169,16 @@ be_component::n_emits (void) const void be_component::scan (UTL_Scope *s) { - if (s == 0) + if (s == nullptr) { return; } - AST_Extended_Port *ep = 0; - AST_Mirror_Port *mp = 0; - AST_Uses *u = 0; - AST_Provides *p = 0; - AST_Attribute *a = 0; + AST_Extended_Port *ep = nullptr; + AST_Mirror_Port *mp = nullptr; + AST_Uses *u = nullptr; + AST_Provides *p = nullptr; + AST_Attribute *a = nullptr; AST_Decl::NodeType my_nt; AST_Decl::NodeType scope_nt; @@ -259,9 +259,9 @@ be_component::scan (UTL_Scope *s) } AST_Component *c = dynamic_cast<AST_Component*> (s); - AST_Interface *iface = 0; + AST_Interface *iface = nullptr; - if (c != 0) + if (c != nullptr) { for (long i = 0; i < c->n_supports (); ++i) { @@ -275,7 +275,7 @@ be_component::scan (UTL_Scope *s) // will be 0 and the call will return immediately. this->scan (c->base_component ()); } - else if ((iface = dynamic_cast<AST_Interface*> (s)) != 0) + else if ((iface = dynamic_cast<AST_Interface*> (s)) != nullptr) { for (long i = 0; i < iface->n_inherits (); ++i) { @@ -295,7 +295,7 @@ be_component::gen_stub_inheritance (TAO_OutStream *os) AST_Component *parent = this->base_component (); - if (parent != 0) + if (parent != nullptr) { *os << parent->name (); } @@ -330,7 +330,7 @@ be_component::gen_skel_inheritance (TAO_OutStream *os) { AST_Component *base = this->base_component (); - if (base != 0) + if (base != nullptr) { *os << "public virtual POA_" << base->name (); } @@ -341,7 +341,7 @@ be_component::gen_skel_inheritance (TAO_OutStream *os) long nsupports = this->n_inherits (); AST_Type **supports = this->supports (); - AST_Type *supported = 0; + AST_Type *supported = nullptr; for (long i = 0; i < nsupports; ++i) { @@ -362,7 +362,7 @@ be_component::gen_is_a_ancestors (TAO_OutStream *os) { AST_Component *ancestor = this; - while (ancestor != 0) + while (ancestor != nullptr) { *os << "std::strcmp (" << be_idt << be_idt_nl << "value," << be_nl @@ -383,9 +383,9 @@ be_component::gen_is_a_ancestors (TAO_OutStream *os) void be_component::mirror_scan (AST_PortType *pt) { - AST_Uses *u = 0; - AST_Provides *p = 0; - AST_Attribute *a = 0; + AST_Uses *u = nullptr; + AST_Provides *p = nullptr; + AST_Attribute *a = nullptr; for (UTL_ScopeActiveIterator i (pt, UTL_Scope::IK_decls); !i.is_done (); diff --git a/TAO/TAO_IDL/be/be_connector.cpp b/TAO/TAO_IDL/be/be_connector.cpp index f1dd8ed87d7..26ffe39d631 100644 --- a/TAO/TAO_IDL/be/be_connector.cpp +++ b/TAO/TAO_IDL/be/be_connector.cpp @@ -16,17 +16,17 @@ be_connector::be_connector ( n), UTL_Scope (AST_Decl::NT_connector), AST_Interface (n, + nullptr, 0, - 0, - 0, + nullptr, 0, false, false), AST_Component (n, base_connector, + nullptr, 0, - 0, - 0, + nullptr, 0), AST_Connector (n, base_connector), @@ -36,17 +36,17 @@ be_connector::be_connector ( be_type (AST_Decl::NT_connector, n), be_interface (n, + nullptr, 0, - 0, - 0, + nullptr, 0, false, false), be_component (n, base_connector, + nullptr, 0, - 0, - 0, + nullptr, 0), dds_connector_ (false), ami_connector_ (false) @@ -91,7 +91,7 @@ be_connector::check_ancestors (void) { AST_Connector *base = this; - while (base != 0) + while (base != nullptr) { const char *base_fname = base->full_name (); @@ -113,13 +113,13 @@ be_connector::check_ancestors (void) // for the moment AST_Module *m = dynamic_cast<AST_Module*> (this->defined_in ()); - AST_Template_Module_Inst *t_inst = 0; - while (t_inst == 0 && m != 0) + AST_Template_Module_Inst *t_inst = nullptr; + while (t_inst == nullptr && m != nullptr) { t_inst = m->from_inst (); m = dynamic_cast<AST_Module*> (m->defined_in ()); } - if (t_inst != 0 && t_inst->template_args () != 0) + if (t_inst != nullptr && t_inst->template_args () != nullptr) { if (t_inst->template_args ()->size () > 0) { diff --git a/TAO/TAO_IDL/be/be_decl.cpp b/TAO/TAO_IDL/be/be_decl.cpp index ec9a1396e90..41dbf41a5ae 100644 --- a/TAO/TAO_IDL/be/be_decl.cpp +++ b/TAO/TAO_IDL/be/be_decl.cpp @@ -103,7 +103,7 @@ be_decl::compute_full_name (const char *prefix, const char *suffix, char *&name) { - if (prefix == 0 || suffix == 0) + if (prefix == nullptr || suffix == nullptr) { return; } @@ -113,7 +113,7 @@ be_decl::compute_full_name (const char *prefix, ACE_CString result_str; // Get parent. - if (this->defined_in () == 0) + if (this->defined_in () == nullptr) { // Global scope. @@ -132,7 +132,7 @@ be_decl::compute_full_name (const char *prefix, be_decl * const parent = dynamic_cast<be_scope*> (this->defined_in ())->decl (); - if (parent == 0) + if (parent == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_decl::" @@ -169,7 +169,7 @@ be_decl::compute_flat_name (const char *prefix, const char *suffix, char *&name) { - if (prefix == 0 || suffix == 0) + if (prefix == nullptr || suffix == nullptr) { return; } @@ -180,7 +180,7 @@ be_decl::compute_flat_name (const char *prefix, ACE_CString result_str; // Get parent. - if (this->defined_in () == 0) + if (this->defined_in () == nullptr) { // Global scope. @@ -200,7 +200,7 @@ be_decl::compute_flat_name (const char *prefix, // Get scope name. be_decl * const parent = dynamic_cast<be_scope*> (this->defined_in ())->decl (); - if (parent == 0) + if (parent == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_decl::" @@ -290,7 +290,7 @@ be_decl::scope (void) case AST_Decl::NT_home: return dynamic_cast<be_home*> (d); default: - return 0; + return nullptr; } } diff --git a/TAO/TAO_IDL/be/be_factory.cpp b/TAO/TAO_IDL/be/be_factory.cpp index 45877366438..a2187595975 100644 --- a/TAO/TAO_IDL/be/be_factory.cpp +++ b/TAO/TAO_IDL/be/be_factory.cpp @@ -61,6 +61,6 @@ be_factory::be_add_argument (AST_Argument *arg) this->add_to_scope (arg); this->add_to_referenced (arg, 0, - 0); + nullptr); return arg; } diff --git a/TAO/TAO_IDL/be/be_generator.cpp b/TAO/TAO_IDL/be/be_generator.cpp index a49a1800b61..541792d3e0c 100644 --- a/TAO/TAO_IDL/be/be_generator.cpp +++ b/TAO/TAO_IDL/be/be_generator.cpp @@ -121,10 +121,10 @@ trademarks or registered trademarks of Sun Microsystems, Inc. AST_Root * be_generator::create_root (UTL_ScopedName *n) { - be_root *retval = 0; + be_root *retval = nullptr; ACE_NEW_RETURN (retval, be_root (n), - 0); + nullptr); return retval; } @@ -133,11 +133,11 @@ AST_PredefinedType * be_generator::create_predefined_type (AST_PredefinedType::PredefinedType t, UTL_ScopedName *n) { - be_predefined_type *retval = 0; + be_predefined_type *retval = nullptr; ACE_NEW_RETURN (retval, be_predefined_type (t, n), - 0); + nullptr); return retval; } @@ -146,7 +146,7 @@ AST_Module * be_generator::create_module (UTL_Scope *s, UTL_ScopedName *n) { - AST_Module *retval = 0; + AST_Module *retval = nullptr; // Check for another module of the same name in this scope. for (UTL_ScopeActiveIterator iter (s, UTL_Scope::IK_decls); @@ -161,7 +161,7 @@ be_generator::create_module (UTL_Scope *s, { // Create this new module with referance to the // "first" previous module found in scope. - ACE_NEW_RETURN (retval, be_module (n, m), 0); + ACE_NEW_RETURN (retval, be_module (n, m), nullptr); retval->prefix (const_cast<char *> (m->prefix ())); return retval; } @@ -186,7 +186,7 @@ be_generator::create_module (UTL_Scope *s, { // Create this new module with referance to the // "first" previous module found in scope. - ACE_NEW_RETURN (retval, be_module (n, m), 0); + ACE_NEW_RETURN (retval, be_module (n, m), nullptr); return retval; } } @@ -194,7 +194,7 @@ be_generator::create_module (UTL_Scope *s, } // There is no previous module to be found - ACE_NEW_RETURN (retval, be_module (n), 0); + ACE_NEW_RETURN (retval, be_module (n), nullptr); return retval; } @@ -207,7 +207,7 @@ be_generator::create_interface (UTL_ScopedName *n, bool l, bool a) { - be_interface *retval = 0; + be_interface *retval = nullptr; ACE_NEW_RETURN (retval, be_interface (n, ih, @@ -216,7 +216,7 @@ be_generator::create_interface (UTL_ScopedName *n, nih_flat, l, a), - 0); + nullptr); /// Trigger this interation over the included pragmas when the /// first local interface is seen in the main file. In an @@ -236,18 +236,18 @@ be_generator::create_interface_fwd (UTL_ScopedName *n, bool is_abstract) { AST_Interface *full_defn = this->create_interface (n, - 0, + nullptr, -1, - 0, + nullptr, 0, is_local, is_abstract); - be_interface_fwd *retval = 0; + be_interface_fwd *retval = nullptr; ACE_NEW_RETURN (retval, be_interface_fwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -257,11 +257,11 @@ AST_ValueBox * be_generator::create_valuebox (UTL_ScopedName *n, AST_Type *boxed_type) { - be_valuebox *retval = 0; + be_valuebox *retval = nullptr; ACE_NEW_RETURN (retval, be_valuebox (boxed_type, n), - 0); + nullptr); return retval; } @@ -280,7 +280,7 @@ be_generator::create_valuetype (UTL_ScopedName *n, bool is_truncatable, bool is_custom) { - be_valuetype *retval = 0; + be_valuetype *retval = nullptr; ACE_NEW_RETURN (retval, be_valuetype (n, inherits, @@ -294,7 +294,7 @@ be_generator::create_valuetype (UTL_ScopedName *n, is_abstract, is_truncatable, is_custom), - 0); + nullptr); return retval; } @@ -304,23 +304,23 @@ be_generator::create_valuetype_fwd (UTL_ScopedName *n, bool is_abstract) { AST_ValueType *full_defn = this->create_valuetype (n, - 0, + nullptr, -1, + nullptr, + nullptr, 0, + nullptr, 0, - 0, - 0, - 0, - 0, + nullptr, is_abstract, false, false); - be_valuetype_fwd *retval = 0; + be_valuetype_fwd *retval = nullptr; ACE_NEW_RETURN (retval, be_valuetype_fwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -340,7 +340,7 @@ be_generator::create_eventtype (UTL_ScopedName *n, bool is_truncatable, bool is_custom) { - be_eventtype *retval = 0; + be_eventtype *retval = nullptr; ACE_NEW_RETURN (retval, be_eventtype (n, inherits, @@ -354,7 +354,7 @@ be_generator::create_eventtype (UTL_ScopedName *n, is_abstract, is_truncatable, is_custom), - 0); + nullptr); return retval; } @@ -364,23 +364,23 @@ be_generator::create_eventtype_fwd (UTL_ScopedName *n, bool is_abstract) { AST_EventType *full_defn = this->create_eventtype (n, - 0, + nullptr, -1, + nullptr, + nullptr, 0, + nullptr, 0, - 0, - 0, - 0, - 0, + nullptr, is_abstract, false, false); - be_eventtype_fwd *retval = 0; + be_eventtype_fwd *retval = nullptr; ACE_NEW_RETURN (retval, be_eventtype_fwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -394,7 +394,7 @@ be_generator::create_component (UTL_ScopedName *n, AST_Interface **supports_flat, long n_supports_flat) { - be_component *retval = 0; + be_component *retval = nullptr; ACE_NEW_RETURN (retval, be_component (n, base_component, @@ -402,7 +402,7 @@ be_generator::create_component (UTL_ScopedName *n, n_supports, supports_flat, n_supports_flat), - 0); + nullptr); return retval; } @@ -411,17 +411,17 @@ AST_ComponentFwd * be_generator::create_component_fwd (UTL_ScopedName *n) { AST_Component *full_defn = this->create_component (n, - 0, - 0, + nullptr, + nullptr, -1, - 0, + nullptr, 0); - be_component_fwd *retval = 0; + be_component_fwd *retval = nullptr; ACE_NEW_RETURN (retval, be_component_fwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -437,7 +437,7 @@ be_generator::create_home (UTL_ScopedName *n, AST_Interface **supports_flat, long n_supports_flat) { - be_home *retval = 0; + be_home *retval = nullptr; ACE_NEW_RETURN (retval, be_home (n, base_home, @@ -447,7 +447,7 @@ be_generator::create_home (UTL_ScopedName *n, n_supports, supports_flat, n_supports_flat), - 0); + nullptr); return retval; } @@ -457,12 +457,12 @@ be_generator::create_exception (UTL_ScopedName *n, bool is_local, bool is_abstract) { - be_exception *retval = 0; + be_exception *retval = nullptr; ACE_NEW_RETURN (retval, be_exception (n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -472,12 +472,12 @@ be_generator::create_structure (UTL_ScopedName *n, bool is_local, bool is_abstract) { - be_structure *retval = 0; + be_structure *retval = nullptr; ACE_NEW_RETURN (retval, be_structure (n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -489,11 +489,11 @@ be_generator::create_structure_fwd (UTL_ScopedName *n) AST_Structure *full_defn = this->create_structure (n, false, false); - be_structure_fwd *retval = 0; + be_structure_fwd *retval = nullptr; ACE_NEW_RETURN (retval, be_structure_fwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -504,12 +504,12 @@ be_generator::create_enum (UTL_ScopedName *n, bool is_local, bool is_abstract) { - be_enum *retval = 0; + be_enum *retval = nullptr; ACE_NEW_RETURN (retval, be_enum (n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -521,14 +521,14 @@ be_generator::create_operation (AST_Type *rt, bool is_local, bool is_abstract) { - be_operation *retval = 0; + be_operation *retval = nullptr; ACE_NEW_RETURN (retval, be_operation (rt, fl, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -538,12 +538,12 @@ be_generator::create_field (AST_Type *ft, UTL_ScopedName *n, AST_Field::Visibility vis) { - be_field *retval = 0; + be_field *retval = nullptr; ACE_NEW_RETURN (retval, be_field (ft, n, vis), - 0); + nullptr); return retval; } @@ -553,12 +553,12 @@ be_generator::create_argument (AST_Argument::Direction d, AST_Type *ft, UTL_ScopedName *n) { - be_argument *retval = 0; + be_argument *retval = nullptr; ACE_NEW_RETURN (retval, be_argument (d, ft, n), - 0); + nullptr); return retval; } @@ -570,14 +570,14 @@ be_generator::create_attribute (bool ro, bool is_local, bool is_abstract) { - be_attribute *retval = 0; + be_attribute *retval = nullptr; ACE_NEW_RETURN (retval, be_attribute (ro, ft, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -588,13 +588,13 @@ be_generator::create_union (AST_ConcreteType *dt, bool is_local, bool is_abstract) { - be_union *retval = 0; + be_union *retval = nullptr; ACE_NEW_RETURN (retval, be_union (dt, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -602,15 +602,15 @@ be_generator::create_union (AST_ConcreteType *dt, AST_UnionFwd * be_generator::create_union_fwd (UTL_ScopedName *n) { - AST_Union *full_defn = this->create_union (0, + AST_Union *full_defn = this->create_union (nullptr, n, false, false); - be_union_fwd *retval = 0; + be_union_fwd *retval = nullptr; ACE_NEW_RETURN (retval, be_union_fwd (full_defn, n), - 0); + nullptr); full_defn->fwd_decl (retval); return retval; @@ -621,12 +621,12 @@ be_generator::create_union_branch (UTL_LabelList *ll, AST_Type *ft, UTL_ScopedName *n) { - be_union_branch *retval = 0; + be_union_branch *retval = nullptr; ACE_NEW_RETURN (retval, be_union_branch (ll, ft, n), - 0); + nullptr); return retval; } @@ -635,11 +635,11 @@ AST_UnionLabel * be_generator::create_union_label (AST_UnionLabel::UnionLabel ul, AST_Expression *lv) { - be_union_label *retval = 0; + be_union_label *retval = nullptr; ACE_NEW_RETURN (retval, be_union_label (ul, lv), - 0); + nullptr); return retval; } @@ -649,12 +649,12 @@ be_generator::create_constant (AST_Expression::ExprType et, AST_Expression *ev, UTL_ScopedName *n) { - be_constant *retval = 0; + be_constant *retval = nullptr; ACE_NEW_RETURN (retval, be_constant (et, ev, n), - 0); + nullptr); return retval; } @@ -662,10 +662,10 @@ be_generator::create_constant (AST_Expression::ExprType et, AST_Expression * be_generator::create_expr (UTL_ScopedName *n) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (n), - 0); + nullptr); return retval; } @@ -674,11 +674,11 @@ AST_Expression * be_generator::create_expr (AST_Expression *b, AST_Expression::ExprType t) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (b, t), - 0); + nullptr); return retval; } @@ -688,12 +688,12 @@ be_generator::create_expr (AST_Expression::ExprComb c, AST_Expression *v1, AST_Expression *v2) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (c, v1, v2), - 0); + nullptr); return retval; } @@ -701,10 +701,10 @@ be_generator::create_expr (AST_Expression::ExprComb c, AST_Expression * be_generator::create_expr (ACE_CDR::Long l) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (l), - 0); + nullptr); return retval; } @@ -712,10 +712,10 @@ be_generator::create_expr (ACE_CDR::Long l) AST_Expression * be_generator::create_expr (ACE_CDR::LongLong l) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (l), - 0); + nullptr); return retval; } @@ -723,10 +723,10 @@ be_generator::create_expr (ACE_CDR::LongLong l) AST_Expression * be_generator::create_expr (ACE_CDR::Boolean b) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (b), - 0); + nullptr); return retval; } @@ -734,10 +734,10 @@ be_generator::create_expr (ACE_CDR::Boolean b) AST_Expression * be_generator::create_expr (ACE_CDR::ULong l) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (l), - 0); + nullptr); return retval; } @@ -745,10 +745,10 @@ be_generator::create_expr (ACE_CDR::ULong l) AST_Expression * be_generator::create_expr (ACE_CDR::ULongLong l) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (l), - 0); + nullptr); return retval; } @@ -757,10 +757,10 @@ AST_Expression * be_generator::create_expr (ACE_CDR::ULong l, AST_Expression::ExprType t) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (l, t), - 0); + nullptr); return retval; } @@ -768,10 +768,10 @@ be_generator::create_expr (ACE_CDR::ULong l, AST_Expression * be_generator::create_expr (UTL_String *s) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (s), - 0); + nullptr); return retval; } @@ -779,10 +779,10 @@ be_generator::create_expr (UTL_String *s) AST_Expression * be_generator::create_expr (ACE_CDR::Char c) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (c), - 0); + nullptr); return retval; } @@ -790,10 +790,10 @@ be_generator::create_expr (ACE_CDR::Char c) AST_Expression * be_generator::create_expr (ACE_OutputCDR::from_wchar wc) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (wc), - 0); + nullptr); return retval; } @@ -801,10 +801,10 @@ be_generator::create_expr (ACE_OutputCDR::from_wchar wc) AST_Expression * be_generator::create_expr (char *s) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (s), - 0); + nullptr); return retval; } @@ -812,10 +812,10 @@ be_generator::create_expr (char *s) AST_Expression * be_generator::create_expr (ACE_CDR::Double d) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (d), - 0); + nullptr); return retval; } @@ -823,10 +823,10 @@ be_generator::create_expr (ACE_CDR::Double d) AST_Expression * be_generator::create_expr (const ACE_CDR::Fixed &f) { - be_expression *retval = 0; + be_expression *retval = nullptr; ACE_NEW_RETURN (retval, be_expression (f), - 0); + nullptr); return retval; } @@ -835,11 +835,11 @@ AST_EnumVal * be_generator::create_enum_val (ACE_CDR::ULong v, UTL_ScopedName *n) { - be_enum_val *retval = 0; + be_enum_val *retval = nullptr; ACE_NEW_RETURN (retval, be_enum_val (v, n), - 0); + nullptr); return retval; } @@ -851,14 +851,14 @@ be_generator::create_array (UTL_ScopedName *n, bool is_local, bool is_abstract) { - be_array *retval = 0; + be_array *retval = nullptr; ACE_NEW_RETURN (retval, be_array (n, ndims, dims, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -870,14 +870,14 @@ be_generator::create_sequence (AST_Expression *v, bool is_local, bool is_abstract) { - be_sequence *retval = 0; + be_sequence *retval = nullptr; ACE_NEW_RETURN (retval, be_sequence (v, bt, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -887,15 +887,15 @@ be_generator::create_string (AST_Expression *v) { Identifier id ("string"); UTL_ScopedName n (&id, - 0); + nullptr); - be_string *retval = 0; + be_string *retval = nullptr; ACE_NEW_RETURN (retval, be_string (AST_Decl::NT_string, &n, v, 1), - 0); + nullptr); return retval; } @@ -907,18 +907,18 @@ be_generator::create_wstring (AST_Expression *v) ? "string" : "wstring"); UTL_ScopedName n (&id, - 0); + nullptr); AST_Decl::NodeType nt = sizeof (ACE_CDR::WChar) == 1 ? AST_Decl::NT_string : AST_Decl::NT_wstring; - be_string *retval = 0; + be_string *retval = nullptr; ACE_NEW_RETURN (retval, be_string (nt, &n, v, sizeof (ACE_CDR::WChar)), - 0); + nullptr); return retval; } @@ -928,9 +928,9 @@ be_generator::create_fixed (AST_Expression *digits, AST_Expression *scale) { Identifier id ("fixed"); - UTL_ScopedName name (&id, 0); - AST_Fixed *retval = 0; - ACE_NEW_RETURN (retval, be_fixed (&name, digits, scale), 0); + UTL_ScopedName name (&id, nullptr); + AST_Fixed *retval = nullptr; + ACE_NEW_RETURN (retval, be_fixed (&name, digits, scale), nullptr); return retval; } @@ -940,13 +940,13 @@ be_generator::create_typedef (AST_Type *bt, bool is_local, bool is_abstract) { - be_typedef *retval = 0; + be_typedef *retval = nullptr; ACE_NEW_RETURN (retval, be_typedef (bt, n, is_local, is_abstract), - 0); + nullptr); return retval; } @@ -954,10 +954,10 @@ be_generator::create_typedef (AST_Type *bt, AST_Native * be_generator::create_native (UTL_ScopedName *n) { - be_native *retval = 0; + be_native *retval = nullptr; ACE_NEW_RETURN (retval, be_native (n), - 0); + nullptr); return retval; } @@ -965,10 +965,10 @@ be_generator::create_native (UTL_ScopedName *n) AST_Factory * be_generator::create_factory (UTL_ScopedName *n) { - be_factory *retval = 0; + be_factory *retval = nullptr; ACE_NEW_RETURN (retval, be_factory (n), - 0); + nullptr); return retval; } @@ -976,10 +976,10 @@ be_generator::create_factory (UTL_ScopedName *n) AST_Finder * be_generator::create_finder (UTL_ScopedName *n) { - be_finder *retval = 0; + be_finder *retval = nullptr; ACE_NEW_RETURN (retval, be_finder (n), - 0); + nullptr); return retval; } @@ -987,10 +987,10 @@ be_generator::create_finder (UTL_ScopedName *n) AST_PortType * be_generator::create_porttype (UTL_ScopedName *n) { - be_porttype *retval = 0; + be_porttype *retval = nullptr; ACE_NEW_RETURN (retval, be_porttype (n), - 0); + nullptr); return retval; } @@ -999,11 +999,11 @@ AST_Provides * be_generator::create_provides (UTL_ScopedName *n, AST_Type *provides_type) { - be_provides *retval = 0; + be_provides *retval = nullptr; ACE_NEW_RETURN (retval, be_provides (n, provides_type), - 0); + nullptr); return retval; } @@ -1013,12 +1013,12 @@ be_generator::create_uses (UTL_ScopedName *n, AST_Type *uses_type, bool is_multiple) { - be_uses *retval = 0; + be_uses *retval = nullptr; ACE_NEW_RETURN (retval, be_uses (n, uses_type, is_multiple), - 0); + nullptr); return retval; } @@ -1027,11 +1027,11 @@ AST_Publishes * be_generator::create_publishes (UTL_ScopedName *n, AST_Type *publishes_type) { - be_publishes *retval = 0; + be_publishes *retval = nullptr; ACE_NEW_RETURN (retval, be_publishes (n, publishes_type), - 0); + nullptr); return retval; } @@ -1040,11 +1040,11 @@ AST_Emits * be_generator::create_emits (UTL_ScopedName *n, AST_Type *emits_type) { - be_emits *retval = 0; + be_emits *retval = nullptr; ACE_NEW_RETURN (retval, be_emits (n, emits_type), - 0); + nullptr); return retval; } @@ -1052,11 +1052,11 @@ AST_Consumes * be_generator::create_consumes (UTL_ScopedName *n, AST_Type *consumes_type) { - be_consumes *retval = 0; + be_consumes *retval = nullptr; ACE_NEW_RETURN (retval, be_consumes (n, consumes_type), - 0); + nullptr); return retval; } @@ -1066,11 +1066,11 @@ be_generator::create_extended_port ( UTL_ScopedName *n, AST_PortType *porttype_ref) { - be_extended_port *retval = 0; + be_extended_port *retval = nullptr; ACE_NEW_RETURN (retval, be_extended_port (n, porttype_ref), - 0); + nullptr); return retval; } @@ -1080,11 +1080,11 @@ be_generator::create_mirror_port ( UTL_ScopedName *n, AST_PortType *porttype_ref) { - be_mirror_port *retval = 0; + be_mirror_port *retval = nullptr; ACE_NEW_RETURN (retval, be_mirror_port (n, porttype_ref), - 0); + nullptr); return retval; } @@ -1094,11 +1094,11 @@ be_generator::create_connector ( UTL_ScopedName *n, AST_Connector *base_connector) { - be_connector *retval = 0; + be_connector *retval = nullptr; ACE_NEW_RETURN (retval, be_connector (n, base_connector), - 0); + nullptr); return retval; } @@ -1108,11 +1108,11 @@ be_generator::create_template_module ( UTL_ScopedName *n, FE_Utils::T_PARAMLIST_INFO *template_params) { - be_template_module *retval = 0; + be_template_module *retval = nullptr; ACE_NEW_RETURN (retval, be_template_module (n, template_params), - 0); + nullptr); return retval; } @@ -1123,12 +1123,12 @@ be_generator::create_template_module_inst ( AST_Template_Module *ref, FE_Utils::T_ARGLIST *template_args) { - be_template_module_inst *retval = 0; + be_template_module_inst *retval = nullptr; ACE_NEW_RETURN (retval, be_template_module_inst (n, ref, template_args), - 0); + nullptr); return retval; } @@ -1139,12 +1139,12 @@ be_generator::create_template_module_ref ( AST_Template_Module *ref, UTL_StrList *param_refs) { - be_template_module_ref *retval = 0; + be_template_module_ref *retval = nullptr; ACE_NEW_RETURN (retval, be_template_module_ref (n, ref, param_refs), - 0); + nullptr); return retval; } @@ -1154,11 +1154,11 @@ be_generator::create_param_holder ( UTL_ScopedName *parameter_name, FE_Utils::T_Param_Info *info) { - be_param_holder *retval = 0; + be_param_holder *retval = nullptr; ACE_NEW_RETURN (retval, be_param_holder (parameter_name, info), - 0); + nullptr); return retval; } diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp index 54678f6b317..2c959f8ed43 100644 --- a/TAO/TAO_IDL/be/be_global.cpp +++ b/TAO/TAO_IDL/be/be_global.cpp @@ -30,31 +30,31 @@ #include "ace/OS_NS_sys_stat.h" #include "ace/OS_NS_ctype.h" -TAO_IDL_BE_Export BE_GlobalData *be_global = 0; +TAO_IDL_BE_Export BE_GlobalData *be_global = nullptr; BE_GlobalData::BE_GlobalData (void) : changing_standard_include_files_ (1), - skel_export_macro_ (0), - skel_export_include_ (0), - skel_export_file_ (0), - stub_export_macro_ (0), - stub_export_include_ (0), - stub_export_file_ (0), - anyop_export_macro_ (0), - anyop_export_include_ (0), - exec_export_macro_ (0), - exec_export_include_ (0), - svnt_export_macro_ (0), - svnt_export_include_ (0), - conn_export_macro_ (0), - conn_export_include_ (0), - pch_include_ (0), - pre_include_ (0), - post_include_ (0), - include_guard_ (0), - safe_include_ (0), - unique_include_ (0), - stripped_filename_ (0), + skel_export_macro_ (nullptr), + skel_export_include_ (nullptr), + skel_export_file_ (nullptr), + stub_export_macro_ (nullptr), + stub_export_include_ (nullptr), + stub_export_file_ (nullptr), + anyop_export_macro_ (nullptr), + anyop_export_include_ (nullptr), + exec_export_macro_ (nullptr), + exec_export_include_ (nullptr), + svnt_export_macro_ (nullptr), + svnt_export_include_ (nullptr), + conn_export_macro_ (nullptr), + conn_export_include_ (nullptr), + pch_include_ (nullptr), + pre_include_ (nullptr), + post_include_ (nullptr), + include_guard_ (nullptr), + safe_include_ (nullptr), + unique_include_ (nullptr), + stripped_filename_ (nullptr), core_versioning_begin_ ("\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n"), core_versioning_end_ ("\nTAO_END_VERSIONED_NAMESPACE_DECL\n"), versioning_begin_ (), @@ -88,11 +88,11 @@ BE_GlobalData::BE_GlobalData (void) ciao_ami_conn_impl_hdr_ending_ (ACE::strnew ("_conn_i.h")), ciao_ami_conn_impl_src_ending_ (ACE::strnew ("_conn_i.cpp")), ciao_container_type_ (ACE::strnew ("Session")), - output_dir_ (0), - stub_include_dir_ (0), - skel_output_dir_ (0), - anyop_output_dir_ (0), - exec_output_dir_ (0), + output_dir_ (nullptr), + stub_include_dir_ (nullptr), + skel_output_dir_ (nullptr), + anyop_output_dir_ (nullptr), + exec_output_dir_ (nullptr), any_support_ (true), cdr_support_ (true), tc_support_ (true), @@ -118,11 +118,11 @@ BE_GlobalData::BE_GlobalData (void) gen_empty_anyop_header_ (false), lookup_strategy_ (TAO_PERFECT_HASH), dds_impl_ (DDS_NONE), - void_type_ (0), - ccmobject_ (0), - messaging_ (0), - messaging_exceptionholder_ (0), - messaging_replyhandler_ (0), + void_type_ (nullptr), + ccmobject_ (nullptr), + messaging_ (nullptr), + messaging_exceptionholder_ (nullptr), + messaging_replyhandler_ (nullptr), gen_anyop_files_ (false), gen_skel_files_ (true), gen_svnt_cpp_files_ (true), @@ -192,9 +192,9 @@ be_change_idl_file_extension (UTL_String* idl_file, { // @@ This shouldn't happen anyway; but a better error handling // mechanism is needed. - if (idl_file == 0 || new_extension == 0) + if (idl_file == nullptr || new_extension == nullptr) { - return 0; + return nullptr; } static char fname[MAXPATHLEN]; @@ -205,7 +205,7 @@ be_change_idl_file_extension (UTL_String* idl_file, // Get the base part of the filename, we try several extensions // before giving up. - const char *base = 0; + const char *base = nullptr; static const char* extensions[] = { ".idl", @@ -220,22 +220,22 @@ be_change_idl_file_extension (UTL_String* idl_file, { base = ACE_OS::strstr (string, extensions[k]); - if (base != 0) + if (base != nullptr) { break; } } - if (base == 0) + if (base == nullptr) { - return 0; + return nullptr; } // Anyop * skel file output defaults to general output dir if not set. const char *output_path = be_util::get_output_path (for_anyop, for_skel, for_exec); - if (!base_name_only && output_path != 0) + if (!base_name_only && output_path != nullptr) { // Path info should also be added to fname. @@ -810,7 +810,7 @@ BE_GlobalData::be_get_ciao_ami_conn_impl_src_fname ( const char* BE_GlobalData::skel_export_macro (void) const { - if (this->skel_export_macro_ == 0) + if (this->skel_export_macro_ == nullptr) { return ""; } @@ -854,7 +854,7 @@ BE_GlobalData::skel_export_file (const char *s) const char* BE_GlobalData::stub_export_macro (void) const { - if (this->stub_export_macro_ == 0) + if (this->stub_export_macro_ == nullptr) { return ""; } @@ -898,7 +898,7 @@ BE_GlobalData::stub_export_file (const char *s) const char* BE_GlobalData::anyop_export_macro (void) const { - if (this->anyop_export_macro_ == 0) + if (this->anyop_export_macro_ == nullptr) { return ""; } @@ -929,7 +929,7 @@ BE_GlobalData::anyop_export_include (const char *s) const char* BE_GlobalData::exec_export_macro (void) const { - if (this->exec_export_macro_ == 0) + if (this->exec_export_macro_ == nullptr) { return ""; } @@ -960,7 +960,7 @@ BE_GlobalData::exec_export_include (const char *s) const char* BE_GlobalData::svnt_export_macro (void) const { - if (this->svnt_export_macro_ == 0) + if (this->svnt_export_macro_ == nullptr) { return ""; } @@ -991,7 +991,7 @@ BE_GlobalData::svnt_export_include (const char *s) const char* BE_GlobalData::conn_export_macro (void) const { - if (this->conn_export_macro_ == 0) + if (this->conn_export_macro_ == nullptr) { return ""; } @@ -1957,7 +1957,7 @@ BE_GlobalData::lookup_strategy (void) const void BE_GlobalData::dds_impl (char const * const val) { - ACE_CString tmp (val, 0, false); + ACE_CString tmp (val, nullptr, false); if (tmp == "ndds") { @@ -1995,189 +1995,189 @@ void BE_GlobalData::destroy (void) { ACE::strdelete (this->skel_export_macro_); - this->skel_export_macro_ = 0; + this->skel_export_macro_ = nullptr; ACE::strdelete (this->skel_export_include_); - this->skel_export_include_ = 0; + this->skel_export_include_ = nullptr; ACE::strdelete (this->skel_export_file_); - this->skel_export_file_ = 0; + this->skel_export_file_ = nullptr; ACE::strdelete (this->stub_export_macro_); - this->stub_export_macro_ = 0; + this->stub_export_macro_ = nullptr; ACE::strdelete (this->stub_export_include_); - this->stub_export_include_ = 0; + this->stub_export_include_ = nullptr; ACE::strdelete (this->stub_export_file_); - this->stub_export_file_ = 0; + this->stub_export_file_ = nullptr; ACE::strdelete (this->anyop_export_macro_); - this->anyop_export_macro_ = 0; + this->anyop_export_macro_ = nullptr; ACE::strdelete (this->anyop_export_include_); - this->anyop_export_include_ = 0; + this->anyop_export_include_ = nullptr; ACE::strdelete (this->exec_export_macro_); - this->exec_export_macro_ = 0; + this->exec_export_macro_ = nullptr; ACE::strdelete (this->exec_export_include_); - this->exec_export_include_ = 0; + this->exec_export_include_ = nullptr; ACE::strdelete (this->svnt_export_macro_); - this->svnt_export_macro_ = 0; + this->svnt_export_macro_ = nullptr; ACE::strdelete (this->svnt_export_include_); - this->svnt_export_include_ = 0; + this->svnt_export_include_ = nullptr; ACE::strdelete (this->conn_export_macro_); - this->conn_export_macro_ = 0; + this->conn_export_macro_ = nullptr; ACE::strdelete (this->conn_export_include_); - this->conn_export_include_ = 0; + this->conn_export_include_ = nullptr; ACE::strdelete (this->pch_include_); - this->pch_include_ = 0; + this->pch_include_ = nullptr; ACE::strdelete (this->pre_include_); - this->pre_include_ = 0; + this->pre_include_ = nullptr; ACE::strdelete (this->post_include_); - this->post_include_ = 0; + this->post_include_ = nullptr; ACE::strdelete (this->include_guard_); - this->include_guard_ = 0; + this->include_guard_ = nullptr; ACE::strdelete (this->safe_include_); - this->safe_include_ = 0; + this->safe_include_ = nullptr; ACE::strdelete (this->unique_include_); - this->unique_include_ = 0; + this->unique_include_ = nullptr; ACE::strdelete (this->stripped_filename_); - this->stripped_filename_ = 0; + this->stripped_filename_ = nullptr; ACE::strdelete (this->client_hdr_ending_); - this->client_hdr_ending_ = 0; + this->client_hdr_ending_ = nullptr; ACE::strdelete (this->client_stub_ending_); - this->client_stub_ending_ = 0; + this->client_stub_ending_ = nullptr; ACE::strdelete (this->client_inline_ending_); - this->client_inline_ending_ = 0; + this->client_inline_ending_ = nullptr; ACE::strdelete (this->server_hdr_ending_); - this->server_hdr_ending_ = 0; + this->server_hdr_ending_ = nullptr; ACE::strdelete (this->implementation_hdr_ending_); - this->implementation_hdr_ending_ = 0; + this->implementation_hdr_ending_ = nullptr; ACE::strdelete (this->implementation_skel_ending_); - this->implementation_skel_ending_ = 0; + this->implementation_skel_ending_ = nullptr; ACE::strdelete (this->impl_class_prefix_); - this->impl_class_prefix_ = 0; + this->impl_class_prefix_ = nullptr; ACE::strdelete (this->impl_class_suffix_); - this->impl_class_suffix_ = 0; + this->impl_class_suffix_ = nullptr; ACE::strdelete (this->server_template_hdr_ending_); - this->server_template_hdr_ending_ = 0; + this->server_template_hdr_ending_ = nullptr; ACE::strdelete (this->server_skeleton_ending_); - this->server_skeleton_ending_ = 0; + this->server_skeleton_ending_ = nullptr; ACE::strdelete (this->server_template_skeleton_ending_); - this->server_template_skeleton_ending_ = 0; + this->server_template_skeleton_ending_ = nullptr; ACE::strdelete (this->anyop_hdr_ending_); - this->anyop_hdr_ending_ = 0; + this->anyop_hdr_ending_ = nullptr; ACE::strdelete (this->anyop_src_ending_); - this->anyop_src_ending_ = 0; + this->anyop_src_ending_ = nullptr; ACE::strdelete (this->ciao_svnt_hdr_ending_); - this->ciao_svnt_hdr_ending_ = 0; + this->ciao_svnt_hdr_ending_ = nullptr; ACE::strdelete (this->ciao_svnt_src_ending_); - this->ciao_svnt_src_ending_ = 0; + this->ciao_svnt_src_ending_ = nullptr; ACE::strdelete (this->ciao_svnt_hdr_template_ending_); - this->ciao_svnt_hdr_template_ending_ = 0; + this->ciao_svnt_hdr_template_ending_ = nullptr; ACE::strdelete (this->ciao_svnt_src_template_ending_); - this->ciao_svnt_src_template_ending_ = 0; + this->ciao_svnt_src_template_ending_ = nullptr; ACE::strdelete (this->ciao_exec_hdr_ending_); - this->ciao_exec_hdr_ending_ = 0; + this->ciao_exec_hdr_ending_ = nullptr; ACE::strdelete (this->ciao_exec_src_ending_); - this->ciao_exec_src_ending_ = 0; + this->ciao_exec_src_ending_ = nullptr; ACE::strdelete (this->ciao_exec_stub_hdr_ending_); - this->ciao_exec_stub_hdr_ending_ = 0; + this->ciao_exec_stub_hdr_ending_ = nullptr; ACE::strdelete (this->ciao_exec_idl_ending_); - this->ciao_exec_idl_ending_ = 0; + this->ciao_exec_idl_ending_ = nullptr; ACE::strdelete (this->ciao_conn_hdr_ending_); - this->ciao_conn_hdr_ending_ = 0; + this->ciao_conn_hdr_ending_ = nullptr; ACE::strdelete (this->ciao_conn_src_ending_); - this->ciao_conn_src_ending_ = 0; + this->ciao_conn_src_ending_ = nullptr; ACE::strdelete (this->dds_typesupport_hdr_ending_); - this->dds_typesupport_hdr_ending_ = 0; + this->dds_typesupport_hdr_ending_ = nullptr; ACE::strdelete (this->ciao_ami_conn_idl_ending_); - this->ciao_ami_conn_idl_ending_ = 0; + this->ciao_ami_conn_idl_ending_ = nullptr; ACE::strdelete (this->ciao_ami_conn_impl_hdr_ending_); - this->ciao_ami_conn_impl_hdr_ending_ = 0; + this->ciao_ami_conn_impl_hdr_ending_ = nullptr; ACE::strdelete (this->ciao_ami_conn_impl_src_ending_); - this->ciao_ami_conn_impl_src_ending_ = 0; + this->ciao_ami_conn_impl_src_ending_ = nullptr; ACE::strdelete (this->ciao_container_type_); - this->ciao_container_type_ = 0; + this->ciao_container_type_ = nullptr; ACE::strdelete (this->output_dir_); - this->output_dir_ = 0; + this->output_dir_ = nullptr; ACE::strdelete (this->stub_include_dir_); - this->stub_include_dir_ = 0; + this->stub_include_dir_ = nullptr; ACE::strdelete (this->skel_output_dir_); - this->skel_output_dir_ = 0; + this->skel_output_dir_ = nullptr; ACE::strdelete (this->anyop_output_dir_); - this->anyop_output_dir_ = 0; + this->anyop_output_dir_ = nullptr; ACE::strdelete (this->exec_output_dir_); - this->exec_output_dir_ = 0; + this->exec_output_dir_ = nullptr; - if (0 != this->messaging_) + if (nullptr != this->messaging_) { this->messaging_->destroy (); delete this->messaging_; - this->messaging_ = 0; + this->messaging_ = nullptr; } - if (0 != this->messaging_exceptionholder_) + if (nullptr != this->messaging_exceptionholder_) { this->messaging_exceptionholder_->destroy (); delete this->messaging_exceptionholder_; - this->messaging_exceptionholder_ = 0; + this->messaging_exceptionholder_ = nullptr; } - if (0 != this->messaging_replyhandler_) + if (nullptr != this->messaging_replyhandler_) { this->messaging_replyhandler_->destroy (); delete this->messaging_replyhandler_; - this->messaging_replyhandler_ = 0; + this->messaging_replyhandler_ = nullptr; } - if (0 != tao_cg) + if (nullptr != tao_cg) { tao_cg->destroy (); } @@ -2186,7 +2186,7 @@ BE_GlobalData::destroy (void) AST_PredefinedType * BE_GlobalData:: void_type (void) { - if (0 == this->void_type_) + if (nullptr == this->void_type_) { AST_Decl *d = idl_global->root ()->lookup_primitive_type ( @@ -2201,21 +2201,21 @@ BE_GlobalData:: void_type (void) be_interface * BE_GlobalData::ccmobject (void) { - if (0 == this->ccmobject_) + if (nullptr == this->ccmobject_) { - Identifier *local_id = 0; + Identifier *local_id = nullptr; ACE_NEW_RETURN (local_id, Identifier ("CCMObject"), - 0); - UTL_ScopedName *local_name = 0; + nullptr); + UTL_ScopedName *local_name = nullptr; ACE_NEW_RETURN (local_name, - UTL_ScopedName (local_id, 0), - 0); + UTL_ScopedName (local_id, nullptr), + nullptr); - Identifier *module_id = 0; + Identifier *module_id = nullptr; ACE_NEW_RETURN (module_id, Identifier ("Components"), - 0); + nullptr); UTL_ScopedName sn (module_id, local_name); @@ -2225,7 +2225,7 @@ BE_GlobalData::ccmobject (void) sn.destroy (); - if (0 == d) + if (nullptr == d) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_global::ccmobject - " @@ -2242,23 +2242,23 @@ BE_GlobalData::ccmobject (void) be_module * BE_GlobalData::messaging (void) { - if (0 == this->messaging_) + if (nullptr == this->messaging_) { - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (id, Identifier ("Messaging"), - 0); + nullptr); ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), - 0); + nullptr), + nullptr); ACE_NEW_RETURN (this->messaging_, be_module (sn), - 0); + nullptr); this->messaging_->set_name (sn); } @@ -2269,50 +2269,50 @@ BE_GlobalData::messaging (void) be_valuetype * BE_GlobalData::messaging_exceptionholder (void) { - if (0 == this->messaging_exceptionholder_) + if (nullptr == this->messaging_exceptionholder_) { - Identifier *id = 0; + Identifier *id = nullptr; be_module *msg = this->messaging (); idl_global->scopes ().push (msg); ACE_NEW_RETURN (id, Identifier ("Messaging"), - 0); + nullptr); // Create a valuetype "ExceptionHolder" // from which we inherit. - UTL_ScopedName *full_name = 0; + UTL_ScopedName *full_name = nullptr; ACE_NEW_RETURN (full_name, UTL_ScopedName (id, - 0), - 0); + nullptr), + nullptr); ACE_NEW_RETURN (id, Identifier ("ExceptionHolder"), - 0); + nullptr); - UTL_ScopedName *local_name = 0; + UTL_ScopedName *local_name = nullptr; ACE_NEW_RETURN (local_name, UTL_ScopedName (id, - 0), - 0); + nullptr), + nullptr); full_name->nconc (local_name); ACE_NEW_RETURN (this->messaging_exceptionholder_, be_valuetype (full_name, + nullptr, 0, + nullptr, + nullptr, 0, + nullptr, 0, - 0, - 0, - 0, - 0, - 0, + nullptr, 0, 0, 0), - 0); + nullptr); this->messaging_exceptionholder_->set_name (full_name); @@ -2334,47 +2334,47 @@ BE_GlobalData::messaging_exceptionholder (void) be_interface * BE_GlobalData::messaging_replyhandler (void) { - if (0 == this->messaging_replyhandler_) + if (nullptr == this->messaging_replyhandler_) { be_module *msg = this->messaging (); idl_global->scopes ().push (msg); - Identifier *id = 0; - UTL_ScopedName *local_name = 0; + Identifier *id = nullptr; + UTL_ScopedName *local_name = nullptr; // Create a virtual module named "Messaging" // "and an interface "ReplyHandler" // from which we inherit. ACE_NEW_RETURN (id, Identifier ("Messaging"), - 0); + nullptr); - UTL_ScopedName *full_name = 0; + UTL_ScopedName *full_name = nullptr; ACE_NEW_RETURN (full_name, UTL_ScopedName (id, - 0), - 0); + nullptr), + nullptr); ACE_NEW_RETURN (id, Identifier ("ReplyHandler"), - 0); + nullptr); ACE_NEW_RETURN (local_name, UTL_ScopedName (id, - 0), - 0); + nullptr), + nullptr); full_name->nconc (local_name); ACE_NEW_RETURN (this->messaging_replyhandler_, be_interface (full_name, - 0, // inherited interfaces + nullptr, // inherited interfaces 0, // number of inherited interfaces - 0, // ancestors + nullptr, // ancestors 0, // number of ancestors 0, // not local 0), // not abstract - 0); + nullptr); this->messaging_replyhandler_->set_name (full_name); this->messaging_replyhandler_->set_prefix_with_typeprefix ("omg.org"); @@ -2902,7 +2902,7 @@ BE_GlobalData::parse_args (long &i, char **av) case 'H': idl_global->append_idl_flag (av[i + 1]); - if (av[i + 1] == 0 || av[i + 1][0] == '-') + if (av[i + 1] == nullptr || av[i + 1][0] == '-') { ACE_ERROR ((LM_ERROR, ACE_TEXT ("no selection for -H option\n"))); @@ -2981,7 +2981,7 @@ BE_GlobalData::parse_args (long &i, char **av) if (av[i][2] == '\0') { idl_global->append_idl_flag (av[i + 1]); - ACE_CString tmp (av[i + 1], 0, false); + ACE_CString tmp (av[i + 1], nullptr, false); #if defined (ACE_WIN32) // WIN32's CreateProcess needs the full executable name // when the gperf path is modified, but not for the default @@ -3713,7 +3713,7 @@ BE_GlobalData::parse_args (long &i, char **av) case 'T': if (av[i][2] == 'S') { - unsigned long ul = ACE_OS::strtoul (av[i + 1], 0, 10); + unsigned long ul = ACE_OS::strtoul (av[i + 1], nullptr, 10); be_global->tab_size (ul); ++i; } diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index b62ed54a062..47629c91ddd 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -76,7 +76,7 @@ const TAO_UNINDENT be_uidt_nl (1); // Methods of the TAO_OutStream class. TAO_OutStream::TAO_OutStream (void) - : fp_ (0), + : fp_ (nullptr), st_ (TAO_CLI_HDR), indent_level_ (0) { @@ -89,10 +89,10 @@ TAO_OutStream::TAO_OutStream (void) TAO_OutStream::~TAO_OutStream (void) { // Close the underlying I/O handle only if it exists. - if (this->fp_ != 0) + if (this->fp_ != nullptr) { ACE_OS::fclose (this->fp_); - this->fp_ = 0; + this->fp_ = nullptr; } indent_level_ = 0; @@ -102,12 +102,12 @@ int TAO_OutStream::open (const char *fname, TAO_OutStream::STREAM_TYPE st) { - if (fname != 0) + if (fname != nullptr) { // File name exists, open an I/O file handle. this->fp_ = ACE_OS::fopen (fname, "w"); - if (this->fp_ != 0) + if (this->fp_ != nullptr) { this->st_ = st; // Put the copyright notice. Not for the gperf's temp input @@ -239,7 +239,7 @@ TAO_OutStream::gen_ifdef_macro (const char *flat_name, "_%s_", tao_cg->upcase (flat_name)); - if (suffix != 0) + if (suffix != nullptr) { ACE_OS::strcat (macro, "_"); ACE_OS::strcat (macro, tao_cg->upcase (suffix)); @@ -464,7 +464,7 @@ TAO_OutStream::print (UTL_IdList *idl) { bool first = true; bool second = false; - Identifier *id = 0; + Identifier *id = nullptr; for (UTL_IdListActiveIterator i (idl); !i.is_done (); i.next ()) { @@ -505,7 +505,7 @@ TAO_OutStream::print (AST_Expression *expr) AST_Expression::AST_ExprValue *ev = expr->ev (); /// Never happens as far as I know, but just in case... - if (ev == 0) + if (ev == nullptr) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("TAO_OutStream::print() - ") diff --git a/TAO/TAO_IDL/be/be_home.cpp b/TAO/TAO_IDL/be/be_home.cpp index 9f56f01b0c0..2e802998aa6 100644 --- a/TAO/TAO_IDL/be/be_home.cpp +++ b/TAO/TAO_IDL/be/be_home.cpp @@ -66,7 +66,7 @@ be_home::be_home (UTL_ScopedName *n, // Some previous error may have caused a lookup failure, in which // case we'll crash if we do the narrow below. - if (managed_component == 0) + if (managed_component == nullptr) { idl_global->set_err_count (idl_global->err_count () + 1); return; @@ -87,7 +87,7 @@ be_home::~be_home (void) void be_home::scan (UTL_Scope *s) { - if (s == 0) + if (s == nullptr) { return; } @@ -100,7 +100,7 @@ be_home::scan (UTL_Scope *s) AST_Attribute *attr = dynamic_cast<AST_Attribute*> (d); - if (attr != 0 && ! attr->readonly ()) + if (attr != nullptr && ! attr->readonly ()) { this->has_rw_attributes_ = true; return; @@ -109,7 +109,7 @@ be_home::scan (UTL_Scope *s) AST_Home *h = dynamic_cast<AST_Home*> (s); - if (h != 0) + if (h != nullptr) { this->scan (h->base_home ()); } @@ -119,34 +119,34 @@ void be_home::destroy (void) { delete [] this->full_skel_name_; - this->full_skel_name_ = 0; + this->full_skel_name_ = nullptr; delete [] this->full_coll_name_; - this->full_coll_name_ = 0; + this->full_coll_name_ = nullptr; delete [] this->local_coll_name_; - this->local_coll_name_ = 0; + this->local_coll_name_ = nullptr; delete [] this->relative_skel_name_; - this->relative_skel_name_ = 0; + this->relative_skel_name_ = nullptr; delete [] this->direct_proxy_impl_name_; - this->direct_proxy_impl_name_ = 0; + this->direct_proxy_impl_name_ = nullptr; delete [] this->full_direct_proxy_impl_name_; - this->full_direct_proxy_impl_name_ = 0; + this->full_direct_proxy_impl_name_ = nullptr; delete [] this->client_scope_; - this->client_scope_ = 0; + this->client_scope_ = nullptr; delete [] this->flat_client_scope_; - this->flat_client_scope_ = 0; + this->flat_client_scope_ = nullptr; delete [] this->server_scope_; - this->server_scope_ = 0; + this->server_scope_ = nullptr; delete [] this->flat_server_scope_; - this->flat_server_scope_ = 0; + this->flat_server_scope_ = nullptr; this->be_scope::destroy (); this->be_type::destroy (); diff --git a/TAO/TAO_IDL/be/be_identifier_helper.cpp b/TAO/TAO_IDL/be/be_identifier_helper.cpp index 63218c2f7b8..72c848882b1 100644 --- a/TAO/TAO_IDL/be/be_identifier_helper.cpp +++ b/TAO/TAO_IDL/be/be_identifier_helper.cpp @@ -12,7 +12,7 @@ ACE_CString IdentifierHelper::tmp_retval_; const char * IdentifierHelper::type_name (be_type *t, be_visitor *visitor) { - AST_PredefinedType *pdt = 0; + AST_PredefinedType *pdt = nullptr; switch (t->node_type ()) { @@ -78,7 +78,7 @@ IdentifierHelper::type_name (be_type *t, be_visitor *visitor) Identifier * IdentifierHelper::original_local_name (Identifier * local_name) { - Identifier * id = 0; + Identifier * id = nullptr; const char *lname = local_name->get_string (); // Remove _cxx_ if: @@ -95,16 +95,16 @@ IdentifierHelper::original_local_name (Identifier * local_name) const TAO_IDL_CPP_Keyword_Entry *entry = cpp_key_tbl.lookup (lname + 5, len); - if (entry != 0) + if (entry != nullptr) { // Remove _cxx_ and assign to the Identifier variable. ACE_NEW_RETURN (id, Identifier (lname + 5), - 0); + nullptr); } } - if (id == 0) + if (id == nullptr) { id = local_name->copy (); } @@ -118,7 +118,7 @@ IdentifierHelper::orig_sn (UTL_IdList * sn, bool for_idl) ACE_CString retval; bool first = true; bool second = false; - Identifier *id = 0; + Identifier *id = nullptr; for (UTL_IdListActiveIterator i (sn); !i.is_done ();) { @@ -159,7 +159,7 @@ IdentifierHelper::orig_sn (UTL_IdList * sn, bool for_idl) id->destroy (); delete id; - id = 0; + id = nullptr; } return retval; diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 59caee482bd..1d9a9153f53 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -82,23 +82,23 @@ be_interface::be_interface (UTL_ScopedName *n, n), be_type (AST_Decl::NT_interface, n), - direct_proxy_impl_name_ (0), - full_direct_proxy_impl_name_ (0), - client_scope_ (0), - flat_client_scope_ (0), - server_scope_ (0), - flat_server_scope_ (0), + direct_proxy_impl_name_ (nullptr), + full_direct_proxy_impl_name_ (nullptr), + client_scope_ (nullptr), + flat_client_scope_ (nullptr), + server_scope_ (nullptr), + flat_server_scope_ (nullptr), var_out_seq_decls_gen_ (false), skel_count_ (0), in_mult_inheritance_ (-1), - original_interface_ (0), + original_interface_ (nullptr), is_amh_rh_ (false), is_ami_rh_ (false), is_ami4ccm_rh_ (false), - full_skel_name_ (0), - full_coll_name_ (0), - local_coll_name_ (0), - relative_skel_name_ (0), + full_skel_name_ (nullptr), + full_coll_name_ (nullptr), + local_coll_name_ (nullptr), + relative_skel_name_ (nullptr), cached_type_ (-1), has_rw_attributes_ (false), dds_connector_traits_done_ (false) @@ -156,7 +156,7 @@ be_interface::local_name (void) const char * be_interface::full_skel_name (void) { - if (this->full_skel_name_ == 0) + if (this->full_skel_name_ == nullptr) { this->compute_full_skel_name ("POA_", this->full_skel_name_); @@ -169,8 +169,8 @@ const char * be_interface::full_coll_name (int type) { this->compute_coll_names (type, - 0, // prefix - 0); // suffix + nullptr, // prefix + nullptr); // suffix return this->full_coll_name_; } @@ -179,8 +179,8 @@ const char * be_interface::local_coll_name (int type) { this->compute_coll_names (type, - 0, // prefix - 0); // suffix + nullptr, // prefix + nullptr); // suffix return this->local_coll_name_; } @@ -196,7 +196,7 @@ void be_interface::compute_full_skel_name (const char *prefix, char *&skel_name) { - if (skel_name != 0) + if (skel_name != nullptr) { return; } @@ -204,7 +204,7 @@ be_interface::compute_full_skel_name (const char *prefix, size_t namelen = ACE_OS::strlen (prefix); long first = true; long second = false; - char *item_name = 0; + char *item_name = nullptr; // In the first loop compute the total length. for (UTL_IdListActiveIterator i (this->name ()); @@ -284,7 +284,7 @@ be_interface::compute_coll_names (int type, const char *prefix, const char *suffix) { - if (type == this->cached_type_ && this->full_coll_name_ != 0) + if (type == this->cached_type_ && this->full_coll_name_ != nullptr) { return; } @@ -296,8 +296,8 @@ be_interface::compute_coll_names (int type, // Reset to zero in case allocations below fail, and cause // premature return to caller. - this->full_coll_name_ = 0; - this->local_coll_name_ = 0; + this->full_coll_name_ = nullptr; + this->local_coll_name_ = nullptr; } static const char *collocated_names[] = {"_tao_thru_poa_collocated_", @@ -494,8 +494,8 @@ be_interface::relative_name (const char *localname, if (!ACE_OS::strcmp (def_curr, use_curr)) { // They have same prefix, append to arg1. - def_curr = (def_next ? (def_next+2) : 0); // Skip the :: - use_curr = (use_next ? (use_next+2) : 0); // Skip the :: + def_curr = (def_next ? (def_next+2) : nullptr); // Skip the :: + use_curr = (use_next ? (use_next+2) : nullptr); // Skip the :: } else { @@ -541,7 +541,7 @@ be_interface::in_mult_inheritance (void) // Determine if we are in some form of a multiple inheritance. if (this->traverse_inheritance_graph ( be_interface::in_mult_inheritance_helper, - 0 + nullptr ) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -581,7 +581,7 @@ be_interface::redefine (AST_Interface *from) ACE_Unbounded_Queue<AST_Interface *> &q = idl_global->mixed_parentage_interfaces (); size_t slot = 0; - AST_Interface **t = 0; + AST_Interface **t = nullptr; // The queue of interfaces with mixed parentage must // replace each interface that has been forward @@ -758,7 +758,7 @@ be_interface::gen_var_out_seq_decls (void) // execution of the IDL compiler) there is nothing // to tell the IDL compiler that this interface is in any // way special. All we can do is search for the prefix. - ACE_CString test (lname, 0, false); + ACE_CString test (lname, nullptr, false); bool has_ami4ccm_prefix = (test.find ("AMI4CCM_") == 0); bool already_ami = @@ -890,7 +890,7 @@ Pure_Virtual_Regenerator::emit (be_interface *derived_interface, return 0; } - be_decl *d = 0; + be_decl *d = nullptr; for (UTL_ScopeActiveIterator si (base_interface, UTL_Scope::IK_decls); !si.is_done (); @@ -1107,7 +1107,7 @@ be_interface::gen_operation_table (const char *flat_name, // We must randomize this a bit in order to avoid problems with // processing more than one idl file (in separate processes) with // the same name (in different directories). - char *temp_file = 0; + char *temp_file = nullptr; ACE_NEW_RETURN (temp_file, char [ACE_OS::strlen (idl_global->temp_dir ()) + 11 // The number of possible digits in @@ -1148,10 +1148,10 @@ be_interface::gen_operation_table (const char *flat_name, // Make a new outstream to hold the gperf_temp_file for this // interface. - TAO_OutStream *os = 0; + TAO_OutStream *os = nullptr; ACE_NEW_NORETURN (os, TAO_OutStream); - if (os == 0) + if (os == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "be_visitor_interface_ss" @@ -1337,7 +1337,7 @@ be_interface::convert_parent_ops (be_visitor *visitor) // Traverse the graph. Pure_Virtual_Regenerator worker (visitor); - if (this->traverse_inheritance_graph (worker, 0) == -1) + if (this->traverse_inheritance_graph (worker, nullptr) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_interface::" @@ -1419,7 +1419,7 @@ be_interface::gen_optable_entries (be_interface *derived_interface, AST_Attribute *attr = dynamic_cast<AST_Attribute*> (d); - if (attr == 0) + if (attr == nullptr) return -1; // Generate only the "get" entry if we are @@ -1572,7 +1572,7 @@ be_interface::gen_optable_entries (be_interface *derived_interface, AST_Attribute *attr = dynamic_cast<AST_Attribute*> (d); - if (attr == 0) + if (attr == nullptr) { return -1; } @@ -1767,7 +1767,7 @@ be_interface::traverse_inheritance_graph ( bool abstract_paths_only, bool add_ccm_object) { - AST_Type *intf = 0; // element inside the queue + AST_Type *intf = nullptr; // element inside the queue if (!this->insert_queue.is_empty ()) { @@ -2019,7 +2019,7 @@ be_interface::gen_gperf_lookup_methods (const char *flat_name) } // And reset file to 0 because otherwise there is a problem during destruction of stream. - tao_cg->gperf_input_stream ()->file () = 0; + tao_cg->gperf_input_stream ()->file () = nullptr; // Open the temp file. #if defined (ACE_OPENVMS) @@ -2340,7 +2340,7 @@ be_interface::copy_ctor_helper (be_interface *derived, } else if (base->is_nested ()) { - be_decl *scope = 0; + be_decl *scope = nullptr; scope = dynamic_cast<be_scope*> (base->defined_in ())->decl (); *os << "POA_" << scope->name () << "::" @@ -2428,7 +2428,7 @@ be_interface::op_attr_decl_helper (be_interface * /*derived */, be_interface *ancestor, TAO_OutStream *os) { - if (dynamic_cast<be_component*> (ancestor) != 0) + if (dynamic_cast<be_component*> (ancestor) != nullptr) { return 0; } @@ -2493,34 +2493,34 @@ void be_interface::destroy (void) { delete [] this->full_skel_name_; - this->full_skel_name_ = 0; + this->full_skel_name_ = nullptr; delete [] this->full_coll_name_; - this->full_coll_name_ = 0; + this->full_coll_name_ = nullptr; delete [] this->local_coll_name_; - this->local_coll_name_ = 0; + this->local_coll_name_ = nullptr; delete [] this->relative_skel_name_; - this->relative_skel_name_ = 0; + this->relative_skel_name_ = nullptr; delete [] this->direct_proxy_impl_name_; - this->direct_proxy_impl_name_ = 0; + this->direct_proxy_impl_name_ = nullptr; delete [] this->full_direct_proxy_impl_name_; - this->full_direct_proxy_impl_name_ = 0; + this->full_direct_proxy_impl_name_ = nullptr; delete [] this->client_scope_; - this->client_scope_ = 0; + this->client_scope_ = nullptr; delete [] this->flat_client_scope_; - this->flat_client_scope_ = 0; + this->flat_client_scope_ = nullptr; delete [] this->server_scope_; - this->server_scope_ = 0; + this->server_scope_ = nullptr; delete [] this->flat_server_scope_; - this->flat_server_scope_ = 0; + this->flat_server_scope_ = nullptr; // Call the destroy methods of our base classes. this->AST_Interface::destroy (); @@ -2586,7 +2586,7 @@ be_interface::enqueue_base_component_r (AST_Component *node) { AST_Component *base = node->base_component (); - if (base == 0) + if (base == nullptr) { return; } @@ -2609,7 +2609,7 @@ be_interface::enqueue_base_home_r (AST_Home *node) { AST_Home *base = node->base_home (); - if (base == 0) + if (base == nullptr) { return; } @@ -2706,7 +2706,7 @@ void be_interface::gen_skel_inheritance (TAO_OutStream *os) { long n_parents = this->n_inherits (); - AST_Type *parent = 0; + AST_Type *parent = nullptr; AST_Type **parents = this->inherits (); bool has_concrete_parent = false; @@ -2905,7 +2905,7 @@ be_interface::is_ami4ccm_rh (bool val) const char * be_interface::direct_proxy_impl_name (void) { - if (this->direct_proxy_impl_name_ == 0) + if (this->direct_proxy_impl_name_ == nullptr) { this->direct_proxy_impl_name_ = this->create_with_prefix_suffix ( @@ -2921,7 +2921,7 @@ be_interface::direct_proxy_impl_name (void) const char * be_interface::full_direct_proxy_impl_name (void) { - if (this->full_direct_proxy_impl_name_ == 0) + if (this->full_direct_proxy_impl_name_ == nullptr) { const char *scope = this->server_enclosing_scope (); const char *base_name = this->direct_proxy_impl_name (); @@ -2931,7 +2931,7 @@ be_interface::full_direct_proxy_impl_name (void) ACE_NEW_RETURN (this->full_direct_proxy_impl_name_, char[length + 1], - 0); + nullptr); ACE_OS::strcpy (this->full_direct_proxy_impl_name_, scope); @@ -2946,7 +2946,7 @@ be_interface::full_direct_proxy_impl_name (void) const char * be_interface::client_enclosing_scope (void) { - if (this->client_scope_ == 0) + if (this->client_scope_ == nullptr) { const char *full_name = this->full_name (); const char *name = this->local_name (); @@ -2955,7 +2955,7 @@ be_interface::client_enclosing_scope (void) size_t length = ACE_OS::strlen (full_name) - offset; ACE_NEW_RETURN (this->client_scope_, char[length + 1], - 0); + nullptr); ACE_OS::strncpy (this->client_scope_, full_name, length); this->client_scope_[length] = '\0'; @@ -2967,7 +2967,7 @@ be_interface::client_enclosing_scope (void) const char * be_interface::flat_client_enclosing_scope (void) { - if (this->flat_client_scope_ == 0) + if (this->flat_client_scope_ == nullptr) { const char *full_name = this->flat_name (); const char *name = @@ -2978,7 +2978,7 @@ be_interface::flat_client_enclosing_scope (void) ACE_NEW_RETURN (this->flat_client_scope_, char[length + 1], - 0); + nullptr); ACE_OS::strncpy (this->flat_client_scope_, full_name, @@ -2992,7 +2992,7 @@ be_interface::flat_client_enclosing_scope (void) const char * be_interface::server_enclosing_scope (void) { - if (this->server_scope_ == 0) + if (this->server_scope_ == nullptr) { const char *full_name = this->full_coll_name (be_interface::DIRECT); @@ -3004,7 +3004,7 @@ be_interface::server_enclosing_scope (void) size_t length = ACE_OS::strlen (full_name) - offset; ACE_NEW_RETURN (this->server_scope_, char[length + 1], - 0); + nullptr); ACE_OS::strncpy (this->server_scope_, full_name, length); this->server_scope_[length] = '\0'; @@ -3019,7 +3019,7 @@ be_interface::create_with_prefix_suffix (const char *prefix, const char *suffix, const char *separator) { - char *cat_string = 0; + char *cat_string = nullptr; size_t length = ACE_OS::strlen (str) + ACE_OS::strlen (prefix) + @@ -3029,7 +3029,7 @@ be_interface::create_with_prefix_suffix (const char *prefix, ACE_NEW_RETURN (cat_string, char[length], - 0); + nullptr); ACE_OS::strcpy (cat_string, prefix); ACE_OS::strcat (cat_string, str); diff --git a/TAO/TAO_IDL/be/be_operation.cpp b/TAO/TAO_IDL/be/be_operation.cpp index e181ad58fa0..f7bda2708c0 100644 --- a/TAO/TAO_IDL/be/be_operation.cpp +++ b/TAO/TAO_IDL/be/be_operation.cpp @@ -87,14 +87,14 @@ be_operation::be_add_argument (AST_Argument *arg) this->add_to_scope (arg); this->add_to_referenced (arg, 0, - 0); + nullptr); return arg; } int be_operation::be_insert_exception (AST_Exception *ex) { - UTL_ExceptList *new_list = 0; + UTL_ExceptList *new_list = nullptr; ACE_NEW_RETURN (new_list, UTL_ExceptList (ex, this->pd_exceptions), diff --git a/TAO/TAO_IDL/be/be_predefined_type.cpp b/TAO/TAO_IDL/be/be_predefined_type.cpp index b141bd47187..b6943001da8 100644 --- a/TAO/TAO_IDL/be/be_predefined_type.cpp +++ b/TAO/TAO_IDL/be/be_predefined_type.cpp @@ -126,16 +126,16 @@ void be_predefined_type::compute_tc_name (void) { // Start with the head as the CORBA namespace. - Identifier *corba_id = 0; + Identifier *corba_id = nullptr; ACE_NEW (corba_id, Identifier ("CORBA")); ACE_NEW (this->tc_name_, UTL_ScopedName (corba_id, - 0)); + nullptr)); - Identifier *id = 0; - UTL_ScopedName *conc_name = 0; + Identifier *id = nullptr; + UTL_ScopedName *conc_name = nullptr; switch (this->pt ()) { @@ -229,7 +229,7 @@ be_predefined_type::compute_tc_name (void) ACE_NEW (conc_name, UTL_ScopedName (id, - 0)); + nullptr)); this->tc_name_->nconc (conc_name); } diff --git a/TAO/TAO_IDL/be/be_scope.cpp b/TAO/TAO_IDL/be/be_scope.cpp index 888e48cf825..34bb4b93cc8 100644 --- a/TAO/TAO_IDL/be/be_scope.cpp +++ b/TAO/TAO_IDL/be/be_scope.cpp @@ -43,7 +43,7 @@ be_scope::be_add_field (AST_Field *f) AST_Argument * be_scope::be_add_argument (AST_Argument *) { - return 0; + return nullptr; } void @@ -95,7 +95,7 @@ be_scope::decl (void) case AST_Decl::NT_finder: return dynamic_cast<be_finder*> (this); default: - return (be_decl *)0; + return (be_decl *)nullptr; } } diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp index e0a16eb6a9a..525c4e6d03f 100644 --- a/TAO/TAO_IDL/be/be_sequence.cpp +++ b/TAO/TAO_IDL/be/be_sequence.cpp @@ -55,7 +55,7 @@ be_sequence::be_sequence (AST_Expression *v, be_type (AST_Decl::NT_sequence, n), mt_ (be_sequence::MNG_UNKNOWN), - field_node_ (0) + field_node_ (nullptr) { // Always the case. this->has_constructor (true); @@ -96,8 +96,8 @@ be_sequence::be_sequence (AST_Expression *v, } AST_Decl::NodeType nt = t->node_type (); - AST_Typedef *td = 0; - AST_Type *pbt = 0; + AST_Typedef *td = nullptr; + AST_Type *pbt = nullptr; if (nt == AST_Decl::NT_typedef) { @@ -135,7 +135,7 @@ char * be_sequence::gen_name (void) { char namebuf [NAMEBUFSIZE]; - be_type *bt = 0; + be_type *bt = nullptr; // Reset the buffer. ACE_OS::memset (namebuf, @@ -145,7 +145,7 @@ be_sequence::gen_name (void) // Retrieve the base type. bt = dynamic_cast<be_type*> (this->base_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_sequence::" @@ -163,7 +163,7 @@ be_sequence::gen_name (void) // Our base type is an anonymous sequence. be_sequence *seq = dynamic_cast<be_sequence*> (bt); - if (seq == 0) + if (seq == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_sequence::" @@ -215,11 +215,11 @@ be_sequence::gen_name (void) int be_sequence::create_name (be_typedef *node) { - static char *namebuf = 0; - UTL_ScopedName *n = 0; + static char *namebuf = nullptr; + UTL_ScopedName *n = nullptr; // Scope in which we are defined. - be_decl *scope = 0; + be_decl *scope = nullptr; // If there is a typedef node, we use its name as our name. if (node) @@ -238,20 +238,20 @@ be_sequence::create_name (be_typedef *node) scope = dynamic_cast<be_scope*> (us)->decl (); - if (scope != 0) + if (scope != nullptr) { // Make a copy of the enclosing scope's name. n = (UTL_ScopedName *) scope->name ()->copy (); - Identifier *id = 0; + Identifier *id = nullptr; ACE_NEW_RETURN (id, Identifier (namebuf), -1); - UTL_ScopedName *conc_name = 0; + UTL_ScopedName *conc_name = nullptr; ACE_NEW_RETURN (conc_name, UTL_ScopedName (id, - 0), + nullptr), -1); // Add our local name as the last component. @@ -280,8 +280,8 @@ be_sequence::managed_type (void) if (this->mt_ == be_sequence::MNG_UNKNOWN) // Not calculated yet. { // Base types. - be_type *bt = 0; - be_type *prim_type = 0; + be_type *bt = nullptr; + be_type *prim_type = nullptr; bt = dynamic_cast<be_type*> (this->base_type ()); @@ -361,9 +361,9 @@ be_sequence::managed_type (void) AST_Sequence * be_sequence::fe_add_sequence (AST_Sequence *t) { - if (t == 0) + if (t == nullptr) { - return 0; + return nullptr; } this->add_to_local_types (t); @@ -426,10 +426,10 @@ be_sequence::instance_name () '\0', NAMEBUFSIZE); - be_type *bt = 0; + be_type *bt = nullptr; bt = dynamic_cast<be_type*> (this->base_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_visitor_sequence_ch::" @@ -525,7 +525,7 @@ be_sequence::instance_name () be_predefined_type *predef = dynamic_cast<be_predefined_type*> (prim_type); - if (predef != 0 + if (predef != nullptr && predef->pt() == AST_PredefinedType::PT_octet) { ACE_OS::sprintf (namebuf, @@ -621,7 +621,7 @@ be_sequence::gen_base_class_name (TAO_OutStream *os, break; case be_sequence::MNG_STRING: { - be_type *prim_type = 0; + be_type *prim_type = nullptr; if (elem->node_type () == AST_Decl::NT_typedef) { // Get the primitive base type of this typedef node. @@ -680,7 +680,7 @@ be_sequence::gen_base_class_name (TAO_OutStream *os, break; case be_sequence::MNG_WSTRING: { - be_type *prim_type = 0; + be_type *prim_type = nullptr; if (elem->node_type () == AST_Decl::NT_typedef) { // Get the primitive base type of this typedef node. @@ -813,13 +813,13 @@ be_sequence::compute_tc_name (void) // TypeCode. Generate a TypeCode name that is meant for internal // use alone. - Identifier * tao_id = 0; + Identifier * tao_id = nullptr; ACE_NEW (tao_id, Identifier ("TAO")); ACE_NEW (this->tc_name_, UTL_ScopedName (tao_id, - 0)); + nullptr)); char bound[30] = { 0 }; @@ -832,25 +832,25 @@ be_sequence::compute_tc_name (void) + ACE_CString (this->flat_name ()) + ACE_CString (bound); - Identifier * typecode_scope = 0; + Identifier * typecode_scope = nullptr; ACE_NEW (typecode_scope, Identifier ("TypeCode")); - UTL_ScopedName * tc_scope_conc_name = 0; + UTL_ScopedName * tc_scope_conc_name = nullptr; ACE_NEW (tc_scope_conc_name, UTL_ScopedName (typecode_scope, - 0)); + nullptr)); this->tc_name_->nconc (tc_scope_conc_name); - Identifier * id = 0; + Identifier * id = nullptr; ACE_NEW (id, Identifier (local_tc_name.c_str ())); - UTL_ScopedName * conc_name = 0; + UTL_ScopedName * conc_name = nullptr; ACE_NEW (conc_name, UTL_ScopedName (id, - 0)); + nullptr)); this->tc_name_->nconc (conc_name); } diff --git a/TAO/TAO_IDL/be/be_string.cpp b/TAO/TAO_IDL/be/be_string.cpp index cad20654cb6..561a6b17990 100644 --- a/TAO/TAO_IDL/be/be_string.cpp +++ b/TAO/TAO_IDL/be/be_string.cpp @@ -97,7 +97,7 @@ be_string::gen_member_ostream_operator (TAO_OutStream *os, void be_string::compute_tc_name (void) { - Identifier * id = 0; + Identifier * id = nullptr; ACE_CDR::ULong val = 0UL; AST_Expression zero (val); @@ -107,13 +107,13 @@ be_string::compute_tc_name (void) // constants. // Start with the head as the CORBA namespace. - Identifier * corba_id = 0; + Identifier * corba_id = nullptr; ACE_NEW (corba_id, Identifier ("CORBA")); ACE_NEW (this->tc_name_, UTL_ScopedName (corba_id, - 0)); + nullptr)); ACE_NEW (id, Identifier (this->width () == 1 @@ -125,26 +125,26 @@ be_string::compute_tc_name (void) // We have a bounded string. Generate a TypeCode name that is // meant for internal use alone. - Identifier * tao_id = 0; + Identifier * tao_id = nullptr; ACE_NEW (tao_id, Identifier ("TAO")); ACE_NEW (this->tc_name_, UTL_ScopedName (tao_id, - 0)); + nullptr)); ACE_CString local_tc_name = ACE_CString ("tc_") + ACE_CString (this->flat_name ()); - Identifier * typecode_scope = 0; + Identifier * typecode_scope = nullptr; ACE_NEW (typecode_scope, Identifier ("TypeCode")); - UTL_ScopedName * tc_scope_conc_name = 0; + UTL_ScopedName * tc_scope_conc_name = nullptr; ACE_NEW (tc_scope_conc_name, UTL_ScopedName (typecode_scope, - 0)); + nullptr)); this->tc_name_->nconc (tc_scope_conc_name); @@ -154,10 +154,10 @@ be_string::compute_tc_name (void) zero.destroy (); - UTL_ScopedName *conc_name = 0; + UTL_ScopedName *conc_name = nullptr; ACE_NEW (conc_name, UTL_ScopedName (id, - 0)); + nullptr)); this->tc_name_->nconc (conc_name); } diff --git a/TAO/TAO_IDL/be/be_structure.cpp b/TAO/TAO_IDL/be/be_structure.cpp index 2b9009a2388..414bac439fd 100644 --- a/TAO/TAO_IDL/be/be_structure.cpp +++ b/TAO/TAO_IDL/be/be_structure.cpp @@ -114,7 +114,7 @@ be_structure::gen_ostream_operator (TAO_OutStream *os, be_field *f = dynamic_cast<be_field*> (this->pd_decls[i]); // We don't want any decls, just members. - if (f == 0) + if (f == nullptr) { continue; } diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp index b3af3ac3626..6b5d0ed1749 100644 --- a/TAO/TAO_IDL/be/be_type.cpp +++ b/TAO/TAO_IDL/be/be_type.cpp @@ -35,12 +35,12 @@ be_type::be_type (AST_Decl::NodeType nt, n), be_decl (nt, n), - tc_name_ (0), + tc_name_ (nullptr), common_varout_gen_ (false), seen_in_sequence_ (false), seen_in_operation_ (false) { - if (n != 0) + if (n != nullptr) { this->gen_fwd_helper_name (); } @@ -61,32 +61,32 @@ be_type::compute_tc_name (void) static char namebuf [NAMEBUFSIZE]; UTL_ScopedName *n = this->name (); - if (this->tc_name_ != 0) + if (this->tc_name_ != nullptr) { this->tc_name_->destroy (); delete this->tc_name_; - this->tc_name_ = 0; + this->tc_name_ = nullptr; } ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE); - while (n->tail () != 0) + while (n->tail () != nullptr) { // Does not exist. - if (this->tc_name_ == 0) + if (this->tc_name_ == nullptr) { ACE_NEW (this->tc_name_, UTL_ScopedName (n->head ()->copy (), - 0)); + nullptr)); } else { - UTL_ScopedName *conc_name = 0; + UTL_ScopedName *conc_name = nullptr; ACE_NEW (conc_name, UTL_ScopedName (n->head ()->copy (), - 0)); + nullptr)); this->tc_name_->nconc (conc_name); } @@ -98,23 +98,23 @@ be_type::compute_tc_name (void) "_tc_%s", n->last_component ()->get_string ()); - Identifier *id = 0; + Identifier *id = nullptr; ACE_NEW (id, Identifier (namebuf)); // Does not exist. - if (this->tc_name_ == 0) + if (this->tc_name_ == nullptr) { ACE_NEW (this->tc_name_, UTL_ScopedName (id, - 0)); + nullptr)); } else { - UTL_ScopedName *conc_name = 0; + UTL_ScopedName *conc_name = nullptr; ACE_NEW (conc_name, UTL_ScopedName (id, - 0)); + nullptr)); this->tc_name_->nconc (conc_name); } @@ -125,7 +125,7 @@ UTL_ScopedName * be_type::tc_name (void) { // Compute and init the member. - if (this->tc_name_ == 0) + if (this->tc_name_ == nullptr) { this->compute_tc_name (); } @@ -145,7 +145,7 @@ be_type::nested_sp_type_name (be_decl *use_scope, const char *prefix) { // Our defining scope. - be_decl *fu_scope = 0; + be_decl *fu_scope = nullptr; char fu_name [NAMEBUFSIZE]; char fl_name [NAMEBUFSIZE]; @@ -160,10 +160,10 @@ be_type::nested_sp_type_name (be_decl *use_scope, fu_scope = this->defined_in () ? dynamic_cast<be_scope*> (this->defined_in ())->decl () - : 0; + : nullptr; ACE_OS::strcat (fu_name, - (fu_scope != 0 ? fu_scope->full_name () : "")); + (fu_scope != nullptr ? fu_scope->full_name () : "")); ACE_OS::strcat (fu_name, "::TAO_"); @@ -188,11 +188,11 @@ void be_type::gen_fwd_helper_name (void) { AST_Decl *parent = ScopeAsDecl (this->defined_in ()); - Identifier *segment = 0; - char *tmp = 0; + Identifier *segment = nullptr; + char *tmp = nullptr; this->fwd_helper_name_.clear (true); - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) + if (parent != nullptr && parent->node_type () != AST_Decl::NT_root) { for (UTL_IdListActiveIterator i (parent->name ()); !i.is_done (); @@ -306,16 +306,16 @@ be_type::gen_stub_decls (TAO_OutStream *os) AST_Interface *i = dynamic_cast<AST_Interface*> (this); AST_ValueType *v = dynamic_cast<AST_ValueType*> (this); - if (i != 0) + if (i != nullptr) { *os << "typedef " << this->local_name () - << (v == 0 ? "_ptr" : " *") << " _ptr_type;"; + << (v == nullptr ? "_ptr" : " *") << " _ptr_type;"; } bool skip_varout = false; AST_Sequence *s = dynamic_cast<AST_Sequence*> (this); - if (s != 0) + if (s != nullptr) { // _vars and _outs not supported yet by alt mapping. if (be_global->alt_mapping () && s->unbounded ()) @@ -379,11 +379,11 @@ be_type::base_node_type (void) const void be_type::destroy (void) { - if (this->tc_name_ != 0) + if (this->tc_name_ != nullptr) { this->tc_name_->destroy (); delete this->tc_name_; - this->tc_name_ = 0; + this->tc_name_ = nullptr; } this->be_decl::destroy (); diff --git a/TAO/TAO_IDL/be/be_typedef.cpp b/TAO/TAO_IDL/be/be_typedef.cpp index c49917167f2..a1aa30cbc58 100644 --- a/TAO/TAO_IDL/be/be_typedef.cpp +++ b/TAO/TAO_IDL/be/be_typedef.cpp @@ -73,7 +73,7 @@ be_type * be_typedef::primitive_base_type (void) { be_type *d = this; - be_typedef *temp = 0; + be_typedef *temp = nullptr; while (d && d->node_type () == AST_Decl::NT_typedef) { diff --git a/TAO/TAO_IDL/be/be_union.cpp b/TAO/TAO_IDL/be/be_union.cpp index 30d69ca70e2..371152a2cb0 100644 --- a/TAO/TAO_IDL/be/be_union.cpp +++ b/TAO/TAO_IDL/be/be_union.cpp @@ -111,7 +111,7 @@ be_union::gen_ostream_operator (TAO_OutStream *os, dynamic_cast<be_union_branch*> (this->pd_decls[i]); // We don't want any decls, just members. - if (ub == 0) + if (ub == nullptr) { continue; } @@ -207,7 +207,7 @@ be_union::gen_empty_default_label (void) } AST_ConcreteType *disc = this->disc_type (); - if (disc == 0) + if (disc == nullptr) { return true; // In reality this is an error. } @@ -224,7 +224,7 @@ be_union::gen_empty_default_label (void) } AST_PredefinedType *pdt = dynamic_cast<AST_PredefinedType*> (disc); - if (pdt == 0) + if (pdt == nullptr) { return true; // In reality this is an error. } @@ -278,7 +278,7 @@ be_union::nlabels (void) AST_UnionBranch *ub = dynamic_cast<AST_UnionBranch*> (d); - if (ub != 0) + if (ub != nullptr) { retval += ub->label_list_length (); } diff --git a/TAO/TAO_IDL/be/be_union_branch.cpp b/TAO/TAO_IDL/be/be_union_branch.cpp index 70d4bb34e7b..41312179c73 100644 --- a/TAO/TAO_IDL/be/be_union_branch.cpp +++ b/TAO/TAO_IDL/be/be_union_branch.cpp @@ -56,7 +56,7 @@ be_union_branch::gen_label_value (TAO_OutStream *os, unsigned long index) be_union *u = dynamic_cast<be_union*> (this->defined_in ()); - if (u == 0) + if (u == nullptr) { return -1; } @@ -64,7 +64,7 @@ be_union_branch::gen_label_value (TAO_OutStream *os, unsigned long index) be_type* dt = dynamic_cast<be_type*> (u->disc_type ()); - if (dt == 0) + if (dt == nullptr) { return -1; } @@ -85,7 +85,7 @@ be_union_branch::gen_label_value (TAO_OutStream *os, unsigned long index) be_scope* scope = dynamic_cast<be_scope*> (dt->defined_in ()); - if (scope == 0) + if (scope == nullptr) { *os << e->n (); return 0; diff --git a/TAO/TAO_IDL/be/be_uses.cpp b/TAO/TAO_IDL/be/be_uses.cpp index 739e7865011..1c7e8b67254 100644 --- a/TAO/TAO_IDL/be/be_uses.cpp +++ b/TAO/TAO_IDL/be/be_uses.cpp @@ -19,7 +19,7 @@ be_uses::be_uses (UTL_ScopedName *n, n), be_field (uses_type, n), - original_uses_ (0) + original_uses_ (nullptr) { } diff --git a/TAO/TAO_IDL/be/be_util.cpp b/TAO/TAO_IDL/be/be_util.cpp index 5b7d379ad4a..8a0c0fada54 100644 --- a/TAO/TAO_IDL/be/be_util.cpp +++ b/TAO/TAO_IDL/be/be_util.cpp @@ -34,7 +34,7 @@ be_util::gen_nested_namespace_begin (TAO_OutStream *os, be_module *node, bool skel) { - char *item_name = 0; + char *item_name = nullptr; bool first_level = true; for (UTL_IdListActiveIterator i (node->name ()); @@ -154,11 +154,11 @@ be_util::prep_be_arg (char *s) static const char stripped_filename[] = "stripped_filename="; static const char no_fixed_err[] = "no_fixed_err"; - char* last = 0; + char* last = nullptr; for (char* arg = ACE_OS::strtok_r (s, ",", &last); - arg != 0; - arg = ACE_OS::strtok_r (0, ",", &last)) + arg != nullptr; + arg = ACE_OS::strtok_r (nullptr, ",", &last)) { if (ACE_OS::strstr (arg, arg_macro) == arg) { @@ -944,10 +944,10 @@ be_util::generator_init (void) { tao_cg = TAO_CODEGEN::instance (); - AST_Generator *gen = 0; + AST_Generator *gen = nullptr; ACE_NEW_RETURN (gen, be_generator, - 0); + nullptr); return gen; } @@ -957,15 +957,15 @@ be_util::get_output_path (bool for_anyop, bool for_skel, bool for_exec) { - if (for_anyop && 0 != be_global->anyop_output_dir ()) + if (for_anyop && nullptr != be_global->anyop_output_dir ()) { return be_global->anyop_output_dir (); } - else if (for_skel && 0 != be_global->skel_output_dir ()) + else if (for_skel && nullptr != be_global->skel_output_dir ()) { return be_global->skel_output_dir (); } - else if (for_exec && 0 != be_global->exec_output_dir ()) + else if (for_exec && nullptr != be_global->exec_output_dir ()) { return be_global->exec_output_dir (); } @@ -1008,7 +1008,7 @@ be_util::overwrite_ciao_exec_files () void be_util::set_arg_seen_bit (be_type *bt) { - if (bt == 0) + if (bt == nullptr) { return; } diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp index c33d72cf256..13191558703 100644 --- a/TAO/TAO_IDL/be/be_valuetype.cpp +++ b/TAO/TAO_IDL/be/be_valuetype.cpp @@ -77,7 +77,7 @@ be_valuetype::be_valuetype (UTL_ScopedName *n, custom), supports_abstract_ (false), var_out_seq_decls_gen_ (false), - full_obv_skel_name_ (0), + full_obv_skel_name_ (nullptr), is_amh_excep_holder_ (false) { // Check that redefine() copies all members. @@ -87,7 +87,7 @@ be_valuetype::be_valuetype (UTL_ScopedName *n, AST_Module *m = dynamic_cast<AST_Module*> (this->defined_in ()); - if (m != 0) + if (m != nullptr) { m->set_has_nested_valuetype (); } @@ -100,7 +100,7 @@ be_valuetype::be_valuetype (UTL_ScopedName *n, be_interface *intf = dynamic_cast<be_interface*> (this->pd_supports[i]); - if (intf == 0) + if (intf == nullptr) { // The item is a template param holder. continue; @@ -142,7 +142,7 @@ be_valuetype::redefine (AST_Interface *from) // This should always be TRUE, but our signature is inherited, so // the narrow is necessary and should always be checked. - if (bv != 0) + if (bv != nullptr) { this->var_out_seq_decls_gen_ = bv->var_out_seq_decls_gen_; } @@ -170,7 +170,7 @@ be_valuetype::compute_fullobvskelname (void) const char* be_valuetype::full_obv_skel_name (void) { - if (0 == this->full_obv_skel_name_) + if (nullptr == this->full_obv_skel_name_) { this->compute_fullobvskelname (); } @@ -303,7 +303,7 @@ be_valuetype::have_operation (void) { be_valuetype *vt = dynamic_cast<be_valuetype*> (inherits[i]); - if (vt != 0 && vt->have_operation ()) + if (vt != nullptr && vt->have_operation ()) { have_operation = true; break; @@ -316,12 +316,12 @@ be_valuetype::have_operation (void) // Check for operations on supported interfaces AST_Type * supported = this->supports_concrete (); - if (supported != 0) + if (supported != nullptr) { be_interface *intf = dynamic_cast<be_interface*> (supported); - if (intf != 0) + if (intf != nullptr) { have_operation = be_valuetype::have_supported_op (intf); @@ -349,7 +349,7 @@ be_valuetype::have_supported_op (be_interface * node) { AST_Decl *d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_valuetype::") @@ -380,7 +380,7 @@ be_valuetype::have_supported_op (be_interface * node) be_interface * intf = dynamic_cast<be_interface*> (inherits[i]); - if (intf != 0) + if (intf != nullptr) { have_supported_op = be_valuetype::have_supported_op (intf); @@ -410,7 +410,7 @@ be_valuetype::has_member (void) AST_Type *parent = this->pd_inherits_concrete; // We're looking for inherited members too. - if (parent != 0) + if (parent != nullptr) { be_valuetype *be_parent = dynamic_cast<be_valuetype*> (parent); @@ -603,7 +603,7 @@ be_valuetype::field_pd_postfix (void) be_valuetype * be_valuetype::statefull_inherit (void) { - if (this->pd_inherits_concrete != 0) + if (this->pd_inherits_concrete != nullptr) { return dynamic_cast<be_valuetype*> ( @@ -611,7 +611,7 @@ be_valuetype::statefull_inherit (void) } else { - return 0; + return nullptr; } } @@ -626,7 +626,7 @@ void be_valuetype::destroy (void) { delete [] this->full_obv_skel_name_; - this->full_obv_skel_name_ = 0; + this->full_obv_skel_name_ = nullptr; this->be_interface::destroy (); this->AST_ValueType::destroy (); @@ -654,7 +654,7 @@ be_valuetype::data_members_count (AST_Field::Visibility vis) AST_Field *field = dynamic_cast<AST_Field*> (d); AST_Attribute *attr = dynamic_cast<AST_Attribute*> (d); - if (field == 0 || attr != 0) + if (field == nullptr || attr != nullptr) { continue; } @@ -701,7 +701,7 @@ be_valuetype::traverse_supports_list_graphs ( this->insert_queue.reset (); this->del_queue.reset (); - be_interface *supported_interface = 0; + be_interface *supported_interface = nullptr; for (long i = 0; i < n_supports; ++i) { @@ -744,7 +744,7 @@ be_valuetype::traverse_concrete_inheritance_graph (tao_code_emitter gen, { AST_Type *supported = this->supports_concrete (); - if (supported == 0) + if (supported == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp index a694dbc036f..564b30a082b 100644 --- a/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp +++ b/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp @@ -68,7 +68,7 @@ int be_visitor_amh_pre_proc::visit_interface (be_interface *node) { // Do not generate AMH classes for any sort of implied IDL. - if (node->original_interface () != 0) + if (node->original_interface () != nullptr) { return 0; } @@ -113,7 +113,7 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) be_interface *response_handler = this->create_response_handler (node, excep_holder); - if (response_handler == 0) + if (response_handler == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_amh_pre_proc::" @@ -167,16 +167,16 @@ be_visitor_amh_pre_proc::create_response_handler ( // the inherited classes in the original interface, change their // names and then use the symbol table to look up the // AMH-response-handler nodes. - be_interface *response_handler = 0; + be_interface *response_handler = nullptr; ACE_NEW_RETURN (response_handler, be_interface (amh_name, // name - 0, // list of inherited + nullptr, // list of inherited 0, // number of inherited - 0, // list of ancestors + nullptr, // list of ancestors 0, // number of ancestors 1, // local 0), // non-abstract - 0); + nullptr); idl_global->scopes ().pop (); @@ -190,7 +190,7 @@ be_visitor_amh_pre_proc::create_response_handler ( // and set the prefix to the node's prefix. All this is // necessary in case the node's prefix was modified after // its declaration. - response_handler->AST_Decl::repoID (0); + response_handler->AST_Decl::repoID (nullptr); response_handler->prefix (const_cast<char*> (node->prefix ())); response_handler->gen_fwd_helper_name (); @@ -231,7 +231,7 @@ be_visitor_amh_pre_proc::add_rh_node_members ( be_interface *node, { be_attribute *attr = dynamic_cast<be_attribute*> (d); - if (attr != 0) + if (attr != nullptr) { status = this->create_response_handler_attribute (attr, @@ -252,7 +252,7 @@ be_visitor_amh_pre_proc::add_rh_node_members ( be_interface *node, { be_operation* operation = dynamic_cast<be_operation*> (d); - if (operation != 0) + if (operation != nullptr) { status = this->create_response_handler_operation (operation, @@ -285,7 +285,7 @@ be_visitor_amh_pre_proc::create_response_handler_operation ( be_valuetype *exception_holder ) { - if (node == 0) + if (node == nullptr) { return -1; } @@ -325,7 +325,7 @@ be_visitor_amh_pre_proc::create_response_handler_attribute ( get_operation->destroy (); delete get_operation; - get_operation = 0; + get_operation = nullptr; if (status == -1) { @@ -349,7 +349,7 @@ be_visitor_amh_pre_proc::create_response_handler_attribute ( set_operation->destroy (); delete set_operation; - set_operation = 0; + set_operation = nullptr; return status; } @@ -362,7 +362,7 @@ be_visitor_amh_pre_proc::add_exception_reply (be_operation *node, UTL_ScopedName *operation_name = node->compute_name ("", "_excep"); - be_operation *node_excep = 0; + be_operation *node_excep = nullptr; ACE_NEW_RETURN (node_excep, be_operation (be_global->void_type (), AST_Operation::OP_noflags, @@ -373,17 +373,17 @@ be_visitor_amh_pre_proc::add_exception_reply (be_operation *node, node_excep->set_name (operation_name); - Identifier *arg_id = 0; + Identifier *arg_id = nullptr; ACE_NEW_RETURN (arg_id, Identifier ("holder"), -1); - UTL_ScopedName *arg_name = 0; + UTL_ScopedName *arg_name = nullptr; ACE_NEW_RETURN (arg_name, - UTL_ScopedName (arg_id, 0), + UTL_ScopedName (arg_id, nullptr), -1); - be_argument *argument = 0; + be_argument *argument = nullptr; ACE_NEW_RETURN (argument, be_argument (AST_Argument::dir_IN, exception_holder, @@ -396,7 +396,7 @@ be_visitor_amh_pre_proc::add_exception_reply (be_operation *node, node_excep->set_defined_in (response_handler); - if (0 == response_handler->be_add_operation (node_excep)) + if (nullptr == response_handler->be_add_operation (node_excep)) { return -1; } @@ -408,8 +408,8 @@ int be_visitor_amh_pre_proc::add_normal_reply (be_operation *node, be_interface *response_handler) { - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; ACE_CString original_op_name ( node->name ()->last_component ()->get_string () @@ -424,13 +424,13 @@ be_visitor_amh_pre_proc::add_normal_reply (be_operation *node, ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); op_name->nconc (sn); // Create the operation - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (be_global->void_type (), AST_Operation::OP_noflags, @@ -445,18 +445,18 @@ be_visitor_amh_pre_proc::add_normal_reply (be_operation *node, if (!node->void_return_type ()) { - Identifier *arg_id = 0; + Identifier *arg_id = nullptr; ACE_NEW_RETURN (arg_id, Identifier ("return_value"), -1); - UTL_ScopedName *arg_name = 0; + UTL_ScopedName *arg_name = nullptr; ACE_NEW_RETURN (arg_name, - UTL_ScopedName (arg_id, 0), + UTL_ScopedName (arg_id, nullptr), -1); // Create the argument - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node->return_type (), @@ -481,7 +481,7 @@ be_visitor_amh_pre_proc::add_normal_reply (be_operation *node, { operation->destroy (); delete operation; - operation = 0; + operation = nullptr; ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_amh_pre_proc::") @@ -498,7 +498,7 @@ be_visitor_amh_pre_proc::add_normal_reply (be_operation *node, original_arg->direction () == AST_Argument::dir_OUT) { // Create the argument - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, original_arg->field_type (), @@ -516,7 +516,7 @@ be_visitor_amh_pre_proc::add_normal_reply (be_operation *node, // After having generated the operation we insert it into the // response handler interface. - if (0 == response_handler->be_add_operation (operation)) + if (nullptr == response_handler->be_add_operation (operation)) { return -1; } @@ -548,7 +548,7 @@ be_visitor_amh_pre_proc::create_exception_holder (be_interface *node) idl_global->valuefactory_seen_ = true; const int inherit_count = 0; - AST_Type **p_intf = 0; + AST_Type **p_intf = nullptr; UTL_ScopedName *excep_holder_name = node->compute_name ("AMH_", @@ -557,21 +557,21 @@ be_visitor_amh_pre_proc::create_exception_holder (be_interface *node) UTL_Scope *s = node->defined_in (); idl_global->scopes ().push (s); - be_valuetype *excep_holder = 0; + be_valuetype *excep_holder = nullptr; ACE_NEW_RETURN (excep_holder, be_valuetype (excep_holder_name, p_intf, inherit_count, + nullptr, + nullptr, 0, + nullptr, 0, - 0, - 0, - 0, - 0, + nullptr, 0, 0, 0), - 0); + nullptr); idl_global->scopes ().pop (); @@ -582,7 +582,7 @@ be_visitor_amh_pre_proc::create_exception_holder (be_interface *node) // and set the prefix to the node's prefix. All this is // necessary in case the node's prefix was modified after // its declaration. - excep_holder->AST_Decl::repoID (0); + excep_holder->AST_Decl::repoID (nullptr); excep_holder->prefix (const_cast<char*> (node->prefix ())); excep_holder->gen_fwd_helper_name (); @@ -597,7 +597,7 @@ be_visitor_amh_pre_proc::create_exception_holder (be_interface *node) { AST_Decl *d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_amh_pre_proc::" @@ -613,9 +613,9 @@ be_visitor_amh_pre_proc::create_exception_holder (be_interface *node) { AST_Attribute *attribute = dynamic_cast<AST_Attribute*> (d); - if (attribute == 0) + if (attribute == nullptr) { - return 0; + return nullptr; } this->create_raise_operation (op, @@ -651,9 +651,9 @@ be_visitor_amh_pre_proc::create_raise_operation ( Operation_Kind operation_kind ) { - Identifier *id = 0; - UTL_ScopedName *sn = 0; - be_operation *orig_op = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; + be_operation *orig_op = nullptr; if (operation_kind == NORMAL) { @@ -683,12 +683,12 @@ be_visitor_amh_pre_proc::create_raise_operation ( ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); op_name->nconc (sn); - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (be_global->void_type (), AST_Operation::OP_noflags, @@ -707,7 +707,7 @@ be_visitor_amh_pre_proc::create_raise_operation ( // Copy the exceptions. UTL_ExceptList *exceptions = orig_op->exceptions (); - if (0 != exceptions) + if (nullptr != exceptions) { operation->be_add_exceptions (exceptions->copy ()); } @@ -716,7 +716,7 @@ be_visitor_amh_pre_proc::create_raise_operation ( // After having generated the operation we insert it into the // exceptionholder valuetype. - if (0 == excep_holder->be_add_operation (operation)) + if (nullptr == excep_holder->be_add_operation (operation)) { return -1; } @@ -751,14 +751,14 @@ be_visitor_amh_pre_proc::generate_get_operation (be_attribute *node) static_cast<UTL_ScopedName *> (node->name ()-> copy ()); get_name->last_component ()->replace_string (new_op_name.c_str ()); - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (node->field_type (), AST_Operation::OP_noflags, get_name, 1, 0), - 0); + nullptr); operation->set_name (get_name); operation->set_defined_in (node->defined_in ()); @@ -779,24 +779,24 @@ be_visitor_amh_pre_proc::generate_set_operation (be_attribute *node) set_op_name->last_component ()->replace_string (new_op_name.c_str ()); // argument type is the same as the attribute type - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node->field_type (), set_op_name), - 0); + nullptr); arg->set_name (dynamic_cast<UTL_ScopedName *> (node->name ()->copy ())); // create the operation - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (be_global->void_type (), AST_Operation::OP_noflags, set_op_name, 0, 0), - 0); + nullptr); operation->set_name (set_op_name); operation->set_defined_in (node->defined_in ()); diff --git a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp index c1903159456..4d312589825 100644 --- a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp +++ b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp @@ -122,7 +122,7 @@ be_visitor_ami_pre_proc::visit_interface (be_interface *node) AST_Decl *first_stored = node->defined_in ()->lookup_by_name_local (node_lname, false); - if (0 != first_stored && first_stored->node_type () == AST_Decl::NT_home) + if (nullptr != first_stored && first_stored->node_type () == AST_Decl::NT_home) { return 0; } @@ -137,7 +137,7 @@ be_visitor_ami_pre_proc::visit_interface (be_interface *node) AST_Decl *d = s->lookup_by_name_local (&local_id, false); local_id.destroy (); - if (0 != d) + if (nullptr != d) { return 0; } @@ -231,7 +231,7 @@ be_visitor_ami_pre_proc::visit_attribute (be_attribute *node) set_operation->destroy (); delete set_operation; - set_operation = 0; + set_operation = nullptr; } /// Temporarily generate the get operation. @@ -243,7 +243,7 @@ be_visitor_ami_pre_proc::visit_attribute (be_attribute *node) get_operation->destroy (); delete get_operation; - get_operation = 0; + get_operation = nullptr; return 0; } @@ -275,7 +275,7 @@ be_visitor_ami_pre_proc::create_reply_handler (be_interface *node) AST_Type **p_intf = this->create_inheritance_list (node, n_parents); - if (p_intf == 0) + if (p_intf == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_ami_pre_proc::visit_interface - " @@ -283,16 +283,16 @@ be_visitor_ami_pre_proc::create_reply_handler (be_interface *node) 0); } - be_interface *reply_handler = 0; + be_interface *reply_handler = nullptr; ACE_NEW_RETURN (reply_handler, be_interface (reply_handler_name, // name p_intf, // list of inherited n_parents, // number of inherited - 0, // list of all ancestors + nullptr, // list of all ancestors 0, // number of ancestors 0, // non-local 0), // non-abstract - 0); + nullptr); // Back to reality. idl_global->scopes ().pop (); @@ -307,7 +307,7 @@ be_visitor_ami_pre_proc::create_reply_handler (be_interface *node) // and set the prefix to the node's prefix. All this is // necessary in case the node's prefix was modified after // its declaration. - reply_handler->AST_Decl::repoID (0); + reply_handler->AST_Decl::repoID (nullptr); reply_handler->prefix (const_cast<char*> (node->prefix ())); reply_handler->gen_fwd_helper_name (); @@ -355,7 +355,7 @@ be_visitor_ami_pre_proc::create_reply_handler (be_interface *node) get_operation->destroy (); delete get_operation; - get_operation = 0; + get_operation = nullptr; if (!attribute->readonly ()) { @@ -370,7 +370,7 @@ be_visitor_ami_pre_proc::create_reply_handler (be_interface *node) set_operation->destroy (); delete set_operation; - set_operation = 0; + set_operation = nullptr; } } } @@ -402,11 +402,11 @@ be_visitor_ami_pre_proc::create_sendc_operation (be_operation *node) if (node->flags () == AST_Operation::OP_oneway) { // We do nothing for oneways! - return 0; + return nullptr; } - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; // Create the new name // Prepend "sendc_" to the name of the operation @@ -422,14 +422,14 @@ be_visitor_ami_pre_proc::create_sendc_operation (be_operation *node) idl_global->scopes ().push (node->defined_in ()); // Create the operation - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (be_global->void_type (), AST_Operation::OP_noflags, op_name, false, false), - 0); + nullptr); idl_global->scopes ().pop (); @@ -452,11 +452,11 @@ be_visitor_ami_pre_proc::create_sendc_operation (be_operation *node) AST_Interface *handler = parent->ami_handler (); - if (0 == handler) + if (nullptr == handler) { op->destroy (); delete op; - op = 0; + op = nullptr; ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ami_pre_proc::") @@ -471,24 +471,24 @@ be_visitor_ami_pre_proc::create_sendc_operation (be_operation *node) ACE_NEW_RETURN (id, Identifier ("ami_handler"), - 0); + nullptr); - UTL_ScopedName *tmp = 0; + UTL_ScopedName *tmp = nullptr; ACE_NEW_RETURN (tmp, UTL_ScopedName (id, - 0), - 0); + nullptr), + nullptr); sn = (UTL_ScopedName *)op->name ()->copy (); sn->nconc (tmp); - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, field_type, // is also a valuetype sn), - 0); + nullptr); arg->set_defined_in (op); arg->set_name (sn); @@ -528,14 +528,14 @@ be_visitor_ami_pre_proc::create_sendc_operation (be_operation *node) original_arg->direction () == AST_Argument::dir_INOUT) { // Create the argument. - be_argument *arg = 0; + be_argument *arg = nullptr; UTL_ScopedName *new_name = (UTL_ScopedName *)original_arg->name ()->copy (); ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, original_arg->field_type (), new_name), - 0); + nullptr); arg->set_defined_in (op); arg->set_name (new_name); @@ -565,8 +565,8 @@ be_visitor_ami_pre_proc::create_reply_handler_operation ( return 0; } - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; ACE_CString original_op_name ( node->name ()->last_component ()->get_string () @@ -581,13 +581,13 @@ be_visitor_ami_pre_proc::create_reply_handler_operation ( ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); op_name->nconc (sn); // Create the operation. - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (be_global->void_type (), AST_Operation::OP_noflags, @@ -606,18 +606,18 @@ be_visitor_ami_pre_proc::create_reply_handler_operation ( Identifier ("ami_return_val"), -1); - UTL_ScopedName *tmp = 0; + UTL_ScopedName *tmp = nullptr; ACE_NEW_RETURN (tmp, UTL_ScopedName (id, - 0), + nullptr), -1); sn = (UTL_ScopedName *)operation->name ()->copy (); sn->nconc (tmp); // Create the argument. - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node->return_type (), @@ -642,11 +642,11 @@ be_visitor_ami_pre_proc::create_reply_handler_operation ( { AST_Decl *d = si.item (); - if (d == 0) + if (d == nullptr) { operation->destroy (); delete operation; - operation = 0; + operation = nullptr; ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ami_pre_proc::") @@ -662,7 +662,7 @@ be_visitor_ami_pre_proc::create_reply_handler_operation ( original_arg->direction () == AST_Argument::dir_OUT) { // Create the argument. - be_argument *arg = 0; + be_argument *arg = nullptr; UTL_ScopedName *new_name = (UTL_ScopedName *)original_arg->name ()->copy (); ACE_NEW_RETURN (arg, @@ -685,7 +685,7 @@ be_visitor_ami_pre_proc::create_reply_handler_operation ( { UTL_ExceptList *exceptions = node->exceptions (); - if (0 != exceptions) + if (nullptr != exceptions) { operation->be_add_exceptions (exceptions->copy ()); } @@ -693,7 +693,7 @@ be_visitor_ami_pre_proc::create_reply_handler_operation ( // After having generated the operation we insert it into the // reply handler interface. - if (0 == reply_handler->be_add_operation (operation)) + if (nullptr == reply_handler->be_add_operation (operation)) { return -1; } @@ -713,8 +713,8 @@ be_visitor_ami_pre_proc::create_excep_operation (be_operation *node, } // Create the return type, which is "void". - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; // Create the argument. ACE_NEW_RETURN (id, @@ -723,11 +723,11 @@ be_visitor_ami_pre_proc::create_excep_operation (be_operation *node, ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); be_valuetype *excep_holder = be_global->messaging_exceptionholder (); - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, excep_holder, // is also a valuetype @@ -754,7 +754,7 @@ be_visitor_ami_pre_proc::create_excep_operation (be_operation *node, ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); op_name->nconc (sn); @@ -762,7 +762,7 @@ be_visitor_ami_pre_proc::create_excep_operation (be_operation *node, AST_PredefinedType *rt = be_global->void_type (); // Create the operation. - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (rt, AST_Operation::OP_noflags, @@ -785,7 +785,7 @@ be_visitor_ami_pre_proc::create_excep_operation (be_operation *node, // be needed when collocation is disabled. UTL_ExceptList *exceptions = node->exceptions (); - if (0 != exceptions) + if (nullptr != exceptions) { operation->be_add_exceptions (exceptions->copy ()); } @@ -815,7 +815,7 @@ be_visitor_ami_pre_proc::visit_scope (be_scope *node) } } - AST_Decl **elements = 0; + AST_Decl **elements = nullptr; ACE_NEW_RETURN (elements, AST_Decl *[number_of_elements], -1); @@ -842,7 +842,7 @@ be_visitor_ami_pre_proc::visit_scope (be_scope *node) if (!d) { delete [] elements; - elements = 0; + elements = nullptr; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " "bad node in this scope\n"), @@ -866,10 +866,10 @@ be_visitor_ami_pre_proc::visit_scope (be_scope *node) this->ctx_->node (bd); // Send the visitor. - if (bd == 0 || bd->accept (this) == -1) + if (bd == nullptr || bd->accept (this) == -1) { delete [] elements; - elements = 0; + elements = nullptr; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " "codegen for scope failed\n"), @@ -878,7 +878,7 @@ be_visitor_ami_pre_proc::visit_scope (be_scope *node) } // end of while loop delete [] elements; - elements = 0; + elements = nullptr; } // end of if return 0; @@ -910,14 +910,14 @@ be_visitor_ami_pre_proc::generate_get_operation (be_attribute *node) static_cast<UTL_ScopedName *> (node->name ()->copy ()); get_name->last_component ()->replace_string (new_op_name.c_str ()); - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (node->field_type (), AST_Operation::OP_noflags, get_name, false, false), - 0); + nullptr); operation->set_name (get_name); operation->set_defined_in (node->defined_in ()); @@ -926,7 +926,7 @@ be_visitor_ami_pre_proc::generate_get_operation (be_attribute *node) // be needed when collocation is disabled. UTL_ExceptList *exceptions = node->get_get_exceptions (); - if (0 != exceptions) + if (nullptr != exceptions) { operation->be_add_exceptions (exceptions->copy ()); } @@ -948,24 +948,24 @@ be_visitor_ami_pre_proc::generate_set_operation (be_attribute *node) set_name->last_component ()->replace_string (new_op_name.c_str ()); // Argument type is the same as the attribute type. - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node->field_type (), set_name), - 0); + nullptr); arg->set_name ((UTL_ScopedName *) node->name ()->copy ()); // Create the operation. - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (be_global->void_type (), AST_Operation::OP_noflags, set_name, false, false), - 0); + nullptr); operation->set_name (set_name); operation->set_defined_in (node->defined_in ()); @@ -975,7 +975,7 @@ be_visitor_ami_pre_proc::generate_set_operation (be_attribute *node) // be needed when collocation is disabled. UTL_ExceptList *exceptions = node->get_set_exceptions (); - if (0 != exceptions) + if (nullptr != exceptions) { operation->be_add_exceptions (exceptions->copy ()); } @@ -988,11 +988,11 @@ AST_Type ** be_visitor_ami_pre_proc::create_inheritance_list (be_interface *node, long &n_rh_parents) { - AST_Type **retval = 0; + AST_Type **retval = nullptr; long const n_parents = node->n_inherits (); AST_Type **parents = node->inherits (); - AST_Type *parent = 0; + AST_Type *parent = nullptr; for (long i = 0; i < n_parents; ++i) { @@ -1012,7 +1012,7 @@ be_visitor_ami_pre_proc::create_inheritance_list (be_interface *node, ACE_NEW_RETURN (retval, AST_Type *[1], - 0); + nullptr); retval[0] = inherit_intf; n_rh_parents = 1; @@ -1021,7 +1021,7 @@ be_visitor_ami_pre_proc::create_inheritance_list (be_interface *node, { ACE_NEW_RETURN (retval, AST_Type *[n_rh_parents], - 0); + nullptr); ACE_CString prefix ("AMI_"); @@ -1051,7 +1051,7 @@ be_visitor_ami_pre_proc::create_inheritance_list (be_interface *node, node->defined_in ()->lookup_by_name (rh_parent_name, true); - if (d != 0) + if (d != nullptr) { retval[index] = dynamic_cast<AST_Interface*> (d); retval[index++]->set_prefix_with_typeprefix (parent->prefix () ? @@ -1061,7 +1061,7 @@ be_visitor_ami_pre_proc::create_inheritance_list (be_interface *node, rh_parent_name->destroy (); delete rh_parent_name; - rh_parent_name = 0; + rh_parent_name = nullptr; } // Just a sanity check until we're sure this works in all use cases. @@ -1115,7 +1115,7 @@ be_visitor_ami_pre_proc::generate_ami4ccm_idl (void) ! i.done (); i.advance ()) { - char **item = 0; + char **item = nullptr; i.next (item); UTL_ScopedName *sn = @@ -1126,25 +1126,25 @@ be_visitor_ami_pre_proc::generate_ami4ccm_idl (void) AST_Decl *d = s->lookup_by_name (sn, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (sn); sn->destroy (); delete sn; - sn = 0; + sn = nullptr; continue; } sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_interface *iface = dynamic_cast<be_interface*> (d); - if (iface == 0) + if (iface == nullptr) { idl_global->err ()->interface_expected (d); continue; diff --git a/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp b/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp index 9a16e7d7ced..743a429e301 100644 --- a/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp @@ -157,7 +157,7 @@ be_visitor_any_extracted_type_decl::visit_sequence (be_sequence *node) { be_type *bt = this->ctx_->alias (); - if (bt == 0) + if (bt == nullptr) { bt = node; } @@ -203,7 +203,7 @@ be_visitor_any_extracted_type_decl::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp index b1528b48f1c..8eee5d3ec5f 100644 --- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp @@ -484,14 +484,14 @@ be_visitor_arg_traits::visit_operation (be_operation *node) int be_visitor_arg_traits::visit_attribute (be_attribute *node) { - if (this->ctx_->alias () != 0 || this->generated (node)) + if (this->ctx_->alias () != nullptr || this->generated (node)) { return 0; } AST_String *st = dynamic_cast<AST_String*> (node->field_type ()); - if (st == 0) + if (st == nullptr) { return 0; } @@ -559,7 +559,7 @@ be_visitor_arg_traits::visit_attribute (be_attribute *node) int be_visitor_arg_traits::visit_argument (be_argument *node) { - if (this->ctx_->alias () != 0 || this->generated (node)) + if (this->ctx_->alias () != nullptr || this->generated (node)) { return 0; } @@ -674,7 +674,7 @@ be_visitor_arg_traits::visit_sequence (be_sequence *node) be_typedef *alias = this->ctx_->alias (); /// No arg traits for anonymous sequences. - if (alias == 0) + if (alias == nullptr) { return 0; } @@ -741,7 +741,7 @@ be_visitor_arg_traits::visit_string (be_string *node) // since a bounded (w)string of the same length may be used or typedef'd // more than once. - if (alias == 0) + if (alias == nullptr) { os->gen_ifdef_macro (node->flat_name (), guard_suffix.c_str (), false); } @@ -758,14 +758,14 @@ be_visitor_arg_traits::visit_string (be_string *node) } size_t bound_length = num_digits + 1; - char* bound_string = 0; + char* bound_string = nullptr; ACE_NEW_RETURN (bound_string, char[bound_length], -1) ; ACE_OS::sprintf (bound_string, ACE_UINT32_FORMAT_SPECIFIER_ASCII, bound); size_t cat_length = ACE_OS::strlen (alias->local_name ()->get_string ()) + ACE_OS::strlen (bound_string) + 1; - char* cat_string = 0; + char* cat_string = nullptr; ACE_NEW_RETURN (cat_string, char[cat_length], -1) ; ACE_OS::strcpy (cat_string, alias->local_name ()->get_string ()) ; ACE_OS::strcat (cat_string, bound_string); @@ -785,7 +785,7 @@ be_visitor_arg_traits::visit_string (be_string *node) *os << be_nl_2 << "struct "; - if (alias == 0) + if (alias == nullptr) { *os << node->flat_name (); } @@ -802,7 +802,7 @@ be_visitor_arg_traits::visit_string (be_string *node) << "class " << this->S_ << "Arg_Traits<"; - if (0 == alias) + if (nullptr == alias) { *os << node->flat_name (); } @@ -845,7 +845,7 @@ be_visitor_arg_traits::visit_array (be_array *node) // Add the alias check here because anonymous arrays can't be // operation arguments. - if (this->generated (node) || this->ctx_->alias () == 0) + if (this->generated (node) || this->ctx_->alias () == nullptr) { return 0; } @@ -1172,7 +1172,7 @@ be_visitor_arg_traits::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp index 2815a5a50c9..86e9a04f458 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp @@ -280,7 +280,7 @@ int be_visitor_args_arglist::visit_sequence (be_sequence *node) // then 'type_name' below will output 'sequence'. if (node->imported () && node->anonymous ()) { - (void) node->create_name (0); + (void) node->create_name (nullptr); } TAO_OutStream *os = this->ctx_->stream (); @@ -417,7 +417,7 @@ int be_visitor_args_arglist::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp b/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp index 6162775336a..eb00fc3af60 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp @@ -39,7 +39,7 @@ be_visitor_args::type_name (be_type *node, '\0', NAMEBUFSIZE); - be_type *bt = 0; + be_type *bt = nullptr; // Use the typedefed name if that is the one // used in the IDL defn. diff --git a/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp b/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp index c5944774095..1d29b63b725 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp @@ -402,7 +402,7 @@ int be_visitor_args_invoke_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp index 4c6294b0ad1..d1246f9c4e3 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp @@ -394,7 +394,7 @@ int be_visitor_args_marshal_ss::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp index bf59b624591..bcb4afbd2c6 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp @@ -307,7 +307,7 @@ int be_visitor_args_upcall_ss::visit_typedef ( -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp index c6326c6afcd..d0ca1908a4b 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp @@ -66,7 +66,7 @@ int be_visitor_args_vardecl_ss::visit_array ( TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = dynamic_cast<be_argument*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -114,7 +114,7 @@ int be_visitor_args_vardecl_ss::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = dynamic_cast<be_argument*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -176,7 +176,7 @@ int be_visitor_args_vardecl_ss::visit_predefined_type ( TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = dynamic_cast<be_argument*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -261,7 +261,7 @@ int be_visitor_args_vardecl_ss::visit_sequence ( TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = dynamic_cast<be_argument*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -358,7 +358,7 @@ int be_visitor_args_vardecl_ss::visit_typedef ( -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -402,7 +402,7 @@ be_visitor_args_vardecl_ss::emit_common ( TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = dynamic_cast<be_argument*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -439,7 +439,7 @@ be_visitor_args_vardecl_ss::emit_common2 (be_type *node) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = dynamic_cast<be_argument*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp index 163c65fc6e5..030d1358756 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp @@ -88,7 +88,7 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << be_idt << be_idt_nl << "_tao_any," << be_nl << node->name () << "_forany::_tao_any_destructor," << be_nl - << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem.nocopy ()" << be_idt_nl << "? _tao_elem.ptr ()" << be_nl << ": " @@ -108,7 +108,7 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << ">::extract (" << be_idt << be_idt_nl << "_tao_any," << be_nl << node->name () << "_forany::_tao_any_destructor," << be_nl - << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem.out ()" << be_uidt_nl << ");" << be_uidt << be_uidt << be_uidt << be_uidt_nl << "}"; diff --git a/TAO/TAO_IDL/be/be_visitor_array/array.cpp b/TAO/TAO_IDL/be/be_visitor_array/array.cpp index 28ab78b534d..c98b321b6f2 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array.cpp @@ -169,7 +169,7 @@ int be_visitor_array::visit_node (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -196,7 +196,7 @@ int be_visitor_array::emit_common (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp index affd9b6e14d..eec3b5f8f76 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp @@ -70,7 +70,7 @@ int be_visitor_array_ch::visit_array (be_array *node) // If the array is an anonymous member and if its element type // is a declaration (not a reference), we must generate code for // the declaration. - if (this->ctx_->alias () == 0 // Not a typedef. + if (this->ctx_->alias () == nullptr // Not a typedef. && bt->is_child (this->ctx_->scope ()->decl ())) { int status = 0; @@ -126,7 +126,7 @@ int be_visitor_array_ch::visit_array (be_array *node) be_typedef *td = this->ctx_->tdef (); - if (td == 0) + if (td == nullptr) { // We are dealing with an anonymous array case. Generate a typedef with // an _ prepended to the name. @@ -165,7 +165,7 @@ int be_visitor_array_ch::visit_array (be_array *node) '\0', 2); - if (this->ctx_->tdef () != 0) + if (this->ctx_->tdef () != nullptr) { anon_p[0] = '\0'; } @@ -193,7 +193,7 @@ int be_visitor_array_ch::visit_array (be_array *node) << " {};" << be_nl; // No _var or _out class for an anonymous (non-typedef'd) array. - if (td != 0) + if (td != nullptr) { // Generate _var class decl. // An _out decl is generated only for a variable size array. @@ -270,7 +270,7 @@ int be_visitor_array_ch::visit_array (be_array *node) storage_class = storage_class + " "; } - if (td != 0) + if (td != nullptr) { // Typedefed array. *os << storage_class.c_str() << node->nested_type_name (scope, "_slice") diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp index a57454afa0f..724626e31a2 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp @@ -61,7 +61,7 @@ int be_visitor_array_ci::visit_array (be_array *node) // If the array is an anonymous member and if its element type // is a declaration (not a reference), we must generate code for // the declaration. - if (this->ctx_->alias () == 0 // Not a typedef. + if (this->ctx_->alias () == nullptr // Not a typedef. && bt->is_child (this->ctx_->scope ()->decl ())) { int status = 0; @@ -220,7 +220,7 @@ int be_visitor_array_ci::visit_array (be_array *node) << "{" << be_idt_nl; ACE_CDR::ULong ndims = node->n_dims (); - be_array *primitive_type = 0; + be_array *primitive_type = nullptr; if (bt->node_type () == AST_Decl::NT_typedef) { @@ -249,7 +249,7 @@ int be_visitor_array_ci::visit_array (be_array *node) // Retrieve the ith dimension value. AST_Expression *expr = node->dims ()[i]; - if ((expr == 0) || ((expr != 0) && (expr->ev () == 0))) + if ((expr == nullptr) || ((expr != nullptr) && (expr->ev () == nullptr))) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_array_cs::" diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp index 310c641cb70..34ccc617a61 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp @@ -164,7 +164,7 @@ int be_visitor_array_cs::visit_array (be_array *node) // Retrieve the ith dimension value. AST_Expression *expr = node->dims ()[i]; - if ((expr == 0) || ((expr != 0) && (expr->ev () == 0))) + if ((expr == nullptr) || ((expr != nullptr) && (expr->ev () == nullptr))) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_array_cs::" @@ -192,7 +192,7 @@ int be_visitor_array_cs::visit_array (be_array *node) // Now generate code such that every element of the array gets assigned // inside the innermost level of the nested loops generated above. - be_array *primitive_type = 0; + be_array *primitive_type = nullptr; if (bt->node_type () == AST_Decl::NT_typedef) { @@ -213,7 +213,7 @@ int be_visitor_array_cs::visit_array (be_array *node) primitive_type = dynamic_cast<be_array*> (tmp); } - if (primitive_type != 0) + if (primitive_type != nullptr) { // The base type is a typedef to another array type, so // we use the base type's copy method. @@ -297,7 +297,7 @@ int be_visitor_array_cs::visit_array (be_array *node) // If the member's element type // is a declaration (not a reference), we must generate code for // the declaration. - if (this->ctx_->alias () == 0 // Not a typedef. + if (this->ctx_->alias () == nullptr // Not a typedef. && bt->is_child (this->ctx_->scope ()->decl ())) { int status = 0; diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp index 2f57e164eee..c0095d458df 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp @@ -55,7 +55,7 @@ be_visitor_array_cdr_op_ch::visit_array (be_array *node) // If the array is an anonymous member and if its element type // is a declaration (not a reference), we must generate code for // the declaration. - if (this->ctx_->alias () == 0 && // Not a typedef. + if (this->ctx_->alias () == nullptr && // Not a typedef. bt->is_child (this->ctx_->scope ()->decl ())) { int status = 0; @@ -105,7 +105,7 @@ be_visitor_array_cdr_op_ch::visit_array (be_array *node) be_typedef *td = this->ctx_->tdef (); ACE_CString arg_name (ACE_CString (parent->full_name ()) + "::" - + (td == 0 ? "_" : "") + + (td == nullptr ? "_" : "") + node->local_name ()->get_string () + "_forany &_tao_array"); diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp index 9fb7f847b38..5ee8fc0b448 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp @@ -74,7 +74,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) // If the array is an anonymous member and if its element type // is a declaration (not a reference), we must generate code for // the declaration. - if (this->ctx_->alias () == 0 // Not a typedef. + if (this->ctx_->alias () == nullptr // Not a typedef. && bt->is_child (this->ctx_->scope ()->decl ())) { int status = 0; @@ -124,7 +124,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) '\0', NAMEBUFSIZE); - bool use_underscore = (this->ctx_->tdef () == 0); + bool use_underscore = (this->ctx_->tdef () == nullptr); if (!use_underscore) { @@ -288,7 +288,7 @@ be_visitor_array_cdr_op_cs::visit_predefined_type ( be_array *array = dynamic_cast<be_array*> (this->ctx_->node ()); - if (array == 0) + if (array == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_array_cdr_op_cs::" @@ -465,7 +465,7 @@ be_visitor_array_cdr_op_cs::visit_predefined_type ( // Retrieve the ith dimension value. AST_Expression *expr = array->dims ()[i]; - if ((expr == 0) || ((expr != 0) && (expr->ev () == 0))) + if ((expr == nullptr) || ((expr != nullptr) && (expr->ev () == nullptr))) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_array_cdr_op_cs::" @@ -542,7 +542,7 @@ be_visitor_array_cdr_op_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -556,7 +556,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) dynamic_cast<be_array*> (this->ctx_->node ()); AST_Decl::NodeType nt = bt->node_type (); - if (node == 0) + if (node == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_array_cdr_op_cs::" @@ -580,7 +580,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) // Retrieve the ith dimension value. AST_Expression *expr = node->dims ()[i]; - if ((expr == 0) || ((expr != 0) && (expr->ev () == 0))) + if ((expr == nullptr) || ((expr != nullptr) && (expr->ev () == nullptr))) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_array_cdr_op_cs::" @@ -633,7 +633,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) } else { - be_string *str = 0; + be_string *str = nullptr; if (bt->node_type () == AST_Decl::NT_string || bt->node_type () == AST_Decl::NT_wstring) { @@ -649,7 +649,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) } *os << "_tao_marshal_flag = (strm >> "; - if (str != 0 && str->max_size ()->ev ()->u.ulval != 0) + if (str != nullptr && str->max_size ()->ev ()->u.ulval != 0) { if (str->width () == (long) sizeof (char)) { @@ -760,7 +760,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) } else { - be_string *str = 0; + be_string *str = nullptr; if (bt->node_type () == AST_Decl::NT_string || bt->node_type () == AST_Decl::NT_wstring) { @@ -776,7 +776,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) } *os << "_tao_marshal_flag = (strm << "; - if (str != 0 && str->max_size ()->ev ()->u.ulval != 0) + if (str != nullptr && str->max_size ()->ev ()->u.ulval != 0) { if (str->width () == (long) sizeof (char)) { diff --git a/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp b/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp index 692367b1245..f348ac69cea 100644 --- a/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp @@ -18,7 +18,7 @@ be_visitor_attr_assign::be_visitor_attr_assign ( be_visitor_context *ctx) : be_visitor_decl (ctx), - attr_name_ (0), + attr_name_ (nullptr), attr_name_string_ ("this->") { } @@ -110,7 +110,7 @@ be_visitor_attr_assign::visit_sequence (be_sequence *) { be_type *bt = this->ctx_->alias (); - if (bt == 0) + if (bt == nullptr) { /// Support anonymous types? return -1; @@ -167,7 +167,7 @@ be_visitor_attr_assign::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_attr_return.cpp b/TAO/TAO_IDL/be/be_visitor_attr_return.cpp index 4ff0e93139e..3188dc0ac90 100644 --- a/TAO/TAO_IDL/be/be_visitor_attr_return.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attr_return.cpp @@ -146,7 +146,7 @@ be_visitor_attr_return::visit_sequence (be_sequence *) { be_type *bt = this->ctx_->alias (); - if (bt == 0) + if (bt == nullptr) { /// Support anonymous types? return -1; @@ -222,7 +222,7 @@ be_visitor_attr_return::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_attr_setarg_type.cpp b/TAO/TAO_IDL/be/be_visitor_attr_setarg_type.cpp index 6dc5900e433..ef3fe9132b3 100644 --- a/TAO/TAO_IDL/be/be_visitor_attr_setarg_type.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attr_setarg_type.cpp @@ -30,7 +30,7 @@ be_visitor_attr_setarg_type::visit_array (be_array *) { be_type *bt = this->ctx_->alias (); - if (bt == 0) + if (bt == nullptr) { /// Support anonymous types? return -1; @@ -107,7 +107,7 @@ be_visitor_attr_setarg_type::visit_sequence (be_sequence *) { be_type *bt = this->ctx_->alias (); - if (bt == 0) + if (bt == nullptr) { /// Support anonymous types? return -1; @@ -156,7 +156,7 @@ be_visitor_attr_setarg_type::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp index 77337f29a73..3e9f53f2540 100644 --- a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp @@ -40,7 +40,7 @@ be_visitor_attribute::be_visitor_attribute (be_visitor_context *ctx) : be_visitor_decl (ctx), for_facets_ (false), - op_scope_ (0), + op_scope_ (nullptr), exec_class_extension_ ("_exec_i") { } @@ -59,14 +59,14 @@ be_visitor_attribute::visit_attribute (be_attribute *node) AST_Decl *d = ScopeAsDecl (s); ACE_CString op_name (this->ctx_->port_prefix ()); op_name += node->local_name ()->get_string (); - Identifier *op_id = 0; + Identifier *op_id = nullptr; ACE_NEW_RETURN (op_id, Identifier (op_name.c_str ()), -1); - UTL_ScopedName *op_ln = 0; + UTL_ScopedName *op_ln = nullptr; ACE_NEW_RETURN (op_ln, - UTL_ScopedName (op_id, 0), + UTL_ScopedName (op_id, nullptr), -1); UTL_ScopedName *op_sn = @@ -76,7 +76,7 @@ be_visitor_attribute::visit_attribute (be_attribute *node) // first the "get" operation be_operation get_op (node->field_type (), AST_Operation::OP_noflags, - 0, + nullptr, node->is_local (), node->is_abstract ()); @@ -84,7 +84,7 @@ be_visitor_attribute::visit_attribute (be_attribute *node) get_op.set_name (op_sn); UTL_ExceptList *get_exceptions = node->get_get_exceptions (); - if (0 != get_exceptions) + if (nullptr != get_exceptions) { get_op.be_add_exceptions (get_exceptions->copy ()); } @@ -229,7 +229,7 @@ be_visitor_attribute::visit_attribute (be_attribute *node) // Create the set method. Identifier id ("void"); UTL_ScopedName sn (&id, - 0); + nullptr); // The return type is "void". be_predefined_type rt (AST_PredefinedType::PT_void, @@ -246,7 +246,7 @@ be_visitor_attribute::visit_attribute (be_attribute *node) // Create the operation. be_operation set_op (&rt, AST_Operation::OP_noflags, - 0, + nullptr, node->is_local (), node->is_abstract ()); set_op.set_defined_in (node->defined_in ()); @@ -255,7 +255,7 @@ be_visitor_attribute::visit_attribute (be_attribute *node) UTL_ExceptList *set_exceptions = node->get_set_exceptions (); - if (0 != set_exceptions) + if (nullptr != set_exceptions) { set_op.be_add_exceptions (set_exceptions->copy ()); } diff --git a/TAO/TAO_IDL/be/be_visitor_attribute/ccm_init.cpp b/TAO/TAO_IDL/be/be_visitor_attribute/ccm_init.cpp index 0c37a02e21a..8c23987cac9 100644 --- a/TAO/TAO_IDL/be/be_visitor_attribute/ccm_init.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attribute/ccm_init.cpp @@ -15,7 +15,7 @@ be_visitor_attribute_ccm_init::be_visitor_attribute_ccm_init ( be_visitor_context *ctx) : be_visitor_any_extracted_type_decl (ctx), - attr_ (0) + attr_ (nullptr) { } @@ -35,7 +35,7 @@ be_visitor_attribute_ccm_init::visit_attribute ( be_interface *intf = this->ctx_->interface (); - if (intf != 0) + if (intf != nullptr) { AST_Decl::NodeType snt = intf->node_type (); AST_Decl::NodeType ant = diff --git a/TAO/TAO_IDL/be/be_visitor_ccm_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_ccm_pre_proc.cpp index 87bdac3da60..4f8c7e572f6 100644 --- a/TAO/TAO_IDL/be/be_visitor_ccm_pre_proc.cpp +++ b/TAO/TAO_IDL/be/be_visitor_ccm_pre_proc.cpp @@ -74,19 +74,19 @@ be_visitor_ccm_pre_proc::be_visitor_ccm_pre_proc ( be_visitor_context *ctx) : be_visitor_component_scope (ctx), module_id_ ("Components"), - cookie_ (0), - already_connected_ (0), - invalid_connection_ (0), - no_connection_ (0), - exceeded_connection_limit_ (0), - create_failure_ (0), - remove_failure_ (0), - finder_failure_ (0), - invalid_key_ (0), - unknown_key_value_ (0), - duplicate_key_value_ (0), - comp_ (0), - home_ (0), + cookie_ (nullptr), + already_connected_ (nullptr), + invalid_connection_ (nullptr), + no_connection_ (nullptr), + exceeded_connection_limit_ (nullptr), + create_failure_ (nullptr), + remove_failure_ (nullptr), + finder_failure_ (nullptr), + invalid_key_ (nullptr), + unknown_key_value_ (nullptr), + duplicate_key_value_ (nullptr), + comp_ (nullptr), + home_ (nullptr), ccm_lookups_done_ (false) { } @@ -212,16 +212,16 @@ be_visitor_ccm_pre_proc::visit_provides (be_provides *node) ACE_CString prefix ("provide_"); prefix += this->ctx_->port_prefix (); - AST_Operation *provides_op = 0; + AST_Operation *provides_op = nullptr; UTL_ScopedName *op_name = this->create_scoped_name (prefix.c_str (), node->local_name ()->get_string (), - 0, + nullptr, comp_); ACE_NEW_RETURN (provides_op, be_operation (node->provides_type (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -230,7 +230,7 @@ be_visitor_ccm_pre_proc::visit_provides (be_provides *node) provides_op->set_imported (comp_->imported ()); provides_op->set_name (op_name); - if (0 == comp_->be_add_operation (provides_op)) + if (nullptr == comp_->be_add_operation (provides_op)) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -390,7 +390,7 @@ be_visitor_ccm_pre_proc::visit_home (be_home *node) { AST_Interface *xplicit = this->create_explicit (node); - if (xplicit == 0) + if (xplicit == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -401,7 +401,7 @@ be_visitor_ccm_pre_proc::visit_home (be_home *node) AST_Interface *implicit = this->create_implicit (node); - if (implicit == 0) + if (implicit == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -420,7 +420,7 @@ be_visitor_ccm_pre_proc::visit_home (be_home *node) -1); } - if (this->create_equivalent (node, xplicit, implicit) == 0) + if (this->create_equivalent (node, xplicit, implicit) == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -480,7 +480,7 @@ be_visitor_ccm_pre_proc::gen_implicit_ops (be_home *node, AST_Type *pk = node->primary_key (); - if (pk == 0) + if (pk == nullptr) { return 0; } @@ -534,13 +534,13 @@ be_visitor_ccm_pre_proc::gen_connect_single (be_uses *node) UTL_ScopedName *op_full_name = this->create_scoped_name (prefix.c_str (), node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (be_global->void_type (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -549,8 +549,8 @@ be_visitor_ccm_pre_proc::gen_connect_single (be_uses *node) op->set_name (op_full_name); Identifier arg_id ("conxn"); UTL_ScopedName arg_name (&arg_id, - 0); - be_argument *arg = 0; + nullptr); + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node->uses_type (), @@ -559,19 +559,19 @@ be_visitor_ccm_pre_proc::gen_connect_single (be_uses *node) arg_id.destroy (); op->be_add_argument (arg); - UTL_ExceptList *tail = 0; + UTL_ExceptList *tail = nullptr; ACE_NEW_RETURN (tail, UTL_ExceptList (this->invalid_connection_, - 0), + nullptr), -1); - UTL_ExceptList *connect_single = 0; + UTL_ExceptList *connect_single = nullptr; ACE_NEW_RETURN (connect_single, UTL_ExceptList (this->already_connected_, tail), -1); op->be_add_exceptions (connect_single); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -590,27 +590,27 @@ be_visitor_ccm_pre_proc::gen_disconnect_single (be_uses *node) UTL_ScopedName *op_full_name = this->create_scoped_name (prefix.c_str (), node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (node->uses_type (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); op->set_name (op_full_name); op->set_defined_in (comp_); op->set_imported (comp_->imported ()); - UTL_ExceptList *disconnect_single = 0; + UTL_ExceptList *disconnect_single = nullptr; ACE_NEW_RETURN (disconnect_single, UTL_ExceptList (this->no_connection_, - 0), + nullptr), -1); op->be_add_exceptions (disconnect_single); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -629,13 +629,13 @@ be_visitor_ccm_pre_proc::gen_get_connection_single (be_uses *node) UTL_ScopedName *op_full_name = this->create_scoped_name (prefix.c_str (), node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (node->uses_type (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -643,7 +643,7 @@ be_visitor_ccm_pre_proc::gen_get_connection_single (be_uses *node) op->set_defined_in (comp_); op->set_imported (comp_->imported ()); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -662,14 +662,14 @@ be_visitor_ccm_pre_proc::gen_connect_multiple (be_uses *node) UTL_ScopedName *op_full_name = this->create_scoped_name (prefix.c_str (), node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (this->cookie_, AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -678,8 +678,8 @@ be_visitor_ccm_pre_proc::gen_connect_multiple (be_uses *node) op->set_imported (comp_->imported ()); Identifier arg_id ("connection"); UTL_ScopedName arg_name (&arg_id, - 0); - be_argument *arg = 0; + nullptr); + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node->uses_type (), @@ -687,19 +687,19 @@ be_visitor_ccm_pre_proc::gen_connect_multiple (be_uses *node) -1); arg_id.destroy (); op->be_add_argument (arg); - UTL_ExceptList *tail = 0; + UTL_ExceptList *tail = nullptr; ACE_NEW_RETURN (tail, UTL_ExceptList (this->invalid_connection_, - 0), + nullptr), -1); - UTL_ExceptList *connect_multiple = 0; + UTL_ExceptList *connect_multiple = nullptr; ACE_NEW_RETURN (connect_multiple, UTL_ExceptList (this->exceeded_connection_limit_, tail), -1); op->be_add_exceptions (connect_multiple); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -718,13 +718,13 @@ be_visitor_ccm_pre_proc::gen_disconnect_multiple (be_uses *node) UTL_ScopedName *op_full_name = this->create_scoped_name (prefix.c_str (), node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (node->uses_type (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -733,8 +733,8 @@ be_visitor_ccm_pre_proc::gen_disconnect_multiple (be_uses *node) op->set_imported (comp_->imported ()); Identifier arg_id ("ck"); UTL_ScopedName arg_name (&arg_id, - 0); - be_argument *arg = 0; + nullptr); + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, this->cookie_, @@ -742,14 +742,14 @@ be_visitor_ccm_pre_proc::gen_disconnect_multiple (be_uses *node) -1); arg_id.destroy (); op->be_add_argument (arg); - UTL_ExceptList *disconnect_multiple = 0; + UTL_ExceptList *disconnect_multiple = nullptr; ACE_NEW_RETURN (disconnect_multiple, UTL_ExceptList (this->invalid_connection_, - 0), + nullptr), -1); op->be_add_exceptions (disconnect_multiple); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -768,7 +768,7 @@ be_visitor_ccm_pre_proc::gen_get_connection_multiple (be_uses *node) UTL_ScopedName *op_full_name = this->create_scoped_name (prefix.c_str (), node->local_name ()->get_string (), - 0, + nullptr, comp_); // Look up the implied IDL typedef created in the front end. @@ -780,17 +780,17 @@ be_visitor_ccm_pre_proc::gen_get_connection_multiple (be_uses *node) connections_string += "Connections"; Identifier connections_id (connections_string.c_str ()); UTL_ScopedName connections_name (&connections_id, - 0); + nullptr); AST_Decl *d = comp_->lookup_by_name (&connections_name, true); be_typedef *td = dynamic_cast<be_typedef*> (d); connections_id.destroy (); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (td, AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -798,7 +798,7 @@ be_visitor_ccm_pre_proc::gen_get_connection_multiple (be_uses *node) op->set_defined_in (comp_); op->set_imported (comp_->imported ()); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -815,13 +815,13 @@ be_visitor_ccm_pre_proc::gen_push_op (be_eventtype *node, UTL_ScopedName *op_full_name = this->create_scoped_name ("push_", node->local_name (), - 0, + nullptr, consumer); - be_operation *push_op = 0; + be_operation *push_op = nullptr; ACE_NEW_RETURN (push_op, be_operation (be_global->void_type (), AST_Operation::OP_noflags, - 0, + nullptr, false, false), -1); @@ -829,13 +829,13 @@ be_visitor_ccm_pre_proc::gen_push_op (be_eventtype *node, push_op->set_imported (node->imported ()); push_op->set_name (op_full_name); ACE_CString arg_string ("the_", - 0, + nullptr, false); arg_string += node->local_name (); Identifier arg_id (arg_string.fast_rep ()); UTL_ScopedName arg_name (&arg_id, - 0); - be_argument *arg = 0; + nullptr); + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node, @@ -844,7 +844,7 @@ be_visitor_ccm_pre_proc::gen_push_op (be_eventtype *node, arg_id.destroy (); push_op->be_add_argument (arg); - if (0 == consumer->be_add_operation (push_op)) + if (nullptr == consumer->be_add_operation (push_op)) { return -1; } @@ -863,13 +863,13 @@ be_visitor_ccm_pre_proc::gen_subscribe (be_publishes *node) UTL_ScopedName *op_name = this->create_scoped_name ("subscribe_", node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (this->cookie_, AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -879,11 +879,11 @@ be_visitor_ccm_pre_proc::gen_subscribe (be_publishes *node) AST_Interface *i = this->lookup_consumer (node); - if (i == 0) + if (i == nullptr) { op->destroy (); delete op; - op = 0; + op = nullptr; ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -894,22 +894,22 @@ be_visitor_ccm_pre_proc::gen_subscribe (be_publishes *node) Identifier arg_id ("consumer"); UTL_ScopedName arg_name (&arg_id, - 0); - be_argument *arg = 0; + nullptr); + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, i, &arg_name), -1); op->be_add_argument (arg); - UTL_ExceptList *subscribe = 0; + UTL_ExceptList *subscribe = nullptr; ACE_NEW_RETURN (subscribe, UTL_ExceptList (this->exceeded_connection_limit_, - 0), + nullptr), -1); op->be_add_exceptions (subscribe); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -927,7 +927,7 @@ be_visitor_ccm_pre_proc::gen_unsubscribe (be_publishes *node) AST_Interface *i = this->lookup_consumer (node); - if (i == 0) + if (i == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -939,13 +939,13 @@ be_visitor_ccm_pre_proc::gen_unsubscribe (be_publishes *node) UTL_ScopedName *op_name = this->create_scoped_name ("unsubscribe_", node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (i, AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -954,22 +954,22 @@ be_visitor_ccm_pre_proc::gen_unsubscribe (be_publishes *node) op->set_name (op_name); Identifier arg_id ("ck"); UTL_ScopedName arg_name (&arg_id, - 0); - be_argument *arg = 0; + nullptr); + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, this->cookie_, &arg_name), -1); op->be_add_argument (arg); - UTL_ExceptList *unsubscribe = 0; + UTL_ExceptList *unsubscribe = nullptr; ACE_NEW_RETURN (unsubscribe, UTL_ExceptList (this->invalid_connection_, - 0), + nullptr), -1); op->be_add_exceptions (unsubscribe); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -988,13 +988,13 @@ be_visitor_ccm_pre_proc::gen_emits_connect (be_emits *node) UTL_ScopedName *op_name = this->create_scoped_name ("connect_", node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (be_global->void_type (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -1003,11 +1003,11 @@ be_visitor_ccm_pre_proc::gen_emits_connect (be_emits *node) op->set_imported (comp_->imported ()); AST_Interface *i = this->lookup_consumer (node); - if (i == 0) + if (i == nullptr) { op->destroy (); delete op; - op = 0; + op = nullptr; ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -1018,22 +1018,22 @@ be_visitor_ccm_pre_proc::gen_emits_connect (be_emits *node) Identifier arg_id ("consumer"); UTL_ScopedName arg_name (&arg_id, - 0); - be_argument *arg = 0; + nullptr); + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, i, &arg_name), -1); op->be_add_argument (arg); - UTL_ExceptList *emits_connect = 0; + UTL_ExceptList *emits_connect = nullptr; ACE_NEW_RETURN (emits_connect, UTL_ExceptList (this->already_connected_, - 0), + nullptr), -1); op->be_add_exceptions (emits_connect); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -1051,7 +1051,7 @@ be_visitor_ccm_pre_proc::gen_emits_disconnect (be_emits *node) AST_Interface *i = this->lookup_consumer (node); - if (i == 0) + if (i == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -1063,27 +1063,27 @@ be_visitor_ccm_pre_proc::gen_emits_disconnect (be_emits *node) UTL_ScopedName *op_name = this->create_scoped_name ("disconnect_", node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (i, AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); op->set_name (op_name); op->set_defined_in (comp_); op->set_imported (comp_->imported ()); - UTL_ExceptList *emits_disconnect = 0; + UTL_ExceptList *emits_disconnect = nullptr; ACE_NEW_RETURN (emits_disconnect, UTL_ExceptList (this->no_connection_, - 0), + nullptr), -1); op->be_add_exceptions (emits_disconnect); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -1101,7 +1101,7 @@ be_visitor_ccm_pre_proc::gen_get_consumer (be_consumes *node) AST_Interface *i = this->lookup_consumer (node); - if (i == 0) + if (i == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc::") @@ -1113,13 +1113,13 @@ be_visitor_ccm_pre_proc::gen_get_consumer (be_consumes *node) UTL_ScopedName *op_name = this->create_scoped_name ("get_consumer_", node->local_name ()->get_string (), - 0, + nullptr, comp_); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (i, AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -1127,7 +1127,7 @@ be_visitor_ccm_pre_proc::gen_get_consumer (be_consumes *node) op->set_defined_in (comp_); op->set_imported (comp_->imported ()); - if (0 == comp_->be_add_operation (op)) + if (nullptr == comp_->be_add_operation (op)) { return -1; } @@ -1139,32 +1139,32 @@ int be_visitor_ccm_pre_proc::gen_create (be_home *node, AST_Interface *implicit) { - UTL_ScopedName *op_name = this->create_scoped_name (0, + UTL_ScopedName *op_name = this->create_scoped_name (nullptr, "create", - 0, + nullptr, implicit); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (node->managed_component (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); op->set_name (op_name); AST_Type *pk = node->primary_key (); - UTL_ExceptList *exceps = 0; + UTL_ExceptList *exceps = nullptr; ACE_NEW_RETURN (exceps, UTL_ExceptList (this->create_failure_, - 0), + nullptr), -1); - if (pk != 0 && !be_global->gen_lwccm ()) + if (pk != nullptr && !be_global->gen_lwccm ()) { Identifier arg_id ("key"); UTL_ScopedName arg_name (&arg_id, - 0); - AST_Argument *arg = 0; + nullptr); + AST_Argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, pk, @@ -1173,12 +1173,12 @@ be_visitor_ccm_pre_proc::gen_create (be_home *node, arg_id.destroy (); op->be_add_argument (arg); - UTL_ExceptList *tail = 0; + UTL_ExceptList *tail = nullptr; ACE_NEW_RETURN (tail, UTL_ExceptList (this->invalid_key_, - 0), + nullptr), -1); - UTL_ExceptList *middle = 0; + UTL_ExceptList *middle = nullptr; ACE_NEW_RETURN (middle, UTL_ExceptList (this->duplicate_key_value_, tail), @@ -1190,7 +1190,7 @@ be_visitor_ccm_pre_proc::gen_create (be_home *node, op->set_defined_in (implicit); op->set_imported (node->imported ()); - if (0 == implicit->be_add_operation (op)) + if (nullptr == implicit->be_add_operation (op)) { return -1; } @@ -1202,15 +1202,15 @@ int be_visitor_ccm_pre_proc::gen_find_by_primary_key (be_home *node, AST_Interface *implicit) { - UTL_ScopedName *op_name = this->create_scoped_name (0, + UTL_ScopedName *op_name = this->create_scoped_name (nullptr, "find_by_primary_key", - 0, + nullptr, implicit); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (node->managed_component (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -1218,8 +1218,8 @@ be_visitor_ccm_pre_proc::gen_find_by_primary_key (be_home *node, AST_Type *pk = node->primary_key (); Identifier arg_id ("key"); UTL_ScopedName arg_name (&arg_id, - 0); - AST_Argument *arg = 0; + nullptr); + AST_Argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, pk, @@ -1228,14 +1228,14 @@ be_visitor_ccm_pre_proc::gen_find_by_primary_key (be_home *node, arg_id.destroy (); op->be_add_argument (arg); - UTL_ExceptList *tail = 0; - UTL_ExceptList *middle = 0; + UTL_ExceptList *tail = nullptr; + UTL_ExceptList *middle = nullptr; if (!be_global->gen_lwccm ()) { ACE_NEW_RETURN (tail, UTL_ExceptList (this->invalid_key_, - 0), + nullptr), -1); ACE_NEW_RETURN (middle, UTL_ExceptList (this->unknown_key_value_, @@ -1243,7 +1243,7 @@ be_visitor_ccm_pre_proc::gen_find_by_primary_key (be_home *node, -1); } - UTL_ExceptList *exceps = 0; + UTL_ExceptList *exceps = nullptr; ACE_NEW_RETURN (exceps, UTL_ExceptList (this->finder_failure_, middle), @@ -1252,7 +1252,7 @@ be_visitor_ccm_pre_proc::gen_find_by_primary_key (be_home *node, op->set_defined_in (implicit); op->set_imported (node->imported ()); - if (0 == implicit->be_add_operation (op)) + if (nullptr == implicit->be_add_operation (op)) { return -1; } @@ -1264,15 +1264,15 @@ int be_visitor_ccm_pre_proc::gen_remove (be_home *node, AST_Interface *implicit) { - UTL_ScopedName *op_name = this->create_scoped_name (0, + UTL_ScopedName *op_name = this->create_scoped_name (nullptr, "remove", - 0, + nullptr, implicit); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (be_global->void_type (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); @@ -1280,8 +1280,8 @@ be_visitor_ccm_pre_proc::gen_remove (be_home *node, AST_Type *pk = node->primary_key (); Identifier arg_id ("key"); UTL_ScopedName arg_name (&arg_id, - 0); - AST_Argument *arg = 0; + nullptr); + AST_Argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, pk, @@ -1290,14 +1290,14 @@ be_visitor_ccm_pre_proc::gen_remove (be_home *node, arg_id.destroy (); op->be_add_argument (arg); - UTL_ExceptList *tail = 0; - UTL_ExceptList *middle = 0; + UTL_ExceptList *tail = nullptr; + UTL_ExceptList *middle = nullptr; if (!be_global->gen_lwccm ()) { ACE_NEW_RETURN (tail, UTL_ExceptList (this->invalid_key_, - 0), + nullptr), -1); ACE_NEW_RETURN (middle, UTL_ExceptList (this->unknown_key_value_, @@ -1305,7 +1305,7 @@ be_visitor_ccm_pre_proc::gen_remove (be_home *node, -1); } - UTL_ExceptList *exceps = 0; + UTL_ExceptList *exceps = nullptr; ACE_NEW_RETURN (exceps, UTL_ExceptList (this->remove_failure_, middle), @@ -1314,7 +1314,7 @@ be_visitor_ccm_pre_proc::gen_remove (be_home *node, op->set_defined_in (implicit); op->set_imported (node->imported ()); - if (0 == implicit->be_add_operation (op)) + if (nullptr == implicit->be_add_operation (op)) { return -1; } @@ -1326,23 +1326,23 @@ int be_visitor_ccm_pre_proc::gen_get_primary_key (be_home *node, AST_Interface *implicit) { - UTL_ScopedName *op_name = this->create_scoped_name (0, + UTL_ScopedName *op_name = this->create_scoped_name (nullptr, "get_primary_key", - 0, + nullptr, implicit); - be_operation *op = 0; + be_operation *op = nullptr; ACE_NEW_RETURN (op, be_operation (node->primary_key (), AST_Operation::OP_noflags, - 0, + nullptr, 0, 0), -1); op->set_name (op_name); Identifier arg_id ("comp"); UTL_ScopedName arg_name (&arg_id, - 0); - AST_Argument *arg = 0; + nullptr); + AST_Argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_IN, node->managed_component (), @@ -1353,7 +1353,7 @@ be_visitor_ccm_pre_proc::gen_get_primary_key (be_home *node, op->set_defined_in (implicit); op->set_imported (node->imported ()); - if (0 == implicit->be_add_operation (op)) + if (nullptr == implicit->be_add_operation (op)) { return -1; } @@ -1379,11 +1379,11 @@ be_visitor_ccm_pre_proc::gen_extended_port (be_porttype *pt) int be_visitor_ccm_pre_proc::lookup_cookie (void) { - if (this->cookie_ == 0) + if (this->cookie_ == nullptr) { Identifier local_id ("Cookie"); UTL_ScopedName local_name (&local_id, - 0); + nullptr); UTL_ScopedName cookie_name (&this->module_id_, &local_name); AST_Decl *d = @@ -1391,7 +1391,7 @@ be_visitor_ccm_pre_proc::lookup_cookie (void) true); local_id.destroy (); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (&cookie_name); return -1; @@ -1399,7 +1399,7 @@ be_visitor_ccm_pre_proc::lookup_cookie (void) this->cookie_ = dynamic_cast<be_valuetype*> (d); - if (this->cookie_ == 0) + if (this->cookie_ == nullptr) { idl_global->err ()->valuetype_expected (d); return -1; @@ -1460,7 +1460,7 @@ be_visitor_ccm_pre_proc::lookup_one_exception (const char *name, { Identifier id (name); UTL_ScopedName local_name (&id, - 0); + nullptr); UTL_ScopedName scoped_name (&this->module_id_, &local_name); AST_Decl *d = @@ -1468,7 +1468,7 @@ be_visitor_ccm_pre_proc::lookup_one_exception (const char *name, true); id.destroy (); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (&scoped_name); return -1; @@ -1476,7 +1476,7 @@ be_visitor_ccm_pre_proc::lookup_one_exception (const char *name, result = dynamic_cast<be_exception*> (d); - if (result == 0) + if (result == nullptr) { return -1; } @@ -1491,7 +1491,7 @@ be_visitor_ccm_pre_proc::create_event_consumer (be_eventtype *node) UTL_Scope *s = node->defined_in (); UTL_ScopedName *consumer_name = - this->create_scoped_name (0, + this->create_scoped_name (nullptr, node->local_name (), "Consumer", ScopeAsDecl (node->defined_in ())); @@ -1500,12 +1500,12 @@ be_visitor_ccm_pre_proc::create_event_consumer (be_eventtype *node) /// declared eventtypes. Since forward declarations can /// appear any number of times, we need to check that this /// event consumer hasn't already been created. - if (s->lookup_by_name (consumer_name, true) != 0) + if (s->lookup_by_name (consumer_name, true) != nullptr) { return 0; } - AST_Interface *event_consumer = 0; + AST_Interface *event_consumer = nullptr; AST_Module *m = dynamic_cast<AST_Module*> (s); // We're at global scope here so we need to fool the scope stack @@ -1515,11 +1515,11 @@ be_visitor_ccm_pre_proc::create_event_consumer (be_eventtype *node) Identifier parent_id ("EventConsumerBase"); UTL_ScopedName parent_local_name (&parent_id, - 0); + nullptr); UTL_ScopedName parent_full_name (&this->module_id_, &parent_local_name); UTL_NameList parent_list (&parent_full_name, - 0); + nullptr); FE_InterfaceHeader header (consumer_name, &parent_list, false, @@ -1551,7 +1551,7 @@ be_visitor_ccm_pre_proc::create_event_consumer (be_eventtype *node) // necessary in case the eventtype's prefix was modified after // its declaration. We assume 'implied IDL' means that the // derived event consumer interface should have the same prefix. - event_consumer->repoID (0); + event_consumer->repoID (nullptr); event_consumer->prefix (const_cast<char*> (node->prefix ())); dynamic_cast<be_type*> (event_consumer)->gen_fwd_helper_name (); @@ -1571,17 +1571,17 @@ be_visitor_ccm_pre_proc::lookup_consumer (be_field *node) impl->defined_in ()->lookup_by_name_local (&rettype_id, false); rettype_id.destroy (); - if (d == 0) + if (d == nullptr) { - return 0; + return nullptr; } AST_Interface *i = dynamic_cast<AST_Interface*> (d); - if (i == 0) + if (i == nullptr) { idl_global->err ()->interface_expected (d); - return 0; + return nullptr; } return i; @@ -1607,32 +1607,32 @@ be_visitor_ccm_pre_proc::create_explicit (be_home *node) AST_Interface * be_visitor_ccm_pre_proc::create_implicit (be_home *node) { - Identifier *parent_id = 0; + Identifier *parent_id = nullptr; ACE_NEW_RETURN (parent_id, Identifier ("KeylessCCMHome"), - 0); + nullptr); - UTL_ScopedName *parent_local_name = 0; + UTL_ScopedName *parent_local_name = nullptr; ACE_NEW_RETURN (parent_local_name, - UTL_ScopedName (parent_id, 0), - 0); + UTL_ScopedName (parent_id, nullptr), + nullptr); - UTL_ScopedName *parent_full_name = 0; + UTL_ScopedName *parent_full_name = nullptr; ACE_NEW_RETURN (parent_full_name, UTL_ScopedName (this->module_id_.copy (), parent_local_name), - 0); + nullptr); - UTL_NameList parent_list (parent_full_name, 0); + UTL_NameList parent_list (parent_full_name, nullptr); - UTL_NameList *parent_list_ptr = 0; + UTL_NameList *parent_list_ptr = nullptr; - if (node->primary_key () == 0) + if (node->primary_key () == nullptr) { parent_list_ptr = &parent_list; } - FE_InterfaceHeader header (0, + FE_InterfaceHeader header (nullptr, parent_list_ptr, false, false, @@ -1644,12 +1644,12 @@ be_visitor_ccm_pre_proc::create_implicit (be_home *node) idl_global->scopes ().push (node->defined_in ()); UTL_ScopedName *implicit_name = - this->create_scoped_name (0, + this->create_scoped_name (nullptr, node->local_name (), "Implicit", ScopeAsDecl (node->defined_in ())); - be_interface *i = 0; + be_interface *i = nullptr; ACE_NEW_RETURN (i, be_interface (implicit_name, header.inherits (), @@ -1658,7 +1658,7 @@ be_visitor_ccm_pre_proc::create_implicit (be_home *node) header.n_inherits_flat (), false, false), - 0); + nullptr); // Back to reality. idl_global->scopes ().pop (); @@ -1688,15 +1688,15 @@ be_visitor_ccm_pre_proc::create_equivalent (be_home *node, { UTL_Scope *s = node->defined_in (); UTL_ScopedName *equiv_name = - this->create_scoped_name (0, + this->create_scoped_name (nullptr, node->local_name (), - 0, + nullptr, ScopeAsDecl (s)); UTL_NameList tail (implicit->name (), - 0); + nullptr); UTL_NameList parent_list (xplicit->name (), &tail); - FE_InterfaceHeader header (0, + FE_InterfaceHeader header (nullptr, &parent_list, false, false, @@ -1707,7 +1707,7 @@ be_visitor_ccm_pre_proc::create_equivalent (be_home *node, // interface construction time. idl_global->scopes ().push (node->defined_in ()); - be_interface *retval = 0; + be_interface *retval = nullptr; ACE_NEW_RETURN (retval, be_interface (equiv_name, header.inherits (), @@ -1716,7 +1716,7 @@ be_visitor_ccm_pre_proc::create_equivalent (be_home *node, header.n_inherits_flat (), false, false), - 0); + nullptr); // Back to reality. idl_global->scopes ().pop (); @@ -1733,7 +1733,7 @@ be_visitor_ccm_pre_proc::create_equivalent (be_home *node, UTL_ScopedName *unmangled_name = static_cast<UTL_ScopedName *> (node->name ()->copy ()); UTL_ScopedName *mangled_name = - this->create_scoped_name (0, + this->create_scoped_name (nullptr, node->local_name (), "_tao_home_name_extension", ScopeAsDecl (s)); @@ -1755,19 +1755,19 @@ be_visitor_ccm_pre_proc::create_scoped_name (const char *prefix, AST_Decl *parent) { ACE_CString local_string (prefix, - 0, + nullptr, false); local_string += local_name; local_string += suffix; - Identifier *local_id = 0; + Identifier *local_id = nullptr; ACE_NEW_RETURN (local_id, Identifier (local_string.fast_rep ()), - 0); - UTL_ScopedName *last_segment = 0; + nullptr); + UTL_ScopedName *last_segment = nullptr; ACE_NEW_RETURN (last_segment, UTL_ScopedName (local_id, - 0), - 0); + nullptr), + nullptr); UTL_ScopedName *full_name = static_cast<UTL_ScopedName *> (parent->name ()->copy ()); full_name->nconc (last_segment); @@ -1777,28 +1777,28 @@ be_visitor_ccm_pre_proc::create_scoped_name (const char *prefix, UTL_NameList * be_visitor_ccm_pre_proc::compute_inheritance (be_home *node) { - UTL_NameList *retval = 0; + UTL_NameList *retval = nullptr; - if (node->base_home () == 0) + if (node->base_home () == nullptr) { - Identifier *local_id = 0; + Identifier *local_id = nullptr; ACE_NEW_RETURN (local_id, Identifier ("CCMHome"), - 0); - UTL_ScopedName *local_name = 0; + nullptr); + UTL_ScopedName *local_name = nullptr; ACE_NEW_RETURN (local_name, UTL_ScopedName (local_id, - 0), - 0); - UTL_ScopedName *full_name = 0; + nullptr), + nullptr); + UTL_ScopedName *full_name = nullptr; ACE_NEW_RETURN (full_name, UTL_ScopedName (this->module_id_.copy (), local_name), - 0); + nullptr); ACE_NEW_RETURN (retval, UTL_NameList (full_name, - 0), - 0); + nullptr), + nullptr); } else @@ -1812,13 +1812,13 @@ be_visitor_ccm_pre_proc::compute_inheritance (be_home *node) parent_name->last_component ()->replace_string (new_local.c_str ()); ACE_NEW_RETURN (retval, UTL_NameList (parent_name, - 0), - 0); + nullptr), + nullptr); } long n_supports = node->n_inherits (); - UTL_ScopedName *supported_name = 0; - UTL_NameList *conc_value = 0; + UTL_ScopedName *supported_name = nullptr; + UTL_NameList *conc_value = nullptr; for (long i = 0; i < n_supports; ++i) { @@ -1826,8 +1826,8 @@ be_visitor_ccm_pre_proc::compute_inheritance (be_home *node) static_cast<UTL_ScopedName *> (node->inherits ()[i]->name ()->copy ()); ACE_NEW_RETURN (conc_value, UTL_NameList (supported_name, - 0), - 0); + nullptr), + nullptr); retval->nconc (conc_value); } @@ -1857,7 +1857,7 @@ be_visitor_ccm_pre_proc::generate_ami4ccm_uses (void) ! i.done (); i.advance ()) { - char **item = 0; + char **item = nullptr; i.next (item); UTL_ScopedName *sn = @@ -1868,24 +1868,24 @@ be_visitor_ccm_pre_proc::generate_ami4ccm_uses (void) AST_Decl *d = s->lookup_by_name (sn, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (sn); sn->destroy (); delete sn; - sn = 0; + sn = nullptr; continue; } sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_uses *u = dynamic_cast<be_uses*> (d); - if (u == 0) + if (u == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_ccm_pre_proc") @@ -1906,21 +1906,21 @@ be_visitor_ccm_pre_proc::generate_ami4ccm_uses (void) be_interface *ami_iface = dynamic_cast<be_interface*> (iface->ami4ccm_uses ()); - if (ami_iface == 0) + if (ami_iface == nullptr) { ACE_CString iname ("AMI4CCM_"); iname += iface->local_name (); Identifier itmp_id (iname.c_str ()); - UTL_ScopedName itmp_sn (&itmp_id, 0); + UTL_ScopedName itmp_sn (&itmp_id, nullptr); s = iface->defined_in (); idl_global->scopes ().push (s); ACE_NEW_RETURN (ami_iface, be_interface (&itmp_sn, + nullptr, 0, - 0, - 0, + nullptr, 0, true, false), @@ -1945,11 +1945,11 @@ be_visitor_ccm_pre_proc::generate_ami4ccm_uses (void) ACE_CString uname ("sendc_"); uname += u->local_name ()->get_string (); Identifier utmp_id (uname.c_str ()); - UTL_ScopedName utmp_sn (&utmp_id, 0); + UTL_ScopedName utmp_sn (&utmp_id, nullptr); s = u->defined_in (); idl_global->scopes ().push (s); - be_uses *ami_uses = 0; + be_uses *ami_uses = nullptr; ACE_NEW_RETURN (ami_uses, be_uses (&utmp_sn, ami_iface, diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_ex_base.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_ex_base.cpp index 1c19733f9b8..cde1dfd929c 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_ex_base.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_ex_base.cpp @@ -15,8 +15,8 @@ be_visitor_component_ami_rh_ex_base::be_visitor_component_ami_rh_ex_base ( be_visitor_context *ctx) : be_visitor_scope (ctx), - iface_ (0), - port_ (0) + iface_ (nullptr), + port_ (nullptr) { } diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exh.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exh.cpp index ba504ea5f33..2053bcb7ada 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exh.cpp @@ -120,25 +120,25 @@ be_visitor_component_ami_rh_exh::visit_operation ( if (!vrt) { - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (id, Identifier ("ami_return_val"), -1); - UTL_ScopedName *tmp = 0; + UTL_ScopedName *tmp = nullptr; ACE_NEW_RETURN (tmp, UTL_ScopedName (id, - 0), + nullptr), -1); sn = (UTL_ScopedName *)node->name ()->copy (); sn->nconc (tmp); // Create the argument. - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_OUT, node->return_type (), diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp index 1618e44d94a..7c09e8db40b 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_ami_rh_exs.cpp @@ -121,25 +121,25 @@ be_visitor_component_ami_rh_exs::visit_operation ( if (!vrt) { - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (id, Identifier ("ami_return_val"), -1); - UTL_ScopedName *tmp = 0; + UTL_ScopedName *tmp = nullptr; ACE_NEW_RETURN (tmp, UTL_ScopedName (id, - 0), + nullptr), -1); sn = (UTL_ScopedName *)node->name ()->copy (); sn->nconc (tmp); // Create the argument. - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (AST_Argument::dir_OUT, node->return_type (), diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp index 981748a1c9c..f5276e2a3a7 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp @@ -73,7 +73,7 @@ be_visitor_component_exh::visit_component (be_component *node) ! i.done (); i.advance ()) { - char **item = 0; + char **item = nullptr; i.next (item); UTL_ScopedName *sn = @@ -84,24 +84,24 @@ be_visitor_component_exh::visit_component (be_component *node) AST_Decl *d = s->lookup_by_name (sn, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (sn); sn->destroy (); delete sn; - sn = 0; + sn = nullptr; continue; } sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_uses *u = dynamic_cast<be_uses*> (d); - if (u == 0) + if (u == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_component_exh") diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_exs.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_exs.cpp index c01a63cfe06..e97c6f33018 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_exs.cpp @@ -74,7 +74,7 @@ be_visitor_component_exs::visit_component (be_component *node) ! i.done (); i.advance ()) { - char **item = 0; + char **item = nullptr; i.next (item); UTL_ScopedName *sn = @@ -85,24 +85,24 @@ be_visitor_component_exs::visit_component (be_component *node) AST_Decl *d = s->lookup_by_name (sn, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (sn); sn->destroy (); delete sn; - sn = 0; + sn = nullptr; continue; } sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_uses *u = dynamic_cast<be_uses*> (d); - if (u == 0) + if (u == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_component_exs") diff --git a/TAO/TAO_IDL/be/be_visitor_component/context_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_component/context_ex_idl.cpp index 3a6be29fa1f..7d9f4fc1884 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/context_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/context_ex_idl.cpp @@ -36,7 +36,7 @@ be_visitor_context_ex_idl::visit_component (be_component *node) AST_Component *base = node->base_component (); - if (base == 0) + if (base == nullptr) { os_ << "::Components::" << be_global->ciao_container_type () << "Context"; diff --git a/TAO/TAO_IDL/be/be_visitor_component/executor_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_component/executor_ex_idl.cpp index 18701bbb2cb..92351e92038 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/executor_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/executor_ex_idl.cpp @@ -37,7 +37,7 @@ be_visitor_executor_ex_idl::visit_component ( << be_idt_nl << ": "; - if (base == 0) + if (base == nullptr) { os_ << "::Components::EnterpriseComponent"; } @@ -226,7 +226,7 @@ be_visitor_executor_ex_idl::gen_exception_list ( const char *prefix, bool closed) { - if (exceptions != 0 && exceptions->length () > 0) + if (exceptions != nullptr && exceptions->length () > 0) { os_ << be_idt_nl << prefix << "raises ( "; diff --git a/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp b/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp index 23525462dd7..22b717729f5 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp @@ -14,7 +14,7 @@ be_visitor_executor_exs::be_visitor_executor_exs ( be_visitor_context *ctx) : be_visitor_component_scope (ctx), - op_scope_ (0), + op_scope_ (nullptr), comment_start_border_ ("/**"), comment_end_border_ (" */"), your_code_here_ ("/* Your code here. */") diff --git a/TAO/TAO_IDL/be/be_visitor_component/facet_exs.cpp b/TAO/TAO_IDL/be/be_visitor_component/facet_exs.cpp index 5b1abe4c53b..6d2b32ccfe4 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/facet_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/facet_exs.cpp @@ -14,7 +14,7 @@ be_visitor_facet_exs::be_visitor_facet_exs ( be_visitor_context *ctx) : be_visitor_component_scope (ctx), - op_scope_ (0), + op_scope_ (nullptr), comment_start_border_ ("/**"), comment_end_border_ (" */") { diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp index eb710e03ba9..b0078cfcab7 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp @@ -291,7 +291,7 @@ be_visitor_servant_svh::visit_consumes (be_consumes *node) ACE_CString holder (obj_name); ACE_CString::size_type pos = holder.rfind (':'); - const char *ev_lname = 0; + const char *ev_lname = nullptr; if (pos == ACE_CString::npos) { diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp index bf1420b8c4f..b9c9202f623 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp @@ -13,7 +13,7 @@ be_visitor_servant_svs::be_visitor_servant_svs (be_visitor_context *ctx) : be_visitor_component_scope (ctx), - op_scope_ (0) + op_scope_ (nullptr) { } @@ -1112,7 +1112,7 @@ be_visitor_attr_set::visit_attribute (be_attribute *node) int be_visitor_attr_set::visit_component_scope (be_component *node) { - if (node == 0) + if (node == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_component_scope.cpp b/TAO/TAO_IDL/be/be_visitor_component_scope.cpp index 2dd90e0b89f..b2f97c37c00 100644 --- a/TAO/TAO_IDL/be/be_visitor_component_scope.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component_scope.cpp @@ -26,7 +26,7 @@ be_visitor_component_scope::be_visitor_component_scope ( be_visitor_context *ctx) : be_visitor_scope (ctx), - node_ (0), + node_ (nullptr), os_ (*ctx->stream ()), export_macro_ (be_global->svnt_export_macro ()), in_ext_port_ (false) @@ -119,7 +119,7 @@ int be_visitor_component_scope::visit_component_scope ( be_component *node) { - if (node == 0) + if (node == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_ex_base.cpp b/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_ex_base.cpp index d51ec479dd2..1c2bd8c1cca 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_ex_base.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_ex_base.cpp @@ -26,10 +26,10 @@ be_visitor_connector_dds_ex_base::be_visitor_connector_dds_ex_base ( be_visitor_context *ctx) : be_visitor_component_scope (ctx), - t_inst_ (0), - t_ref_ (0), - t_params_ (0), - base_tname_ (0) + t_inst_ (nullptr), + t_ref_ (nullptr), + t_params_ (nullptr), + base_tname_ (nullptr) { } @@ -47,7 +47,7 @@ be_visitor_connector_dds_ex_base::begin (be_connector *node) AST_Connector *base = node; - while (this->t_args_.is_empty () && base != 0) + while (this->t_args_.is_empty () && base != nullptr) { this->process_template_args (base); base = base->base_connector (); @@ -78,7 +78,7 @@ be_visitor_connector_dds_ex_base::is_dds_type ( if (base) { - while (base->base_connector () != 0) + while (base->base_connector () != nullptr) { base = base->base_connector (); } @@ -89,11 +89,11 @@ be_visitor_connector_dds_ex_base::is_dds_type ( { AST_Structure *s = dynamic_cast<AST_Structure*> (d); - if (s == 0) + if (s == nullptr) { AST_Typedef *td = dynamic_cast<AST_Typedef*> (d); - if (td != 0) + if (td != nullptr) { s = dynamic_cast<AST_Structure*> (td->primitive_base_type ()); } @@ -126,13 +126,13 @@ be_visitor_connector_dds_ex_base::process_template_args ( /// We assume the connector comes from the instantiation /// of a template module, and the regular module it's /// defined in (at some level) will have a reference to it. - while (this->t_inst_ == 0 && m != 0) + while (this->t_inst_ == nullptr && m != nullptr) { this->t_inst_ = m->from_inst (); m = dynamic_cast<AST_Module*> (m->defined_in ()); } - if (this->t_inst_ == 0) + if (this->t_inst_ == nullptr) { /// Probably means we're trying the base connector /// of DDS_State or DDS_Event, in which case we @@ -154,7 +154,7 @@ be_visitor_connector_dds_ex_base::process_template_args ( /// We depend on the DDS datatype being the first template /// argument for now, this may change. - AST_Decl **datatype = 0; + AST_Decl **datatype = nullptr; int const status = this->t_args_.get (datatype, 0UL); if (status != 0) @@ -179,7 +179,7 @@ be_visitor_connector_dds_ex_base::match_template_args (void) /// only the args referenced in the alias (see FOR loop /// below). Otherwise, we just copy the containing template /// module instantiation's arg list. - if (this->t_ref_ == 0) + if (this->t_ref_ == nullptr) { this->t_args_ = *this->t_inst_->template_args (); return; @@ -197,12 +197,12 @@ be_visitor_connector_dds_ex_base::match_template_args (void) ! ci.done (); ci.advance (), ++slot) { - FE_Utils::T_Param_Info *t_param = 0; + FE_Utils::T_Param_Info *t_param = nullptr; ci.next (t_param); if (t_param->name_ == ref_name) { - AST_Decl **d = 0; + AST_Decl **d = nullptr; this->t_inst_->template_args ()->get (d, slot); this->t_args_.enqueue_tail (*d); break; diff --git a/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exh.cpp b/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exh.cpp index 2437fd24809..1feb98aa731 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exh.cpp @@ -58,7 +58,7 @@ be_visitor_connector_dds_exh::visit_connector (be_connector *node) !i.done (); i.advance ()) { - AST_Decl **item = 0; + AST_Decl **item = nullptr; i.next (item); AST_Decl *d = *item; @@ -87,7 +87,7 @@ be_visitor_connector_dds_exh::visit_connector (be_connector *node) !i.done (); i.advance (), ++slot) { - AST_Decl **item = 0; + AST_Decl **item = nullptr; i.next (item); AST_Decl *d = *item; @@ -103,7 +103,7 @@ be_visitor_connector_dds_exh::visit_connector (be_connector *node) bool needs_bool = false; bool is_fixed = false; - FE_Utils::T_Param_Info *param = 0; + FE_Utils::T_Param_Info *param = nullptr; if (this->t_params_->get (param, slot - 1) != 0) { @@ -175,7 +175,7 @@ be_visitor_connector_dds_exh::visit_connector (be_connector *node) !iter.done (); iter.advance ()) { - be_interface **item = 0; + be_interface **item = nullptr; iter.next (item); (*item)->dds_connector_traits_done (false); @@ -218,7 +218,7 @@ be_visitor_connector_dds_exh::visit_mirror_port ( !iter.done (); iter.advance ()) { - be_interface **item = 0; + be_interface **item = nullptr; iter.next (item); (*item)->dds_connector_traits_done (false); diff --git a/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exs.cpp b/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exs.cpp index 11f787f370f..4d951143a82 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/connector_dds_exs.cpp @@ -61,7 +61,7 @@ be_visitor_connector_dds_exs::visit_connector (be_connector *node) !i.done (); i.advance (), ++slot) { - AST_Decl **item = 0; + AST_Decl **item = nullptr; i.next (item); AST_Decl *d = *item; @@ -77,7 +77,7 @@ be_visitor_connector_dds_exs::visit_connector (be_connector *node) bool needs_bool = false; bool is_fixed = false; - FE_Utils::T_Param_Info *param = 0; + FE_Utils::T_Param_Info *param = nullptr; if (this->t_params_->get (param, slot - 1) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_connector/executor_ami_exs.cpp b/TAO/TAO_IDL/be/be_visitor_connector/executor_ami_exs.cpp index 6cc3e71c274..8d6cffd5063 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/executor_ami_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/executor_ami_exs.cpp @@ -51,7 +51,7 @@ be_visitor_executor_ami_exs::visit_connector (be_connector *node) AST_Decl *d = i.item (); AST_Provides *p = dynamic_cast<AST_Provides*> (d); - if (p != 0) + if (p != nullptr) { if (first) { diff --git a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp index 0651e27403d..15d97e0fda8 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp @@ -17,10 +17,10 @@ be_visitor_facet_ami_exh::be_visitor_facet_ami_exh ( be_visitor_context *ctx) : be_visitor_component_scope (ctx), - iface_ (0), - callback_iface_ (0), - scope_name_ (0), - iface_name_ (0), + iface_ (nullptr), + callback_iface_ (nullptr), + scope_name_ (nullptr), + iface_name_ (nullptr), sync_ (false) { // This is initialized in the base class to svnt_export_macro() @@ -103,7 +103,7 @@ be_visitor_facet_ami_exh::visit_attribute (be_attribute *node) return 0; } Identifier id ("void"); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); // Create the return type, which is "void" be_predefined_type rt (AST_PredefinedType::PT_void, &sn); @@ -208,12 +208,12 @@ be_visitor_facet_ami_exh::init (bool for_impl) AST_Decl *d = s->lookup_by_name (sn, true, false); this->callback_iface_ = dynamic_cast<be_interface*> (d); - if (this->callback_iface_ == 0) + if (this->callback_iface_ == nullptr) this->sync_ = true; sn->destroy (); delete sn; - sn = 0; + sn = nullptr; } int @@ -299,7 +299,7 @@ be_visitor_facet_ami_exh::gen_facet_executor_class (void) handler_str += "::"; handler_str += tmp; - if (ACE_OS::strstr (tmp.c_str(), "AMI4CCM") != 0) + if (ACE_OS::strstr (tmp.c_str(), "AMI4CCM") != nullptr) this->sync_ = false; else this->sync_ = true; @@ -312,7 +312,7 @@ be_visitor_facet_ami_exh::gen_facet_executor_class (void) sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_interface *sync_iface = dynamic_cast<be_interface*> (d); diff --git a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp index b7a17e47f4e..9ed9c136c91 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exs.cpp @@ -94,7 +94,7 @@ be_visitor_facet_ami_exs::visit_attribute (be_attribute *node) return 0; } Identifier id ("void"); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); // Create the return type, which is "void" be_predefined_type rt (AST_PredefinedType::PT_void, &sn); @@ -219,13 +219,13 @@ be_visitor_facet_ami_exs::init (void) sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_interface *callback_iface = dynamic_cast<be_interface*> (d); - if (callback_iface == 0) + if (callback_iface == nullptr) this->sync_ = true; else this->sync_ = false; @@ -291,7 +291,7 @@ be_visitor_facet_ami_exs::gen_reply_handler_class (void) sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_interface *callback_iface = @@ -360,7 +360,7 @@ be_visitor_facet_ami_exs::gen_facet_executor_class (void) sn->destroy (); delete sn; - sn = 0; + sn = nullptr; be_interface *sync_iface = dynamic_cast<be_interface*> (d); @@ -389,7 +389,7 @@ be_visitor_facet_ami_exs::gen_facet_executor_class (void) } - ACE_CString scope_str (scope_name, 0, false); + ACE_CString scope_str (scope_name, nullptr, false); const char *container_type = be_global->ciao_container_type (); @@ -539,7 +539,7 @@ be_visitor_facet_ami_exs::gen_facet_executor_op (be_operation *node) { // do not handle not sendc operations. - if (ACE_OS::strstr (node->local_name()->get_string (), "sendc_")== 0) + if (ACE_OS::strstr (node->local_name()->get_string (), "sendc_")== nullptr) return 0; os_ << be_nl_2 @@ -701,10 +701,10 @@ be_visitor_facet_ami_exs::gen_facet_executor_sync_op (be_operation *node) os_ << be_nl << "{" << be_idt_nl; - AST_PredefinedType *pdt = 0; + AST_PredefinedType *pdt = nullptr; pdt = dynamic_cast<AST_PredefinedType*> (bt); bool ret = true; - if ((pdt != 0) && (pdt->pt () == AST_PredefinedType::PT_void)) + if ((pdt != nullptr) && (pdt->pt () == AST_PredefinedType::PT_void)) ret =false; os_ << "::" << scope->full_name () << smart_scope diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp index 7f682732403..99ab89df866 100644 --- a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp @@ -43,7 +43,7 @@ be_visitor_constant_ch::visit_constant (be_constant *node) AST_Expression::ExprType etype = node->et (); AST_Decl::NodeType snt = node->defined_in ()->scope_node_type (); - if (tdef != 0) + if (tdef != nullptr) { nt = tdef->node_type (); be_typedef *td = dynamic_cast<be_typedef*> (tdef); diff --git a/TAO/TAO_IDL/be/be_visitor_context.cpp b/TAO/TAO_IDL/be/be_visitor_context.cpp index 358281ed669..0c428f4faff 100644 --- a/TAO/TAO_IDL/be/be_visitor_context.cpp +++ b/TAO/TAO_IDL/be/be_visitor_context.cpp @@ -17,15 +17,15 @@ be_visitor_context::be_visitor_context (void) : ast_visitor_context (), state_ (TAO_CodeGen::TAO_INITIAL), sub_state_ (TAO_CodeGen::TAO_SUB_STATE_UNKNOWN), - os_ (0), - scope_ (0), - node_ (0), - alias_ (0), - tdef_ (0), - attr_ (0), + os_ (nullptr), + scope_ (nullptr), + node_ (nullptr), + alias_ (nullptr), + tdef_ (nullptr), + attr_ (nullptr), exception_ (0), comma_ (0), - interface_ (0) + interface_ (nullptr) { } @@ -79,17 +79,17 @@ be_visitor_context::reset (void) { this->state_ = TAO_CodeGen::TAO_INITIAL; this->sub_state_ = TAO_CodeGen::TAO_SUB_STATE_UNKNOWN; - this->os_ = 0; - this->scope_ = 0; - this->node_ = 0; - this->alias_ = 0; - this->tdef_ = 0; - this->attr_ = 0; + this->os_ = nullptr; + this->scope_ = nullptr; + this->node_ = nullptr; + this->alias_ = nullptr; + this->tdef_ = nullptr; + this->attr_ = nullptr; this->exception_ = 0; this->comma_ = 0; - this->interface_ = 0; - this->template_args_ = 0; - this->template_params_ = 0; + this->interface_ = nullptr; + this->template_args_ = nullptr; + this->template_params_ = nullptr; this->port_prefix_ = ""; } diff --git a/TAO/TAO_IDL/be/be_visitor_dds_ts_idl.cpp b/TAO/TAO_IDL/be/be_visitor_dds_ts_idl.cpp index f7374989670..86723926996 100644 --- a/TAO/TAO_IDL/be/be_visitor_dds_ts_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_dds_ts_idl.cpp @@ -28,7 +28,7 @@ be_visitor_dds_ts_idl::be_visitor_dds_ts_idl ( be_visitor_context *ctx) : be_visitor_scope (ctx), - os_ptr_ (0) + os_ptr_ (nullptr) { } @@ -365,5 +365,5 @@ be_visitor_dds_ts_idl::fini_file (void) << "\n"; delete this->os_ptr_; - this->os_ptr_ = 0; + this->os_ptr_ = nullptr; } diff --git a/TAO/TAO_IDL/be/be_visitor_decl.cpp b/TAO/TAO_IDL/be/be_visitor_decl.cpp index 5d3b2f24af9..7fb096e9108 100644 --- a/TAO/TAO_IDL/be/be_visitor_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_decl.cpp @@ -45,7 +45,7 @@ be_visitor_decl::gen_anonymous_base_type (be_type *bt, ctx.state (cg_state); // In case our container was typedef'd. - ctx.tdef (0); + ctx.tdef (nullptr); int status = 0; diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp index 7bae6e9a7f1..5d65cb0f50c 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp @@ -35,7 +35,7 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node) *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { @@ -56,7 +56,7 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace // corresponding to their module, others do not. @@ -90,7 +90,7 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index c8f9a89a2ea..8d19bc0da75 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -68,7 +68,7 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) *os << be_global->core_versioning_end () << be_nl; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { AST_Decl *d = node; @@ -88,7 +88,7 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace corresponding // to their module, others do not. @@ -166,7 +166,7 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp index 735c673ff54..d27d97322e2 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp @@ -36,7 +36,7 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node) *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { AST_Decl *d = node; @@ -56,7 +56,7 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace // corresponding to their module, others do not. @@ -92,7 +92,7 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index 088ef2615bb..7a844ffa0ae 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -103,7 +103,7 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) *os << be_global->core_versioning_end () << be_nl; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { AST_Decl *d = node; @@ -123,7 +123,7 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace corresponding // to their module, others do not. @@ -244,7 +244,7 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp b/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp index 824b682934c..7d4786f5374 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp @@ -394,7 +394,7 @@ be_visitor_exception_ctor_assign::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp index dcee5ccd560..e6cfc01e1c7 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp @@ -119,7 +119,7 @@ int be_visitor_exception_ctor::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -154,7 +154,7 @@ int be_visitor_exception_ctor::visit_enum (be_enum *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -181,7 +181,7 @@ int be_visitor_exception_ctor::visit_interface (be_interface *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -208,7 +208,7 @@ int be_visitor_exception_ctor::visit_interface_fwd (be_interface_fwd *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -253,10 +253,10 @@ int be_visitor_exception_ctor::visit_predefined_type (be_predefined_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; be_typedef *td = this->ctx_->alias (); - if (td != 0) + if (td != nullptr) { bt = td; } @@ -315,7 +315,7 @@ int be_visitor_exception_ctor::visit_sequence (be_sequence *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -361,7 +361,7 @@ int be_visitor_exception_ctor::visit_structure (be_structure *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -400,7 +400,7 @@ int be_visitor_exception_ctor::visit_union (be_union *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -448,7 +448,7 @@ be_visitor_exception_ctor::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -456,7 +456,7 @@ int be_visitor_exception_ctor::emit_common (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp index 95770253aea..ae2fea80759 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp @@ -207,7 +207,7 @@ be_visitor_field_cdr_op_ch::visit_typedef (be_typedef *node) ), -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_cs.cpp index 751a5c1ddc9..9f7c79b6cea 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_cs.cpp @@ -83,7 +83,7 @@ be_visitor_field_cdr_op_cs::visit_array (be_array *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -102,7 +102,7 @@ be_visitor_field_cdr_op_cs::visit_array (be_array *node) '\0', NAMEBUFSIZE); - if (this->ctx_->alias () == 0 // Not a typedef. + if (this->ctx_->alias () == nullptr // Not a typedef. && node->is_child (this->ctx_->scope ()->decl ())) { // For anonymous arrays ... @@ -190,7 +190,7 @@ be_visitor_field_cdr_op_cs::visit_enum (be_enum *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -233,7 +233,7 @@ be_visitor_field_cdr_op_cs::visit_interface (be_interface *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -307,7 +307,7 @@ be_visitor_field_cdr_op_cs::visit_interface_fwd (be_interface_fwd *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -410,7 +410,7 @@ be_visitor_field_cdr_op_cs::emit_valuetype_common (void) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -458,7 +458,7 @@ be_visitor_field_cdr_op_cs::visit_predefined_type (be_predefined_type *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -581,7 +581,7 @@ be_visitor_field_cdr_op_cs::visit_sequence (be_sequence *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -626,7 +626,7 @@ be_visitor_field_cdr_op_cs::visit_string (be_string *str) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -640,7 +640,7 @@ be_visitor_field_cdr_op_cs::visit_string (be_string *str) switch (this->ctx_->sub_state ()) { case TAO_CodeGen::TAO_CDR_INPUT: - if (str != 0 && str->max_size ()->ev ()->u.ulval != 0) + if (str != nullptr && str->max_size ()->ev ()->u.ulval != 0) { if (str->width () == (long) sizeof (char)) { @@ -662,7 +662,7 @@ be_visitor_field_cdr_op_cs::visit_string (be_string *str) break; case TAO_CodeGen::TAO_CDR_OUTPUT: - if (str != 0 && str->max_size ()->ev ()->u.ulval != 0) + if (str != nullptr && str->max_size ()->ev ()->u.ulval != 0) { if (str->width () == (long) sizeof (char)) { @@ -728,7 +728,7 @@ be_visitor_field_cdr_op_cs::visit_structure (be_structure *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -789,7 +789,7 @@ be_visitor_field_cdr_op_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -823,7 +823,7 @@ be_visitor_field_cdr_op_cs::visit_union (be_union *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_cs::" @@ -889,7 +889,7 @@ be_visitor_cdr_op_field_decl::visit_field (be_field *node) { be_type *bt = dynamic_cast<be_type*> (node->field_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_cdr_op_field_decl::" @@ -922,7 +922,7 @@ be_visitor_cdr_op_field_decl::visit_array (be_array *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_cdr_op_field_decl::" @@ -939,7 +939,7 @@ be_visitor_cdr_op_field_decl::visit_array (be_array *node) '\0', NAMEBUFSIZE); - if (this->ctx_->alias () == 0 // Not a typedef. + if (this->ctx_->alias () == nullptr // Not a typedef. && node->is_child (this->ctx_->scope ()->decl ())) { // For anonymous arrays, @@ -1005,7 +1005,7 @@ be_visitor_cdr_op_field_decl::visit_typedef (be_typedef *node) // The node to be visited in the base primitve type that gets typedefed. be_type *bt = node->primitive_base_type (); - if (bt == 0 || bt->accept (this) == -1) + if (bt == nullptr || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_cdr_op_field_decl::" @@ -1014,6 +1014,6 @@ be_visitor_cdr_op_field_decl::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp index c70562afcc6..1d67e4ac801 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp @@ -67,7 +67,7 @@ int be_visitor_field_ch::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -137,7 +137,7 @@ int be_visitor_field_ch::visit_enum (be_enum *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -226,7 +226,7 @@ int be_visitor_field_ch::emit_common (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -261,10 +261,10 @@ int be_visitor_field_ch::visit_predefined_type (be_predefined_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; be_typedef *td = this->ctx_->alias (); - if (td != 0) + if (td != nullptr) { bt = td; } @@ -296,7 +296,7 @@ int be_visitor_field_ch::visit_sequence (be_sequence *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -402,7 +402,7 @@ int be_visitor_field_ch::visit_structure (be_structure *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -479,7 +479,7 @@ be_visitor_field_ch::visit_typedef (be_typedef *node) } // Reset the alias. - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -487,7 +487,7 @@ int be_visitor_field_ch::visit_union (be_union *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp index 5f00fc3b481..d5aa07a82cd 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp @@ -131,7 +131,7 @@ be_visitor_field_ci::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp index 6c9a95ffc55..0ffdeca8b05 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp @@ -174,7 +174,7 @@ be_visitor_field_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_home/home_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_home/home_ex_idl.cpp index 896e24430af..a02b816d9f7 100644 --- a/TAO/TAO_IDL/be/be_visitor_home/home_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_home/home_ex_idl.cpp @@ -14,7 +14,7 @@ be_visitor_home_ex_idl::be_visitor_home_ex_idl ( be_visitor_context *ctx) : be_visitor_scope (ctx), - node_ (0), + node_ (nullptr), os_ (*ctx->stream ()) { } @@ -234,7 +234,7 @@ be_visitor_home_ex_idl::gen_explicit (void) AST_Home *base = node_->base_home (); - if (base == 0) + if (base == nullptr) { os_ << "::Components::HomeExecutorBase"; @@ -309,7 +309,7 @@ be_visitor_home_ex_idl::gen_exception_list ( { ACE_CDR::Long cutoff = (init_op ? 1 : 0); - if (exceptions != 0 && exceptions->length () > cutoff) + if (exceptions != nullptr && exceptions->length () > cutoff) { os_ << be_idt_nl << prefix << "raises ( "; @@ -389,7 +389,7 @@ be_visitor_home_ex_idl::restore_scope (void) UTL_ScopedName *nconc_name = new UTL_ScopedName (d->local_name ()->copy (), - 0); + nullptr); UTL_ScopedName *new_name = dynamic_cast<UTL_ScopedName *> (node_->name ()->copy ()); diff --git a/TAO/TAO_IDL/be/be_visitor_home/home_exh.cpp b/TAO/TAO_IDL/be/be_visitor_home/home_exh.cpp index 0476d0dcec0..01bcd04ab3a 100644 --- a/TAO/TAO_IDL/be/be_visitor_home/home_exh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_home/home_exh.cpp @@ -13,8 +13,8 @@ be_visitor_home_exh::be_visitor_home_exh (be_visitor_context *ctx) : be_visitor_scope (ctx), - node_ (0), - comp_ (0), + node_ (nullptr), + comp_ (nullptr), os_ (*ctx->stream ()), export_macro_ (be_global->exec_export_macro ()) { @@ -127,7 +127,7 @@ be_visitor_home_exh::gen_exec_class (void) be_home *h = node_; - while (h != 0) + while (h != nullptr) { if (this->visit_scope (h) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_home/home_exs.cpp b/TAO/TAO_IDL/be/be_visitor_home/home_exs.cpp index 90b2793691e..14bc95eadab 100644 --- a/TAO/TAO_IDL/be/be_visitor_home/home_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_home/home_exs.cpp @@ -13,8 +13,8 @@ be_visitor_home_exs::be_visitor_home_exs (be_visitor_context *ctx) : be_visitor_scope (ctx), - node_ (0), - comp_ (0), + node_ (nullptr), + comp_ (nullptr), os_ (*ctx->stream ()), comment_start_border_ ("/**"), comment_end_border_ (" */"), @@ -137,7 +137,7 @@ be_visitor_home_exs::gen_exec_class (void) be_home *h = node_; - while (h != 0) + while (h != nullptr) { if (this->visit_scope (h) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_home/home_svh.cpp b/TAO/TAO_IDL/be/be_visitor_home/home_svh.cpp index b72911fba77..7f0ae8f6bdd 100644 --- a/TAO/TAO_IDL/be/be_visitor_home/home_svh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_home/home_svh.cpp @@ -13,8 +13,8 @@ be_visitor_home_svh::be_visitor_home_svh (be_visitor_context *ctx) : be_visitor_scope (ctx), - node_ (0), - comp_ (0), + node_ (nullptr), + comp_ (nullptr), os_ (*ctx->stream ()), export_macro_ (be_global->svnt_export_macro ()) { @@ -165,7 +165,7 @@ be_visitor_home_svh::gen_servant_class (void) AST_Type *pk = node_->primary_key (); - if (pk != 0) + if (pk != nullptr) { os_ << be_nl_2 << "// Implicit home primary key operations - not supported."; @@ -199,7 +199,7 @@ AST_Type *pk = node_->primary_key (); be_home *h = node_; - while (h != 0) + while (h != nullptr) { if (this->visit_scope (h) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp b/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp index 9f6f2a969bb..8c23f340d0e 100644 --- a/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_home/home_svs.cpp @@ -13,8 +13,8 @@ be_visitor_home_svs::be_visitor_home_svs (be_visitor_context *ctx) : be_visitor_scope (ctx), - node_ (0), - comp_ (0), + node_ (nullptr), + comp_ (nullptr), os_ (*ctx->stream ()), export_macro_ (be_global->svnt_export_macro ()), for_finder_ (false) @@ -274,7 +274,7 @@ be_visitor_home_svs::gen_servant_class (void) AST_Type *pk = node_->primary_key (); - if (pk != 0) + if (pk != nullptr) { os_ << be_nl_2 << "::" << comp_->name () << "_ptr" << be_nl @@ -329,7 +329,7 @@ be_visitor_home_svs::gen_servant_class (void) be_home *h = node_; - while (h != 0) + while (h != nullptr) { if (this->visit_scope (h) != 0) { @@ -449,7 +449,7 @@ be_visitor_home_attr_set::~be_visitor_home_attr_set (void) int be_visitor_home_attr_set::visit_home (be_home *node) { - if (node == 0) + if (node == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp index 51de355c8ff..91f670a924c 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp @@ -34,7 +34,7 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node) } // Do not generate AMH classes for any sort of implied IDL. - if (node->original_interface () != 0) + if (node->original_interface () != nullptr) { return 0; } @@ -78,7 +78,7 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node) ACE_CString amh_name ("POA_"); // @@ The following code is *NOT* exception-safe. - char *buf = 0; + char *buf = nullptr; be_interface *base = dynamic_cast<be_interface*> (node->inherits ()[i]); base->compute_full_name ("AMH_", "", buf); @@ -226,8 +226,8 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node, return 0; } - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (id, Identifier ("void"), @@ -235,11 +235,11 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node, ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); // Create the return type, which is "void" - be_predefined_type *rt = 0; + be_predefined_type *rt = nullptr; ACE_NEW_RETURN (rt, be_predefined_type (AST_PredefinedType::PT_void, sn), @@ -258,13 +258,13 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node, ACE_NEW_RETURN (sn, UTL_ScopedName (id, - 0), + nullptr), -1); op_name->nconc (sn); // Create the operation - be_operation *operation = 0; + be_operation *operation = nullptr; ACE_NEW_RETURN (operation, be_operation (rt, //node->return_type (), AST_Operation::OP_noflags, @@ -290,7 +290,7 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node, { operation->destroy (); delete operation; - operation = 0; + operation = nullptr; ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_amh_pre_proc::") @@ -307,7 +307,7 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node, original_arg->direction () == AST_Argument::dir_IN) { // Create the argument. - be_argument *arg = 0; + be_argument *arg = nullptr; ACE_NEW_RETURN (arg, be_argument (original_arg->direction (), original_arg->field_type (), @@ -323,7 +323,7 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node, // After having generated the operation we insert it into the // AMH node interface. - if (0 == amh_node->be_add_operation (operation)) + if (nullptr == amh_node->be_add_operation (operation)) { return -1; } @@ -335,27 +335,27 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node, be_interface * be_visitor_amh_interface_sh::create_amh_class (ACE_CString name) { - Identifier *id = 0; + Identifier *id = nullptr; ACE_NEW_RETURN (id, Identifier (name.c_str ()), - 0); + nullptr); - UTL_ScopedName *amh_class_name = 0; + UTL_ScopedName *amh_class_name = nullptr; ACE_NEW_RETURN (amh_class_name, UTL_ScopedName (id, - 0), - 0); + nullptr), + nullptr); - be_interface *amh_class = 0; + be_interface *amh_class = nullptr; ACE_NEW_RETURN (amh_class, be_interface (amh_class_name, // name - 0, // list of inherited + nullptr, // list of inherited 0, // number of inherited - 0, // list of ancestors + nullptr, // list of ancestors 0, // number of ancestors 0, // non-local 0), // non-abstract - 0); + nullptr); amh_class->set_name (amh_class_name); return amh_class; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp index 8d014379fb1..f1b62ce461b 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp @@ -38,7 +38,7 @@ int be_visitor_amh_interface_ss::visit_interface (be_interface *node) { // Do not generate AMH classes for any sort of implied IDL. - if (node->original_interface () != 0) + if (node->original_interface () != nullptr) { return 0; } @@ -173,7 +173,7 @@ emit (be_interface * /* derived */, ACE_CString amh_name ("POA_"); // @@ The following code is *NOT* exception-safe. - char *buf = 0; + char *buf = nullptr; base->compute_full_name ("AMH_", "", buf); amh_name += buf; // buf was allocated using ACE_OS::strdup, so we must use free instead @@ -219,7 +219,7 @@ TAO_IDL_Copy_Ctor_Worker::emit (be_interface *derived, if (base->is_nested ()) { - be_decl *scope = 0; + be_decl *scope = nullptr; scope = dynamic_cast<be_scope*> (base->defined_in ())->decl (); *os << "POA_" << scope->name () << "::AMH_" @@ -233,7 +233,7 @@ TAO_IDL_Copy_Ctor_Worker::emit (be_interface *derived, ACE_CString amh_name ("POA_"); // @@ The following code is *NOT* exception-safe. - char *buf = 0; + char *buf = nullptr; base->compute_full_name ("AMH_", "", buf); amh_name += buf; // buf was allocated by ACE_OS::strdup, so we need to use free @@ -275,7 +275,7 @@ ACE_CString be_visitor_amh_interface_ss::generate_flat_name (be_interface *node) { // @@ The following code is *NOT* exception-safe. - char *buf = 0; + char *buf = nullptr; node->compute_flat_name ("AMH_", "", buf); // @@ This whole thing would be more efficient if we could pass the @@ -306,7 +306,7 @@ be_visitor_amh_interface_ss::generate_full_skel_name (be_interface *node) ACE_CString result ("POA_"); // @@ The following code is *NOT* exception-safe. - char *buf = 0; + char *buf = nullptr; node->compute_full_name ("AMH_", "", buf); result += buf; // buf was allocated using ACE_OS::strdup, so we must use free instead diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp index 6f010faf6a4..c98f439df44 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp @@ -208,7 +208,7 @@ be_visitor_ami4ccm_rh_ex_idl::pre_process (be_decl *node) be_operation *op = dynamic_cast<be_operation*> (this->ctx_->scope ()); - if (op == 0) + if (op == nullptr) { return 0; } @@ -217,7 +217,7 @@ be_visitor_ami4ccm_rh_ex_idl::pre_process (be_decl *node) be_argument *arg = dynamic_cast<be_argument*> (node); - if (arg == 0) + if (arg == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp index c3c8e849f63..f96f633096d 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp @@ -15,7 +15,7 @@ be_visitor_ami4ccm_sendc_ex_idl::be_visitor_ami4ccm_sendc_ex_idl ( be_visitor_context *ctx) : be_visitor_scope (ctx), os_ (*ctx->stream ()), - iface_ (0) + iface_ (nullptr) { } @@ -171,7 +171,7 @@ be_visitor_ami4ccm_sendc_ex_idl::pre_process (be_decl *node) { be_argument *arg = dynamic_cast<be_argument*> (node); - if (arg == 0) + if (arg == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp index e567aee863d..d196a6f777d 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp @@ -42,7 +42,7 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node) *os << be_nl_2; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { @@ -63,7 +63,7 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace // corresponding to their module, others do not. @@ -101,7 +101,7 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp index 19ef2555e0e..1230ea88e28 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp @@ -112,7 +112,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << be_global->core_versioning_end () << be_nl; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { @@ -133,7 +133,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace corresponding // to their module, others do not. @@ -238,7 +238,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp index 3e8f278a6a2..6430de371a3 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp @@ -38,7 +38,7 @@ be_visitor_interface_direct_proxy_impl_sh::visit_interface ( if (node->n_inherits () > 0) { - AST_Type *parent = 0; + AST_Type *parent = nullptr; for (int i = 0; i < node->n_inherits (); ++i) { @@ -111,7 +111,7 @@ be_visitor_interface_direct_proxy_impl_sh::gen_abstract_ops_helper ( return 0; } - AST_Decl *d = 0; + AST_Decl *d = nullptr; be_visitor_context ctx; ctx.stream (os); ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_PROXY_IMPL_SH); @@ -122,7 +122,7 @@ be_visitor_interface_direct_proxy_impl_sh::gen_abstract_ops_helper ( { d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_thru_poa_proxy_" @@ -132,7 +132,7 @@ be_visitor_interface_direct_proxy_impl_sh::gen_abstract_ops_helper ( } UTL_ScopedName item_new_name (d->local_name (), - 0); + nullptr); // We pass the node's is_abstract flag to the operation // constructor so we will get the right generated operation @@ -156,21 +156,21 @@ be_visitor_interface_direct_proxy_impl_sh::gen_abstract_ops_helper ( UTL_ExceptList *get_exceptions = attr->get_get_exceptions (); - if (0 != get_exceptions) + if (nullptr != get_exceptions) { new_attr.be_add_get_exceptions (get_exceptions->copy ()); } UTL_ExceptList *set_exceptions = attr->get_set_exceptions (); - if (0 != set_exceptions) + if (nullptr != set_exceptions) { new_attr.be_add_set_exceptions (set_exceptions->copy ()); } be_visitor_attribute attr_visitor (&ctx); attr_visitor.visit_attribute (&new_attr); - ctx.attribute (0); + ctx.attribute (nullptr); new_attr.destroy (); } } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp index 913e526c3f4..5a2a385dd74 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp @@ -61,7 +61,7 @@ be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper ( return 0; } - AST_Decl *d = 0; + AST_Decl *d = nullptr; be_visitor_context ctx; ctx.stream (os); ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_PROXY_IMPL_SS); @@ -72,7 +72,7 @@ be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper ( { d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_direct_proxy" @@ -83,14 +83,14 @@ be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper ( AST_Decl::NodeType nt = d->node_type (); - UTL_ScopedName *item_new_name = 0; - UTL_ScopedName *new_name = 0; + UTL_ScopedName *item_new_name = nullptr; + UTL_ScopedName *new_name = nullptr; if (AST_Decl::NT_op == nt || AST_Decl::NT_attr == nt) { ACE_NEW_RETURN (item_new_name, UTL_ScopedName (d->local_name ()->copy (), - 0), + nullptr), -1); new_name = (UTL_ScopedName *) node->name ()->copy (); @@ -126,7 +126,7 @@ be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper ( AST_Attribute *attr = dynamic_cast<AST_Attribute*> (d); be_attribute new_attr (attr->readonly (), attr->field_type (), - 0, + nullptr, attr->is_local (), attr->is_abstract ()); new_attr.set_defined_in (node); @@ -134,21 +134,21 @@ be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper ( UTL_ExceptList *get_exceptions = attr->get_get_exceptions (); - if (0 != get_exceptions) + if (nullptr != get_exceptions) { new_attr.be_add_get_exceptions (get_exceptions->copy ()); } UTL_ExceptList *set_exceptions = attr->get_set_exceptions (); - if (0 != set_exceptions) + if (nullptr != set_exceptions) { new_attr.be_add_set_exceptions (set_exceptions->copy ()); } be_visitor_attribute attr_visitor (&ctx); attr_visitor.visit_attribute (&new_attr); - ctx.attribute (0); + ctx.attribute (nullptr); new_attr.destroy (); } } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp index f6d04fb0484..34946766165 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp @@ -37,7 +37,7 @@ be_visitor_interface::visit_scope (be_scope *node) be_interface *intf = dynamic_cast<be_interface*> (node); - if (intf == 0) + if (intf == nullptr) { return 0; } @@ -52,7 +52,7 @@ be_visitor_interface::visit_scope (be_scope *node) return 0; } - be_interface::tao_code_emitter helper = 0; + be_interface::tao_code_emitter helper = nullptr; switch (this->ctx_->state ()) { @@ -84,7 +84,7 @@ be_visitor_interface::visit_scope (be_scope *node) break; } - if (helper == 0) + if (helper == nullptr) { return 0; } @@ -113,7 +113,7 @@ int be_visitor_interface::is_amh_rh_node (be_interface *node) { //If, is implied-IDL - if (node->original_interface () != 0) + if (node->original_interface () != nullptr) { // and the name starts with AMH if (ACE_OS::strncmp (node->local_name (), "AMH", 3) == 0) @@ -130,7 +130,7 @@ void be_visitor_interface::add_abstract_op_args (AST_Operation *old_op, be_operation &new_op) { - AST_Decl *d = 0; + AST_Decl *d = nullptr; for (UTL_ScopeActiveIterator si (old_op, UTL_Scope::IK_decls); !si.is_done (); @@ -142,7 +142,7 @@ be_visitor_interface::add_abstract_op_args (AST_Operation *old_op, UTL_ExceptList *excep_list = old_op->exceptions (); - if (0 != excep_list) + if (nullptr != excep_list) { new_op.be_add_exceptions (excep_list->copy ()); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index 0b8538be6fe..1c4f509f2e1 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -74,7 +74,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) << "static " << node->local_name () << "_ptr " << "_duplicate (" << node->local_name () << "_ptr obj);" << be_nl_2; - if (c == 0) + if (c == nullptr) { *os << "static void _tao_release (" << node->local_name () << "_ptr obj);" @@ -91,7 +91,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) -1); } - if (c == 0) + if (c == nullptr) { if (! this->gen_xxx_narrow ("_unchecked_narrow", node, os)) { @@ -233,7 +233,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) << be_uidt << be_uidt; } - if (c != 0) + if (c != nullptr) { // Friends declarations, component only. *os << be_nl_2 @@ -389,7 +389,7 @@ be_visitor_interface_ch::gen_abstract_ops_helper (be_interface *node, return 0; } - AST_Decl *d = 0; + AST_Decl *d = nullptr; be_visitor_context ctx; ctx.stream (os); @@ -399,7 +399,7 @@ be_visitor_interface_ch::gen_abstract_ops_helper (be_interface *node, { d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_interface::") diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index ef03c91b8fe..6f13f8bc638 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -27,7 +27,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) return 0; } - be_type *bt = 0; + be_type *bt = nullptr; // Set the right type. if (this->ctx_->alias ()) @@ -99,7 +99,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << "return "; - if (node->is_abstract () || c != 0) + if (node->is_abstract () || c != nullptr) { *os << "cdr << p;"; } @@ -248,7 +248,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) } // The _unchecked_narrow method, not for components. - if (c == 0 && ! this->gen_xxx_narrow ("unchecked_narrow", node)) + if (c == nullptr && ! this->gen_xxx_narrow ("unchecked_narrow", node)) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_interface_cs::") @@ -280,7 +280,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << "}" << be_nl_2; // The _tao_release method - if (c == 0) + if (c == nullptr) { *os << "void" << be_nl << node->full_name () << "::_tao_release (" @@ -584,7 +584,7 @@ be_visitor_interface_cs::gen_abstract_ops_helper (be_interface *node, return 0; } - AST_Decl *d = 0; + AST_Decl *d = nullptr; be_visitor_context ctx; ctx.stream (os); @@ -594,7 +594,7 @@ be_visitor_interface_cs::gen_abstract_ops_helper (be_interface *node, { d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_cs::" @@ -605,10 +605,10 @@ be_visitor_interface_cs::gen_abstract_ops_helper (be_interface *node, if (d->node_type () == AST_Decl::NT_op) { - UTL_ScopedName *item_new_name = 0; + UTL_ScopedName *item_new_name = nullptr; ACE_NEW_RETURN (item_new_name, UTL_ScopedName (d->local_name ()->copy (), - 0), + nullptr), -1); UTL_ScopedName *new_op_name = diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ex_idl.cpp index 21c0f1e5e1d..8e412556b29 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ex_idl.cpp @@ -26,7 +26,7 @@ int be_visitor_interface_ex_idl::visit_interface (be_interface *node) { // Skip implied IDL nodes. - if (node->original_interface () != 0) + if (node->original_interface () != nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp index 7c6f8a65d19..15a358fe763 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp @@ -92,7 +92,7 @@ be_visitor_interface_is::visit_interface (be_interface *node) if (node->is_nested ()) { - be_decl *scope = 0; + be_decl *scope = nullptr; scope = dynamic_cast<be_scope*> (node->defined_in ())->decl (); *os << " POA_" << scope->name () << "::" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index cda960e90ef..14b7c67ffbc 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -194,7 +194,7 @@ be_visitor_interface_sh::gen_abstract_ops_helper ( return 0; } - AST_Decl *d = 0; + AST_Decl *d = nullptr; be_visitor_context ctx; ctx.stream (os); ctx.state (TAO_CodeGen::TAO_ROOT_SH); @@ -205,7 +205,7 @@ be_visitor_interface_sh::gen_abstract_ops_helper ( { d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_interface_sh::") @@ -215,7 +215,7 @@ be_visitor_interface_sh::gen_abstract_ops_helper ( } UTL_ScopedName item_new_name (d->local_name (), - 0); + nullptr); if (d->node_type () == AST_Decl::NT_op) { @@ -235,21 +235,21 @@ be_visitor_interface_sh::gen_abstract_ops_helper ( UTL_ExceptList *get_exceptions = attr->get_get_exceptions (); - if (0 != get_exceptions) + if (nullptr != get_exceptions) { new_attr.be_add_get_exceptions (get_exceptions->copy ()); } UTL_ExceptList *set_exceptions = attr->get_set_exceptions (); - if (0 != set_exceptions) + if (nullptr != set_exceptions) { new_attr.be_add_set_exceptions (set_exceptions->copy ()); } be_visitor_attribute attr_visitor (&ctx); attr_visitor.visit_attribute (&new_attr); - ctx.attribute (0); + ctx.attribute (nullptr); new_attr.destroy (); } } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index 1cfc137cb60..86de660dd62 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -261,7 +261,7 @@ be_visitor_interface_ss::gen_abstract_ops_helper ( return 0; } - AST_Decl *d = 0; + AST_Decl *d = nullptr; be_visitor_context ctx; ctx.stream (os); ctx.state (TAO_CodeGen::TAO_ROOT_SS); @@ -272,7 +272,7 @@ be_visitor_interface_ss::gen_abstract_ops_helper ( { d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_interface_ss::") @@ -283,14 +283,14 @@ be_visitor_interface_ss::gen_abstract_ops_helper ( AST_Decl::NodeType nt = d->node_type (); - UTL_ScopedName *item_new_name = 0; - UTL_ScopedName *new_name = 0; + UTL_ScopedName *item_new_name = nullptr; + UTL_ScopedName *new_name = nullptr; if (AST_Decl::NT_op == nt || AST_Decl::NT_attr == nt) { ACE_NEW_RETURN (item_new_name, UTL_ScopedName (d->local_name ()->copy (), - 0), + nullptr), -1); new_name = (UTL_ScopedName *) node->name ()->copy (); @@ -327,7 +327,7 @@ be_visitor_interface_ss::gen_abstract_ops_helper ( dynamic_cast<AST_Attribute*> (d); be_attribute new_attr (attr->readonly (), attr->field_type (), - 0, + nullptr, attr->is_local (), attr->is_abstract ()); new_attr.set_defined_in (node); @@ -336,7 +336,7 @@ be_visitor_interface_ss::gen_abstract_ops_helper ( UTL_ExceptList *get_exceptions = attr->get_get_exceptions (); - if (0 != get_exceptions) + if (nullptr != get_exceptions) { new_attr.be_add_get_exceptions (get_exceptions->copy ()); } @@ -344,14 +344,14 @@ be_visitor_interface_ss::gen_abstract_ops_helper ( UTL_ExceptList *set_exceptions = attr->get_set_exceptions (); - if (0 != set_exceptions) + if (nullptr != set_exceptions) { new_attr.be_add_set_exceptions (set_exceptions->copy ()); } be_visitor_attribute attr_visitor (&ctx); attr_visitor.visit_attribute (&new_attr); - ctx.attribute (0); + ctx.attribute (nullptr); new_attr.destroy (); } } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp index aad105b595a..5399e978a4d 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp @@ -24,7 +24,7 @@ be_visitor_interface_smart_proxy_ch::~be_visitor_interface_smart_proxy_ch (void) int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -115,7 +115,7 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) { be_interface *inherited = dynamic_cast<be_interface*> (node->inherits ()[i]); - be_decl *scope = 0; + be_decl *scope = nullptr; if (inherited->is_nested ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp index 9c1a935c8fd..b93ec9fdeb5 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp @@ -48,14 +48,14 @@ be_visitor_interface_fwd_any_op_ch::visit_interface_fwd ( *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested () && node->defined_in ()->scope_node_type () == AST_Decl::NT_module) { module = dynamic_cast<be_module*> (node->defined_in ()); - if (0 == module) + if (nullptr == module) { ACE_ERROR_RETURN ((LM_ERROR, "be_visitor_valuebox_any_op_ch::" @@ -101,7 +101,7 @@ be_visitor_interface_fwd_any_op_ch::visit_interface_fwd ( *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_member_type_decl.cpp b/TAO/TAO_IDL/be/be_visitor_member_type_decl.cpp index 9917cbac4f4..60ebcd611ab 100644 --- a/TAO/TAO_IDL/be/be_visitor_member_type_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_member_type_decl.cpp @@ -30,7 +30,7 @@ be_visitor_member_type_decl::visit_array (be_array *) { be_type *bt = this->ctx_->alias (); - if (bt == 0) + if (bt == nullptr) { /// Support anonymous types? return -1; @@ -110,7 +110,7 @@ be_visitor_member_type_decl::visit_sequence (be_sequence *) { be_type *bt = this->ctx_->alias (); - if (bt == 0) + if (bt == nullptr) { /// Support anonymous types? return -1; @@ -151,7 +151,7 @@ be_visitor_member_type_decl::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp b/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp index 85636db20ea..e4ae891dbf6 100644 --- a/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp @@ -29,7 +29,7 @@ be_visitor_module_ch::visit_module (be_module *node) } TAO_OutStream *os = this->ctx_->stream (); - TAO_OutStream *aos = 0; + TAO_OutStream *aos = nullptr; *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_null_return_value.cpp b/TAO/TAO_IDL/be/be_visitor_null_return_value.cpp index 91c17cabbbb..85327630d02 100644 --- a/TAO/TAO_IDL/be/be_visitor_null_return_value.cpp +++ b/TAO/TAO_IDL/be/be_visitor_null_return_value.cpp @@ -122,7 +122,7 @@ be_visitor_null_return_value::visit_sequence (be_sequence *node) const char *fname = node->full_name (); be_typedef *td = this->ctx_->tdef (); - if (td != 0) + if (td != nullptr) { fname = td->full_name (); } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp index 18a6805b3c1..8bbfa8a6dfd 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp @@ -46,8 +46,8 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) : node->defined_in (); // Needs to be one or the other. - if (dynamic_cast<be_interface*> (s) == 0 - && dynamic_cast<be_porttype*> (s) == 0) + if (dynamic_cast<be_interface*> (s) == nullptr + && dynamic_cast<be_porttype*> (s) == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_amh_rh_operation_sh::") diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp index c4efea27089..fadf960fa60 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp @@ -45,11 +45,11 @@ be_visitor_amh_rh_operation_ss::visit_operation (be_operation *node) be_interface *intf = dynamic_cast<be_interface*> (s); - if (intf == 0) + if (intf == nullptr) { be_porttype *pt = dynamic_cast<be_porttype*> (s); - if (pt == 0) + if (pt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_amh_rh_operation_sh::") @@ -63,14 +63,14 @@ be_visitor_amh_rh_operation_ss::visit_operation (be_operation *node) } } - char *buf = 0; + char *buf = nullptr; intf->compute_full_name ("TAO_", "", buf); ACE_CString response_handler_implementation_name ("POA_"); response_handler_implementation_name += buf; // buf was allocated by ACE_OS::strdup, so we need to use free instead // of delete. ACE_OS::free (buf); - buf = 0; + buf = nullptr; // Step 1 : Generate return type: always void *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl @@ -125,7 +125,7 @@ be_visitor_amh_rh_operation_ss::visit_operation (be_operation *node) // 4) The implied valuetype ends in ExceptionHolder const char *last_underbar = ACE_OS::strrchr (node->full_name (), '_'); - if (last_underbar != 0 + if (last_underbar != nullptr && ACE_OS::strcmp (last_underbar, "_excep") == 0) { if (node->nmembers () == 1) @@ -140,13 +140,13 @@ be_visitor_amh_rh_operation_ss::visit_operation (be_operation *node) be_valuetype *vt = dynamic_cast<be_valuetype*> (argument->field_type ()); - if (vt != 0 + if (vt != nullptr && vt->original_interface () == intf->original_interface ()) { const char *last_E = ACE_OS::strrchr (vt->full_name (), 'E'); - if (last_E != 0 + if (last_E != nullptr && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0) { is_an_exception_reply = 1; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp index f3a5022521a..026a72b40aa 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp @@ -55,7 +55,7 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) be_argument *argument = dynamic_cast<be_argument*> (i.item ()); - if (argument == 0 + if (argument == nullptr || argument->direction () == AST_Argument::dir_OUT) { continue; @@ -141,14 +141,14 @@ be_visitor_amh_operation_sh::generate_shared_prologue ( be_interface *intf = dynamic_cast<be_interface*> (node->defined_in ()); - if (this->ctx_->attribute () != 0) + if (this->ctx_->attribute () != nullptr) { intf = dynamic_cast<be_interface*> ( this->ctx_->attribute()->defined_in () ); } - if (intf == 0) + if (intf == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_visitor_amh_operation_sh::" @@ -177,5 +177,5 @@ be_visitor_amh_operation_sh::generate_shared_prologue ( // buf was allocated by ACE_OS::strdup, so we must use free instead // of delete. ACE_OS::free (buf); - buf = 0; + buf = nullptr; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp index 9fd0fdbc8d6..54a44778b5c 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp @@ -64,7 +64,7 @@ be_visitor_amh_operation_ss::visit_operation (be_operation *node) be_argument *argument = dynamic_cast<be_argument*> (si.item ()); - if (argument == 0 + if (argument == nullptr || argument->direction () == AST_Argument::dir_OUT) { continue; @@ -101,7 +101,7 @@ be_visitor_amh_operation_ss::visit_operation (be_operation *node) be_argument *argument = dynamic_cast<be_argument*> (sj.item ()); - if (argument == 0 + if (argument == nullptr || argument->direction () == AST_Argument::dir_OUT) { continue; @@ -155,7 +155,7 @@ be_visitor_amh_operation_ss::visit_operation (be_operation *node) i.next (); - if (argument == 0 + if (argument == nullptr || argument->direction () == AST_Argument::dir_OUT) { continue; @@ -310,7 +310,7 @@ be_visitor_amh_operation_ss::generate_shared_prologue (be_decl *node, be_interface *intf = dynamic_cast<be_interface*> (node->defined_in ()); - if (intf == 0) + if (intf == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_operation_ss::" @@ -327,7 +327,7 @@ be_visitor_amh_operation_ss::generate_shared_prologue (be_decl *node, // buf was allocated by ACE_OS::strdup, so we need to use free instead // of delete. ACE_OS::free (buf); - buf = 0; + buf = nullptr; *os << "void" << be_nl << amh_skel_name.c_str () << "::" @@ -377,7 +377,7 @@ be_visitor_amh_operation_ss::generate_shared_section (be_decl *node, // buf was allocated by ACE_OS::strdup, so we need to use free instead // of delete. ACE_OS::free (buf); - buf = 0; + buf = nullptr; *os << be_nl << "TAO_ORB_Core *orb_core =" << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp index f1a910055dc..81c5081e537 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp @@ -64,7 +64,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node) be_decl *parent = dynamic_cast<be_scope*> (node->defined_in ())->decl (); - if (parent == 0) + if (parent == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_operation_ami_cs::" @@ -103,7 +103,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node) if (node->has_native ()) // native exists => no stub { be_predefined_type bpt (AST_PredefinedType::PT_void, - 0); + nullptr); int const status = this->gen_raise_exception ("::CORBA::MARSHAL", ""); @@ -156,7 +156,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node) << "{" << be_idt_nl << "std::addressof(_tao_retval)"; - AST_Argument *arg = 0; + AST_Argument *arg = nullptr; UTL_ScopeActiveIterator arg_list_iter (ami_op, UTL_Scope::IK_decls); @@ -245,7 +245,7 @@ int be_visitor_operation_ami_cs::visit_argument (be_argument *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; // argument type + be_type *bt = nullptr; // argument type // Retrieve the type for this argument. bt = dynamic_cast<be_type*> (node->field_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp index 574b8ab2c4b..5832c2d2768 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp @@ -44,7 +44,7 @@ int be_visitor_operation_ami_handler_reply_stub_operation_cs::visit_operation ( be_operation *node) { - be_type *bt = 0; + be_type *bt = nullptr; be_visitor_context ctx; TAO_OutStream *os = this->ctx_->stream (); @@ -155,7 +155,7 @@ be_visitor_operation_ami_handler_reply_stub_operation_cs::visit_operation ( *os << be_nl << "static TAO::Exception_Data " << "exceptions_data [] =" << be_nl; *os << "{" << be_idt_nl; - be_exception *ex = 0; + be_exception *ex = nullptr; // Initialize an iterator to iterate thru the exception list. // Continue until each element is visited. @@ -246,7 +246,7 @@ be_visitor_operation_ami_handler_reply_stub_operation_cs::visit_argument ( ) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; // Retrieve the type for this argument. bt = dynamic_cast<be_type*> (node->field_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp index 76b455fc588..05f8a3508f6 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp @@ -149,12 +149,12 @@ be_visitor_operation_arglist::visit_argument (be_argument *node) // generate the appropriate relative scoped names. be_operation *op = dynamic_cast<be_operation*> (this->ctx_->scope ()); - be_interface *intf = 0; + be_interface *intf = nullptr; // We need the interface node in which this operation was defined. However, // if this operation node was an attribute node in disguise, we get this // information from the context - if (op == 0) + if (op == nullptr) { be_factory *f = dynamic_cast<be_factory*> (this->ctx_->scope ()); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp index bb0675176a2..0e47505f607 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp @@ -89,7 +89,7 @@ be_visitor_operation_argument::visit_argument (be_argument *node) be_operation *op = dynamic_cast<be_operation*> (this->ctx_->scope ()); - if (op == 0) + if (op == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_arglist::" diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp index 3a44607cc82..e1d7b1dc576 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp @@ -193,7 +193,7 @@ be_visitor_args_decl::visit_array (be_array *node) be_argument *f = dynamic_cast<be_argument*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_args_decl::" @@ -275,6 +275,6 @@ be_visitor_args_decl::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp index 7dda3e5b466..97493a1a922 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp @@ -34,11 +34,11 @@ be_visitor_operation_direct_proxy_impl_ss::visit_operation ( be_interface *intf = dynamic_cast<be_interface*> (s); - if (intf == 0) + if (intf == nullptr) { be_porttype *pt = dynamic_cast<be_porttype*> (s); - if (pt == 0) + if (pt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation_") @@ -153,7 +153,7 @@ be_visitor_operation_direct_proxy_impl_ss::gen_invoke ( return 0; } - AST_Argument *arg = 0; + AST_Argument *arg = nullptr; int index = 1; for (; !si.is_done (); si.next (), ++index) diff --git a/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp index 0c1f75cf3d3..46c268cfbec 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp @@ -41,7 +41,7 @@ be_visitor_operation_exceptlist_cs::visit_operation (be_operation *node) << "_exceptiondata [] = " << be_idt_nl; *os << "{" << be_idt_nl; - be_exception *ex = 0; + be_exception *ex = nullptr; // Initialize an iterator to iterate thru the exception list. // Continue until each element is visited. diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp index 597bfccc55e..39bf64b8b00 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp @@ -82,7 +82,7 @@ be_visitor_operation::count_non_out_parameters (be_operation *node) be_valuetype *vt = dynamic_cast<be_valuetype*> (bd->field_type ()); - if ((bd->direction () != AST_Argument::dir_OUT) && vt == 0) + if ((bd->direction () != AST_Argument::dir_OUT) && vt == nullptr) { ++count; } @@ -106,7 +106,7 @@ be_visitor_operation::is_amh_exception_holder (be_interface *node) { //ACE_DEBUG ((LM_DEBUG, "Passed first test of amh_excepholder\n")); const char *last_E = ACE_OS::strrchr (node->full_name (), 'E'); - if (last_E != 0 + if (last_E != nullptr && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0) { //ACE_DEBUG ((LM_DEBUG, "be_visitor_operation: Passed second test of amh_excepholder\n")); @@ -142,11 +142,11 @@ be_visitor_operation::gen_stub_operation_body ( be_interface *intf = dynamic_cast<be_interface*> (s); - if (intf == 0) + if (intf == nullptr) { be_porttype *pt = dynamic_cast<be_porttype*> (s); - if (pt == 0) + if (pt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation::") @@ -215,7 +215,7 @@ be_visitor_operation::gen_stub_operation_body ( << "{" << be_idt_nl << "std::addressof(_tao_retval)"; - AST_Argument *arg = 0; + AST_Argument *arg = nullptr; for (UTL_ScopeActiveIterator arg_list_iter (node, UTL_Scope::IK_decls); ! arg_list_iter.is_done (); @@ -408,7 +408,7 @@ be_visitor_operation::gen_stub_body_arglist (be_operation *node, TAO_OutStream *os, bool ami) { - AST_Argument *arg = 0; + AST_Argument *arg = nullptr; UTL_ScopeActiveIterator arg_decl_iter (node, UTL_Scope::IK_decls); if (ami) @@ -459,7 +459,7 @@ be_visitor_operation::gen_arg_template_param_name (AST_Decl *scope, AST_Type *bt, TAO_OutStream *os) { - AST_Typedef *alias = 0; + AST_Typedef *alias = nullptr; if (bt->node_type () == AST_Decl::NT_typedef) { @@ -481,7 +481,7 @@ be_visitor_operation::gen_arg_template_param_name (AST_Decl *scope, { *os << "::TAO::"; - if (alias != 0) + if (alias != nullptr) { *os << alias->local_name () << "_" << bound; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp index e25ce6210a4..1e9dd16b0d1 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp @@ -102,7 +102,7 @@ be_visitor_operation_ch::visit_operation (be_operation *node) /// If we are in a reply handler, are not an excep_* operation, /// and have no native args, then generate the AMI static /// reply stub declaration. - if (intf != 0 + if (intf != nullptr && intf->is_ami_rh () && !node->is_excep_ami () && !node->has_native ()) diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp index f6e027b2ade..16f89d43138 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp @@ -49,11 +49,11 @@ be_visitor_operation_cs::visit_operation (be_operation *node) be_interface *intf = dynamic_cast<be_interface*> (s); - if (intf == 0) + if (intf == nullptr) { be_porttype *pt = dynamic_cast<be_porttype*> (s); - if (pt == 0) + if (pt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation_cs::") @@ -65,7 +65,7 @@ be_visitor_operation_cs::visit_operation (be_operation *node) { intf = this->ctx_->interface (); - if (intf == 0) + if (intf == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation_cs::") @@ -142,7 +142,7 @@ be_visitor_operation_cs::visit_operation (be_operation *node) /// If we are in a reply handler, are not an execp_* operation, /// and have no native args, then generate the AMI static /// reply stub declaration. - if (intf != 0 + if (intf != nullptr && intf->is_ami_rh () && !node->is_excep_ami () && !node->has_native ()) diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_exs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_exs.cpp index ee50ef97f01..7d17b1d940e 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_exs.cpp @@ -14,7 +14,7 @@ be_visitor_operation_exs::be_visitor_operation_exs (be_visitor_context *ctx) : be_visitor_scope (ctx), os_ (*ctx->stream ()), - scope_ (0), + scope_ (nullptr), your_code_here_ ("/* Your code here. */"), class_extension_ ("_exec_i") { @@ -40,7 +40,7 @@ be_visitor_operation_exs::visit_operation (be_operation *node) // Retrieve the operation return type. be_type *rt = dynamic_cast<be_type*> (node->return_type ()); - if (rt == 0) + if (rt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation_exs::") diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp index 18019fe4fd9..b762b030ae0 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp @@ -64,7 +64,7 @@ be_visitor_operation_is::visit_operation (be_operation *node) -1); } - const char *classname = 0; + const char *classname = nullptr; if (intf) { diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index 88e6e0fc0e4..26832111428 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -30,7 +30,7 @@ be_visitor_operation_ss::visit_operation (be_operation * node) } TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; this->ctx_->node (node); @@ -129,7 +129,7 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, be_interface *intf = dynamic_cast<be_interface*> (s); - if (intf == 0) + if (intf == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation_ss::") diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp index 49633e611a3..e10bb890dad 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_svs.cpp @@ -15,7 +15,7 @@ be_visitor_operation_svs::be_visitor_operation_svs ( be_visitor_context *ctx) : be_visitor_scope (ctx), - scope_ (0) + scope_ (nullptr) { } @@ -39,7 +39,7 @@ be_visitor_operation_svs::visit_operation (be_operation *node) // Retrieve the operation return type. be_type *bt = dynamic_cast<be_type*> (node->return_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "be_visitor_operation_svs::" diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp index 8096821e52e..c52392fb9e5 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp @@ -76,7 +76,7 @@ int be_visitor_operation_rettype::visit_predefined_type ( be_predefined_type *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -195,7 +195,7 @@ be_visitor_operation_rettype::visit_typedef ( -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -286,9 +286,9 @@ be_visitor_operation_rettype::visit_valuebox ( const char * be_visitor_operation_rettype::type_name (be_type *node) { - be_type *bt = 0; + be_type *bt = nullptr; - if (this->ctx_->alias () != 0) + if (this->ctx_->alias () != nullptr) { // A typedefed return type. bt = this->ctx_->alias (); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp index dffded06c3e..dc7f816c4fb 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp @@ -189,7 +189,7 @@ be_visitor_operation_rettype_return_cs::visit_typedef ( -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp index 6f39ed187ba..b179225b8c5 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp @@ -39,11 +39,11 @@ int be_visitor_operation_smart_proxy_cs::visit_operation (be_operation *node) be_interface *intf = dynamic_cast<be_interface*> (s); - if (intf == 0) + if (intf == nullptr) { be_porttype *pt = dynamic_cast<be_porttype*> (s); - if (pt == 0) + if (pt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation_") diff --git a/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp index df342b6eb2d..8669184bf1d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp @@ -129,7 +129,7 @@ int be_visitor_operation_tie_ss::visit_operation (be_operation *node) be_predefined_type *pdt = dynamic_cast<be_predefined_type*> (bt); - if (pdt == 0 || pdt->pt () != AST_PredefinedType::PT_void) + if (pdt == nullptr || pdt->pt () != AST_PredefinedType::PT_void) { *os << "return "; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp index 6f7c97458de..5680ed71cca 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp @@ -47,7 +47,7 @@ be_visitor_operation_upcall_command_ss::visit ( -1); } - be_module *module = 0; + be_module *module = nullptr; TAO_OutStream & os = *this->ctx_->stream (); @@ -59,7 +59,7 @@ be_visitor_operation_upcall_command_ss::visit ( { module = dynamic_cast<be_module*> (intf->defined_in ()); - if (module == 0) + if (module == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_operation_") @@ -200,7 +200,7 @@ be_visitor_operation_upcall_command_ss::visit ( os << be_uidt_nl << "};"; - if (module != 0) + if (module != nullptr) { be_util::gen_nested_namespace_end (&os, module); } @@ -239,7 +239,7 @@ be_visitor_operation_upcall_command_ss::gen_upcall ( be_valuetype *value_type = dynamic_cast<be_valuetype*> (argument->field_type ()); - if (value_type != 0) + if (value_type != nullptr) { static const char *excepholder = "ExceptionHolder"; static const size_t excepholder_len = diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp index 44adb8fb6c7..30a4e8cad78 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp @@ -17,7 +17,7 @@ be_visitor_root_ch::be_visitor_root_ch (be_visitor_context *ctx) : be_visitor_root (ctx), - o_ (0) + o_ (nullptr) { } @@ -185,7 +185,7 @@ be_visitor_root_ch::gen_ref_counting_overrides (void) } size_t index = 0; - be_interface_fwd *ifwd = 0; + be_interface_fwd *ifwd = nullptr; *o_ << be_nl_2 << "// TAO_IDL - Generated from" << be_nl @@ -231,7 +231,7 @@ be_visitor_root_ch::gen_static_corba_overrides (void) } size_t index = 0; - AST_Interface *i = 0; + AST_Interface *i = nullptr; *o_ << be_nl_2 << "// TAO_IDL - Generated from" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_scope.cpp b/TAO/TAO_IDL/be/be_visitor_scope.cpp index e14d67a2e85..3bb7e5b17d6 100644 --- a/TAO/TAO_IDL/be/be_visitor_scope.cpp +++ b/TAO/TAO_IDL/be/be_visitor_scope.cpp @@ -37,7 +37,7 @@ be_visitor_scope::~be_visitor_scope (void) int be_visitor_scope::visit_scope (be_scope *node) { - if (node == 0) + if (node == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " @@ -54,7 +54,7 @@ be_visitor_scope::visit_scope (be_scope *node) { AST_Decl *d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " @@ -88,7 +88,7 @@ be_visitor_scope::visit_scope (be_scope *node) } // Send the visitor. - if (bd == 0 || bd->accept (this) == -1) + if (bd == nullptr || bd->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " @@ -134,14 +134,14 @@ be_visitor_scope::next_elem (be_decl *elem, be_decl *&successor) { be_decl *ctx_scope = this->ctx_->scope ()->decl (); - be_scope *node = 0; + be_scope *node = nullptr; - if (ctx_scope != 0) + if (ctx_scope != nullptr) { node = ctx_scope->scope (); } - if (ctx_scope == 0 || node == 0) + if (ctx_scope == nullptr || node == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::next_elem - " @@ -149,7 +149,7 @@ be_visitor_scope::next_elem (be_decl *elem, -1); } - successor = 0; + successor = nullptr; // Initialize an iterator to iterate thru our scope. for (UTL_ScopeActiveIterator si (node, UTL_Scope::IK_decls); @@ -158,7 +158,7 @@ be_visitor_scope::next_elem (be_decl *elem, { be_decl *bd = dynamic_cast<be_decl*> (si.item ()); - if (bd == 0) + if (bd == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::next_elem - " @@ -182,7 +182,7 @@ be_visitor_scope::next_elem (be_decl *elem, successor = dynamic_cast<be_decl*> (si.item ()); - if (successor == 0) + if (successor == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::next_elem - " @@ -200,22 +200,22 @@ be_visitor_scope::next_elem (be_decl *elem, bool be_visitor_scope::last_node (be_decl *bd) { - be_decl *next = 0; + be_decl *next = nullptr; (void) this->next_elem (bd, next); - return (next == 0); + return (next == nullptr); } bool be_visitor_scope::last_inout_or_out_node (be_decl *) { // Return true if we are the last inout or out argument. - be_decl *next = 0; + be_decl *next = nullptr; (void) this->next_elem (this->ctx_->node (), next); - while (next != 0) + while (next != nullptr) { be_argument *arg = dynamic_cast<be_argument*> (next); @@ -226,7 +226,7 @@ be_visitor_scope::last_inout_or_out_node (be_decl *) return false; } - be_decl *next_next = 0; + be_decl *next_next = nullptr; this->next_elem (next, next_next); diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp index 664ada9f408..ec746bdf168 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp @@ -66,7 +66,7 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node) name = node->full_name (); } - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { AST_Decl *d = node; @@ -86,7 +86,7 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace // corresponding to their module, others do not. @@ -150,7 +150,7 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp index a8a4e22d44d..fa837b11d13 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp @@ -71,8 +71,8 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) { tc = ANY_ARRAY; } - else if (dynamic_cast<be_interface*> (bt) != 0 - && dynamic_cast<be_valuetype*> (bt) == 0) + else if (dynamic_cast<be_interface*> (bt) != nullptr + && dynamic_cast<be_valuetype*> (bt) == nullptr) { tc = ANY_OBJREF; } @@ -184,7 +184,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) // for the TypeCode to pass to the Any operator impls. be_typedef *td = this->ctx_->tdef (); - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { AST_Decl *d = node; @@ -204,7 +204,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace // corresponding to their module, others do not. @@ -224,7 +224,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl - << "::" << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << "::" << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt << be_uidt_nl << "}" << be_nl_2; @@ -240,7 +240,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl - << "::" << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << "::" << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt << be_uidt_nl << "}" << be_nl_2; @@ -256,7 +256,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl - << "::" << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << "::" << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt << be_uidt_nl << "}"; @@ -283,7 +283,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl - << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt << be_uidt_nl << "}" << be_nl_2; @@ -299,7 +299,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl - << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt << be_uidt_nl << "}" << be_nl_2; @@ -315,14 +315,14 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl - << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl + << (td != nullptr ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt << be_uidt_nl << "}"; *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp index b8b8398c3bd..885209896a0 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp @@ -31,7 +31,7 @@ int be_visitor_sequence_buffer_type::visit_node (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -269,6 +269,6 @@ be_visitor_sequence_buffer_type::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp index a5dd172bc0f..0b0c57e14de 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp @@ -66,7 +66,7 @@ be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node) // If we're an anonymous sequence, we must protect against // being declared more than once. - if (tdef == 0) + if (tdef == nullptr) { *os << "\n\n#if !defined _TAO_CDR_OP_" << node->flat_name () << "_H_" @@ -122,7 +122,7 @@ be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node) *os << be_nl << be_global->core_versioning_end () << be_nl; - if (tdef == 0) + if (tdef == nullptr) { *os << "\n\n#endif /* _TAO_CDR_OP_" << node->flat_name () << "_H_ */"; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_base.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_base.cpp index 6602ec8030e..fa00636f9b9 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_base.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_base.cpp @@ -41,7 +41,7 @@ int be_visitor_sequence_base::visit_node (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -172,7 +172,7 @@ be_visitor_sequence_base::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -194,7 +194,7 @@ int be_visitor_sequence_base_template_args::visit_interface (be_interface *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -225,7 +225,7 @@ be_visitor_sequence_base_template_args::visit_interface_fwd ( ) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp index 55d0a3693fd..a57da7c7e63 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -23,7 +23,7 @@ be_visitor_sequence_ch::~be_visitor_sequence_ch (void) int be_visitor_sequence_ch::visit_sequence (be_sequence *node) { - if (node->defined_in () == 0) + if (node->defined_in () == nullptr) { // The node is a nested sequence, and has had no scope defined. node->set_defined_in (DeclAsScope (this->ctx_->scope ()->decl ())); @@ -57,7 +57,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) // generation for the base type. be_type *bt = dynamic_cast<be_type*> (node->base_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_sequence_ch::") @@ -77,7 +77,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) // to create_name will not get confused and give our anonymous // sequence element type the same name as we have. be_typedef *tmp = this->ctx_->tdef (); - this->ctx_->tdef (0); + this->ctx_->tdef (nullptr); if (bt->accept (this) != 0) { @@ -133,12 +133,12 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) /// and _outs. They may get redefined and reinstated later. if (!be_global->alt_mapping () || !node->unbounded ()) { - if (this->ctx_->tdef () != 0) + if (this->ctx_->tdef () != nullptr) { *os << "class " << node->local_name () << ";"; } - if (this->ctx_->tdef () != 0) + if (this->ctx_->tdef () != nullptr) { this->gen_varout_typedefs (node, bt); } @@ -263,14 +263,14 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) // TAO provides extensions for octet sequences, first find out if // the base type is an octet (or an alias for octet). - be_predefined_type *predef = 0; + be_predefined_type *predef = nullptr; if (bt->base_node_type () == AST_Type::NT_pre_defined) { be_typedef* alias = dynamic_cast<be_typedef*> (bt); - if (alias == 0) + if (alias == nullptr) { predef = dynamic_cast<be_predefined_type*> (bt); } @@ -284,7 +284,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) } // Now generate the extension... - if (predef != 0 + if (predef != nullptr && predef->pt () == AST_PredefinedType::PT_octet && node->unbounded () && !be_global->alt_mapping ()) diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp index f009869b00c..58fc4920cc1 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp @@ -55,7 +55,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) be_type *bt = dynamic_cast<be_type*> (node->base_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_sequence_cs::") @@ -74,7 +74,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) // to create_name will not get confused and give our anonymous // sequence element type the same name as we have. be_typedef *tmp = this->ctx_->tdef (); - this->ctx_->tdef (0); + this->ctx_->tdef (nullptr); if (bt->accept (this) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp index b27043e3911..f71334af9f7 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp @@ -41,7 +41,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { AST_Decl *d = node; @@ -61,7 +61,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace // corresponding to their module, others do not. @@ -95,7 +95,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } @@ -117,7 +117,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) int be_visitor_structure_any_op_ch::visit_field (be_field *node) { - be_type *bt = 0; + be_type *bt = nullptr; // First generate the type information. bt = dynamic_cast<be_type*> (node->field_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index a73227ce818..3364f651beb 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -77,7 +77,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) } - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested ()) { AST_Decl *d = node; @@ -97,7 +97,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) } } - if (module != 0) + if (module != nullptr) { // Some compilers handle "any" operators in a namespace corresponding // to their module, others do not. @@ -213,7 +213,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_template_export.cpp b/TAO/TAO_IDL/be/be_visitor_template_export.cpp index f4001260781..61e90903056 100644 --- a/TAO/TAO_IDL/be/be_visitor_template_export.cpp +++ b/TAO/TAO_IDL/be/be_visitor_template_export.cpp @@ -75,14 +75,14 @@ be_visitor_template_export::visit_sequence (be_sequence *node) // TAO provides extensions for octet sequences, first find out if // the base type is an octet (or an alias for octet). - be_predefined_type *predef = 0; + be_predefined_type *predef = nullptr; if (bt->base_node_type () == AST_Type::NT_pre_defined) { be_typedef* alias = dynamic_cast<be_typedef*> (bt); - if (alias == 0) + if (alias == nullptr) { predef = dynamic_cast<be_predefined_type*> (bt); } @@ -96,7 +96,7 @@ be_visitor_template_export::visit_sequence (be_sequence *node) } // When it is a sequence add a special guard - if (predef != 0 && predef->pt () == AST_PredefinedType::PT_octet + if (predef != nullptr && predef->pt () == AST_PredefinedType::PT_octet && node->unbounded ()) { *os << "\n#if (TAO_NO_COPY_OCTET_SEQUENCES == 0)"; @@ -119,7 +119,7 @@ be_visitor_template_export::visit_sequence (be_sequence *node) *os << ";" << be_uidt; - if (predef != 0 && predef->pt () == AST_PredefinedType::PT_octet + if (predef != nullptr && predef->pt () == AST_PredefinedType::PT_octet && node->unbounded ()) { *os << "\n#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 0 */"; @@ -143,6 +143,6 @@ be_visitor_template_export::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index 5e8b8b590d0..49ffb14b144 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -485,7 +485,7 @@ be_visitor_traits::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); node->cli_traits_gen (true); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp index 9209875fc37..74177b36dbc 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp @@ -30,7 +30,7 @@ TAO::be_visitor_objref_typecode::visit_interface (be_interface * node) static char const local_interface[] = "local_interface"; static char const objref[] = "objref"; - char const * kind = 0; + char const * kind = nullptr; if (dynamic_cast<be_component *> (node)) kind = component; diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp index 26fb914ad63..ff909252566 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp @@ -39,7 +39,7 @@ TAO::be_visitor_struct_typecode::visit_structure (be_structure * node) // we're repeated and we're recursive so just leave return 0; } - else if (this->queue_insert (this->tc_queue_, node, 0) == 0) + else if (this->queue_insert (this->tc_queue_, node, 0) == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_struct_typecode::" @@ -175,7 +175,7 @@ TAO::be_visitor_struct_typecode::visit (AST_Structure * node, int TAO::be_visitor_struct_typecode::gen_member_typecodes (AST_Structure * node) { - AST_Field ** member_ptr = 0; + AST_Field ** member_ptr = nullptr; ACE_CDR::ULong const count = node->nfields (); for (ACE_CDR::ULong i = 0; i < count; ++i) @@ -217,7 +217,7 @@ TAO::be_visitor_struct_typecode::gen_member_typecodes (AST_Structure * node) int TAO::be_visitor_struct_typecode::visit_members (AST_Structure * node) { - AST_Field ** member_ptr = 0; + AST_Field ** member_ptr = nullptr; ACE_CDR::ULong const count = node->nfields (); TAO_OutStream & os = *this->ctx_->stream (); diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp index fa9c70aa9b7..9be0d9b310e 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -29,7 +29,7 @@ Scoped_Compute_Queue_Guard::Scoped_Compute_Queue_Guard ( ) :customer_ (customer) { - if (customer_ != 0) + if (customer_ != nullptr) { // Reset the compute queue to set the stage for computing our // encapsulation length. @@ -39,7 +39,7 @@ Scoped_Compute_Queue_Guard::Scoped_Compute_Queue_Guard ( Scoped_Compute_Queue_Guard::~Scoped_Compute_Queue_Guard (void) { - if (customer_ != 0) + if (customer_ != nullptr) { // Reset the compute queue since we must not affect computation of other // nodes. @@ -100,7 +100,7 @@ be_visitor_typecode_defn::gen_typecode_ptr (be_type * node) be_module * const module = dynamic_cast<be_module*> (node->defined_in ()); - if (module == 0) + if (module == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_typecode_defn::") @@ -190,7 +190,7 @@ be_visitor_typecode_defn::gen_forward_declared_typecode (be_type * node) be_module * const module = dynamic_cast<be_module*> (node->defined_in ()); - if (module == 0) + if (module == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_typecode_defn::") @@ -238,7 +238,7 @@ be_visitor_typecode_defn::is_typecode_generation_required (be_type * node) true); be_interface * const intf = - d != 0 ? dynamic_cast<be_interface*> (d) : 0; + d != nullptr ? dynamic_cast<be_interface*> (d) : nullptr; if (intf && intf->is_defined ()) { @@ -711,9 +711,9 @@ be_visitor_typecode_defn::queue_insert ( ACE_CDR::Long offset ) { - be_visitor_typecode_defn::QNode *qnode = 0; + be_visitor_typecode_defn::QNode *qnode = nullptr; - ACE_NEW_RETURN (qnode, be_visitor_typecode_defn::QNode, 0); + ACE_NEW_RETURN (qnode, be_visitor_typecode_defn::QNode, nullptr); qnode->node = node; qnode->offset = offset; @@ -741,8 +741,8 @@ be_visitor_typecode_defn::queue_lookup ( !iter.done (); iter.advance ()) { - be_visitor_typecode_defn::QNode **addr = 0; - be_visitor_typecode_defn::QNode *item = 0; + be_visitor_typecode_defn::QNode **addr = nullptr; + be_visitor_typecode_defn::QNode *item = nullptr; iter.next (addr); item = *addr; @@ -754,7 +754,7 @@ be_visitor_typecode_defn::queue_lookup ( } } - return 0; + return nullptr; } void @@ -763,7 +763,7 @@ queue_reset (ACE_Unbounded_Queue <be_visitor_typecode_defn::QNode *> & queue) { while (!queue.is_empty ()) { - be_visitor_typecode_defn::QNode * qnode = 0; + be_visitor_typecode_defn::QNode * qnode = nullptr; (void) queue.dequeue_head (qnode); delete qnode; } diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp index 0e25abc58b3..4ed2f4d340a 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp @@ -39,7 +39,7 @@ TAO::be_visitor_union_typecode::visit_union (be_union * node) // we're repeated and we're recursive so just leave return 0; } - else if (this->queue_insert (this->tc_queue_, node, 0) == 0) + else if (this->queue_insert (this->tc_queue_, node, 0) == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_typecode::" @@ -67,7 +67,7 @@ TAO::be_visitor_union_typecode::visit_union (be_union * node) be_type * const discriminant_type = dynamic_cast<be_type*> (node->disc_type ()); - ACE_ASSERT (discriminant_type != 0); + ACE_ASSERT (discriminant_type != nullptr); if (this->gen_case_typecodes (node) != 0) { @@ -132,7 +132,7 @@ TAO::be_visitor_union_typecode::visit_union (be_union * node) int TAO::be_visitor_union_typecode::gen_case_typecodes (be_union * node) { - AST_Field ** member_ptr = 0; + AST_Field ** member_ptr = nullptr; ACE_CDR::ULong const count = node->nfields (); @@ -189,7 +189,7 @@ TAO::be_visitor_union_typecode::visit_cases (be_union * node) ACE_CDR::ULong const countFields = node->nfields (); for (ACE_CDR::ULong fieldNumber = 0u; fieldNumber < countFields; ++fieldNumber) { - AST_Field ** member_ptr = 0; + AST_Field ** member_ptr = nullptr; node->field (member_ptr, fieldNumber); be_type * const type = @@ -198,7 +198,7 @@ TAO::be_visitor_union_typecode::visit_cases (be_union * node) be_union_branch * const branch = dynamic_cast<be_union_branch*> (*member_ptr); - ACE_ASSERT (branch != 0); + ACE_ASSERT (branch != nullptr); ACE_CDR::ULong numberOfLabels = branch->label_list_length (); // Check for a default branch for the current union field. diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp index a6c42848bb5..0fce2fa7734 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp @@ -39,7 +39,7 @@ TAO::be_visitor_value_typecode::visit_valuetype (be_valuetype * node) // we're repeated and we're recursive so just leave return 0; } - else if (this->queue_insert (this->tc_queue_, node, 0) == 0) + else if (this->queue_insert (this->tc_queue_, node, 0) == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_value_typecode::" diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp index 446cff9a3b0..5b204eddd37 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_ch.cpp @@ -60,7 +60,7 @@ be_visitor_typedef_any_op_ch::visit_typedef (be_typedef *node) // the type maybe. In the latter, we just need typedefs for the type and all // associated _var, _out, and other types. - be_type *bt = 0; // base type + be_type *bt = nullptr; // base type if (this->ctx_->tdef ()) { @@ -92,7 +92,7 @@ be_visitor_typedef_any_op_ch::visit_typedef (be_typedef *node) "failed to accept visitor\n"), -1); } - this->ctx_->alias (0); // reset + this->ctx_->alias (nullptr); // reset } else { @@ -122,7 +122,7 @@ be_visitor_typedef_any_op_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->tdef (0); // reset + this->ctx_->tdef (nullptr); // reset } node->cli_hdr_any_op_gen (1); @@ -132,7 +132,7 @@ be_visitor_typedef_any_op_ch::visit_typedef (be_typedef *node) int be_visitor_typedef_any_op_ch::visit_array (be_array *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -163,7 +163,7 @@ be_visitor_typedef_any_op_ch::visit_array (be_array *node) int be_visitor_typedef_any_op_ch::visit_enum (be_enum *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -193,7 +193,7 @@ be_visitor_typedef_any_op_ch::visit_enum (be_enum *node) int be_visitor_typedef_any_op_ch::visit_sequence (be_sequence *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -223,7 +223,7 @@ be_visitor_typedef_any_op_ch::visit_sequence (be_sequence *node) int be_visitor_typedef_any_op_ch::visit_structure (be_structure *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -253,7 +253,7 @@ be_visitor_typedef_any_op_ch::visit_structure (be_structure *node) int be_visitor_typedef_any_op_ch::visit_union (be_union *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp index 1ce7042fdac..c1d0de84000 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/any_op_cs.cpp @@ -59,7 +59,7 @@ be_visitor_typedef_any_op_cs::visit_typedef (be_typedef *node) // the type maybe. In the latter, we just need typedefs for the type and all // associated _var, _out, and other types. - be_type *bt = 0; // base type + be_type *bt = nullptr; // base type if (this->ctx_->tdef ()) { @@ -92,7 +92,7 @@ be_visitor_typedef_any_op_cs::visit_typedef (be_typedef *node) ), -1); } - this->ctx_->alias (0); // reset + this->ctx_->alias (nullptr); // reset } else { @@ -122,7 +122,7 @@ be_visitor_typedef_any_op_cs::visit_typedef (be_typedef *node) ), -1); } - this->ctx_->tdef (0); // Reset. + this->ctx_->tdef (nullptr); // Reset. } node->cli_stub_any_op_gen (true); @@ -132,7 +132,7 @@ be_visitor_typedef_any_op_cs::visit_typedef (be_typedef *node) int be_visitor_typedef_any_op_cs::visit_array (be_array *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef bt = this->ctx_->alias (); @@ -160,7 +160,7 @@ be_visitor_typedef_any_op_cs::visit_array (be_array *node) int be_visitor_typedef_any_op_cs::visit_enum (be_enum *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef bt = this->ctx_->alias (); @@ -187,7 +187,7 @@ be_visitor_typedef_any_op_cs::visit_enum (be_enum *node) int be_visitor_typedef_any_op_cs::visit_sequence (be_sequence *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef bt = this->ctx_->alias (); @@ -214,7 +214,7 @@ be_visitor_typedef_any_op_cs::visit_sequence (be_sequence *node) int be_visitor_typedef_any_op_cs::visit_structure (be_structure *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef bt = this->ctx_->alias (); @@ -241,7 +241,7 @@ be_visitor_typedef_any_op_cs::visit_structure (be_structure *node) int be_visitor_typedef_any_op_cs::visit_union (be_union *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef bt = this->ctx_->alias (); diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp index 272d02c5658..f01cf991533 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_ch.cpp @@ -59,7 +59,7 @@ be_visitor_typedef_cdr_op_ch::visit_typedef (be_typedef *node) // the type maybe. In the latter, we just need typedefs for the type and all // associated _var, _out, and other types. - be_type *bt = 0; // base type + be_type *bt = nullptr; // base type if (this->ctx_->tdef ()) { @@ -92,7 +92,7 @@ be_visitor_typedef_cdr_op_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); // reset + this->ctx_->alias (nullptr); // reset } else { @@ -122,7 +122,7 @@ be_visitor_typedef_cdr_op_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->tdef (0); + this->ctx_->tdef (nullptr); } node->cli_hdr_cdr_op_gen (1); @@ -132,7 +132,7 @@ be_visitor_typedef_cdr_op_ch::visit_typedef (be_typedef *node) int be_visitor_typedef_cdr_op_ch::visit_array (be_array *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -163,7 +163,7 @@ be_visitor_typedef_cdr_op_ch::visit_array (be_array *node) int be_visitor_typedef_cdr_op_ch::visit_enum (be_enum *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -193,7 +193,7 @@ be_visitor_typedef_cdr_op_ch::visit_enum (be_enum *node) int be_visitor_typedef_cdr_op_ch::visit_sequence (be_sequence *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -223,7 +223,7 @@ be_visitor_typedef_cdr_op_ch::visit_sequence (be_sequence *node) int be_visitor_typedef_cdr_op_ch::visit_structure (be_structure *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -253,7 +253,7 @@ be_visitor_typedef_cdr_op_ch::visit_structure (be_structure *node) int be_visitor_typedef_cdr_op_ch::visit_union (be_union *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp index c7bc2252879..2b0f9ef0bae 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/cdr_op_cs.cpp @@ -55,7 +55,7 @@ be_visitor_typedef_cdr_op_cs::visit_typedef (be_typedef *node) // the type maybe. In the latter, we just need typedefs for the type and all // associated _var, _out, and other types. - be_type *bt = 0; // base type + be_type *bt = nullptr; // base type if (this->ctx_->tdef ()) { @@ -88,7 +88,7 @@ be_visitor_typedef_cdr_op_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); // reset + this->ctx_->alias (nullptr); // reset } else { @@ -118,7 +118,7 @@ be_visitor_typedef_cdr_op_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->tdef (0); // reset + this->ctx_->tdef (nullptr); // reset } node->cli_stub_cdr_op_gen (1); @@ -128,7 +128,7 @@ be_visitor_typedef_cdr_op_cs::visit_typedef (be_typedef *node) int be_visitor_typedef_cdr_op_cs::visit_array (be_array *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef { @@ -160,7 +160,7 @@ be_visitor_typedef_cdr_op_cs::visit_array (be_array *node) int be_visitor_typedef_cdr_op_cs::visit_sequence (be_sequence *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef { @@ -191,7 +191,7 @@ be_visitor_typedef_cdr_op_cs::visit_sequence (be_sequence *node) int be_visitor_typedef_cdr_op_cs::visit_structure (be_structure *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef { @@ -222,7 +222,7 @@ be_visitor_typedef_cdr_op_cs::visit_structure (be_structure *node) int be_visitor_typedef_cdr_op_cs::visit_union (be_union *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef { diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp index 59af00701bc..18af0e03647 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp @@ -48,7 +48,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) // the type maybe. In the latter, we just need typedefs for the type and all // associated _var, _out, and other types. - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->tdef ()) { @@ -81,7 +81,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); } else { @@ -130,7 +130,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) } } - this->ctx_->tdef (0); + this->ctx_->tdef (nullptr); } return 0; @@ -142,7 +142,7 @@ be_visitor_typedef_ch::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Is the base type an alias to an array node or an actual array node. if (this->ctx_->alias ()) @@ -207,7 +207,7 @@ be_visitor_typedef_ch::visit_array (be_array *node) // If the typedef is not declared globally or in a module, the // associated array memory management function must be static. - if (scope == 0) + if (scope == nullptr) { static_decl = "static "; } @@ -261,7 +261,7 @@ be_visitor_typedef_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) @@ -305,7 +305,7 @@ be_visitor_typedef_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) @@ -354,7 +354,7 @@ be_visitor_typedef_ch::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) @@ -433,7 +433,7 @@ be_visitor_typedef_ch::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) @@ -481,7 +481,7 @@ be_visitor_typedef_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) @@ -527,7 +527,7 @@ be_visitor_typedef_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) @@ -573,7 +573,7 @@ be_visitor_typedef_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) @@ -609,7 +609,7 @@ be_visitor_typedef_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp index 04adf9b3437..b6c23ad924d 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp @@ -48,7 +48,7 @@ be_visitor_typedef_ci::visit_typedef (be_typedef *node) // the type maybe. In the latter, we just need typedefs for the type and all // associated _var, _out, and other types. - be_type *bt = 0; // base type + be_type *bt = nullptr; // base type if (this->ctx_->tdef ()) { @@ -81,7 +81,7 @@ be_visitor_typedef_ci::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); } else { @@ -111,7 +111,7 @@ be_visitor_typedef_ci::visit_typedef (be_typedef *node) -1); } - this->ctx_->tdef (0); + this->ctx_->tdef (nullptr); } return 0; @@ -122,7 +122,7 @@ be_visitor_typedef_ci::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); // output stream be_typedef *tdef = this->ctx_->tdef (); // typedef node - be_type *bt = 0; + be_type *bt = nullptr; // This doesn't catch 'typedef of a typedef' if the node is // imported, so we check for that below before generating @@ -216,7 +216,7 @@ be_visitor_typedef_ci::visit_array (be_array *node) int be_visitor_typedef_ci::visit_sequence (be_sequence *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef { @@ -247,7 +247,7 @@ be_visitor_typedef_ci::visit_sequence (be_sequence *node) int be_visitor_typedef_ci::visit_structure (be_structure *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef { @@ -278,7 +278,7 @@ be_visitor_typedef_ci::visit_structure (be_structure *node) int be_visitor_typedef_ci::visit_union (be_union *node) { - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) // typedef of a typedef { diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_cs.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_cs.cpp index 6586c0cdd74..800b1ded635 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_cs.cpp @@ -48,7 +48,7 @@ be_visitor_typedef_cs::visit_typedef (be_typedef *node) // the type maybe. In the latter, we just need typedefs for the type and all // associated _var, _out, and other types. - be_type *bt = 0; // base type + be_type *bt = nullptr; // base type if (this->ctx_->tdef ()) { @@ -81,7 +81,7 @@ be_visitor_typedef_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); } else { @@ -128,7 +128,7 @@ be_visitor_typedef_cs::visit_typedef (be_typedef *node) } - this->ctx_->tdef (0); + this->ctx_->tdef (nullptr); } return 0; @@ -137,7 +137,7 @@ be_visitor_typedef_cs::visit_typedef (be_typedef *node) int be_visitor_typedef_cs::visit_sequence (be_sequence *node) { - be_type *bt = 0; + be_type *bt = nullptr; // Typedef of a typedef? if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp index 4fe614a3ad9..4340d619a71 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp @@ -36,14 +36,14 @@ be_visitor_union_any_op_ch::visit_union (be_union *node) *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - be_module *module = 0; + be_module *module = nullptr; AST_Decl *decl = node; if (decl->is_nested ()) { if (node->defined_in ()->scope_node_type () == AST_Decl::NT_interface) { - be_interface *intf = 0; + be_interface *intf = nullptr; intf = dynamic_cast<be_interface*> (node->defined_in ()); decl = intf; } @@ -94,7 +94,7 @@ be_visitor_union_any_op_ch::visit_union (be_union *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } @@ -107,7 +107,7 @@ be_visitor_union_any_op_ch::visit_union (be_union *node) AST_Decl *d = si.item (); be_enum *e = dynamic_cast<be_enum*> (d); - if (e != 0) + if (e != nullptr) { be_visitor_enum_any_op_ch visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index cecfe376499..26c6f573fd8 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -70,14 +70,14 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) *os << be_global->core_versioning_end () << be_nl; - be_module *module = 0; + be_module *module = nullptr; AST_Decl *decl = node; if (decl->is_nested ()) { if (node->defined_in ()->scope_node_type () == AST_Decl::NT_interface) { - be_interface *intf = 0; + be_interface *intf = nullptr; intf = dynamic_cast<be_interface*> (node->defined_in ()); decl = intf; } @@ -209,7 +209,7 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } @@ -222,7 +222,7 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) AST_Decl *d = si.item (); be_enum *e = dynamic_cast<be_enum*> (d); - if (e != 0) + if (e != nullptr) { be_visitor_enum_any_op_cs visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp index 41125edc8cd..09c1b95f3dc 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp @@ -66,7 +66,7 @@ be_visitor_union_cdr_op_ch::visit_union (be_union *node) AST_Decl *d = si.item (); be_enum *e = dynamic_cast<be_enum*> (d); - if (e != 0) + if (e != nullptr) { be_visitor_enum_cdr_op_ch visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp index 3e4cb98979b..bf306325ae5 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp @@ -43,7 +43,7 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) AST_Decl *d = si.item (); be_enum *e = dynamic_cast<be_enum*> (d); - if (e != 0) + if (e != nullptr) { be_visitor_enum_cdr_op_cs visitor (&ctx); @@ -240,7 +240,7 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) *os << "return result;" << be_uidt_nl << "}" << be_nl; - bool use_underscore = (this->ctx_->tdef () == 0); + bool use_underscore = (this->ctx_->tdef () == nullptr); if (be_global->gen_ostream_operators ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp index 6f354a6592a..05635017cbe 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp @@ -27,7 +27,7 @@ be_visitor_union_discriminant_ch::visit_enum (be_enum *node) // Get the enclosing union backend. be_union *bu = dynamic_cast<be_union*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -82,7 +82,7 @@ be_visitor_union_discriminant_ch::visit_predefined_type (be_predefined_type // get the enclosing union backend. be_union *bu = dynamic_cast<be_union*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -125,6 +125,6 @@ be_visitor_union_discriminant_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp index e2f058bf507..253e74a2590 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp @@ -26,7 +26,7 @@ be_visitor_union_discriminant_ci::visit_enum (be_enum *node) { be_union *bu = dynamic_cast<be_union*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -116,7 +116,7 @@ be_visitor_union_discriminant_ci::visit_predefined_type ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -235,6 +235,6 @@ be_visitor_union_discriminant_ci::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_cs.cpp index f18af597266..cd40472844f 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_cs.cpp @@ -27,7 +27,7 @@ be_visitor_union_discriminant_cs::visit_enum (be_enum *node) { be_union *bu = dynamic_cast<be_union*> (this->ctx_->node ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_union/union.cpp b/TAO/TAO_IDL/be/be_visitor_union/union.cpp index 0e1fd1a9960..52a9c702b14 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union.cpp @@ -165,7 +165,7 @@ be_visitor_union_cdr_op_cs::pre_process (be_decl *bd) dynamic_cast<be_union_branch*> (bd); // Could be a type decl. - if (b == 0) + if (b == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp index fdadd8546de..6c12130958f 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp @@ -89,11 +89,11 @@ int be_visitor_union_cs::visit_union (be_union *node) *os << "this->disc_ = "; UTL_ScopeActiveIterator si (node, UTL_Scope::IK_decls); - be_union_branch *ub = 0; + be_union_branch *ub = nullptr; // In case we have some bogus enum values from an enum declared // in our scope. - while (ub == 0) + while (ub == nullptr) { // Just get the union's first member. AST_Decl *d = si.item (); diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp index 442fae3d029..1852db1bc2c 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp @@ -167,7 +167,7 @@ be_visitor_union_branch_cdr_op_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp index 7d4654d9cd9..514515ff7d9 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp @@ -87,7 +87,7 @@ be_visitor_union_branch_cdr_op_cs::visit_array (be_array *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_cs::" @@ -187,7 +187,7 @@ be_visitor_union_branch_cdr_op_cs::visit_enum (be_enum *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_cs::" @@ -262,7 +262,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface (be_interface *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_cs::" @@ -342,7 +342,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface_fwd (be_interface_fwd *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_cs::" @@ -427,7 +427,7 @@ be_visitor_union_branch_cdr_op_cs::emit_valuetype_common (be_type *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_cs::" @@ -485,7 +485,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_cs::" @@ -673,7 +673,7 @@ be_visitor_union_branch_cdr_op_cs::visit_sequence (be_sequence *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_ci::" @@ -743,7 +743,7 @@ be_visitor_union_branch_cdr_op_cs::visit_string (be_string *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_ci::" @@ -866,7 +866,7 @@ be_visitor_union_branch_cdr_op_cs::visit_structure (be_structure *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_ci::" @@ -928,7 +928,7 @@ be_visitor_union_branch_cdr_op_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -963,7 +963,7 @@ be_visitor_union_branch_cdr_op_cs::visit_union (be_union *node) be_union_branch *f = dynamic_cast<be_union_branch*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_cdr_op_ci::" @@ -1028,7 +1028,7 @@ be_visitor_union_branch_cdr_op_cs::explicit_default (void) !si.is_done (); si.next ()) { - be_union_branch *bub = 0; // union branch node + be_union_branch *bub = nullptr; // union branch node AST_Decl *d = si.item (); diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp index 8eed1cecc00..502263e8f1c 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp @@ -63,7 +63,7 @@ be_visitor_union_branch_private_ch::visit_array (be_array *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -113,7 +113,7 @@ be_visitor_union_branch_private_ch::visit_enum (be_enum *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -152,7 +152,7 @@ be_visitor_union_branch_private_ch::visit_interface (be_interface *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -191,7 +191,7 @@ be_visitor_union_branch_private_ch::visit_interface_fwd (be_interface_fwd *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -230,7 +230,7 @@ be_visitor_union_branch_private_ch::visit_valuebox (be_valuebox *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -269,7 +269,7 @@ be_visitor_union_branch_private_ch::visit_valuetype (be_valuetype *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -308,7 +308,7 @@ be_visitor_union_branch_private_ch::visit_valuetype_fwd (be_valuetype_fwd *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -349,11 +349,11 @@ be_visitor_union_branch_private_ch::visit_predefined_type ( { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; be_typedef *td = this->ctx_->alias (); // Check if we are visiting this node via a visit to a typedef node - if (td != 0) + if (td != nullptr) { bt = td; } @@ -417,7 +417,7 @@ be_visitor_union_branch_private_ch::visit_sequence (be_sequence *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -492,7 +492,7 @@ be_visitor_union_branch_private_ch::visit_structure (be_structure *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) @@ -563,7 +563,7 @@ be_visitor_union_branch_private_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -572,7 +572,7 @@ be_visitor_union_branch_private_ch::visit_union (be_union *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp index dff99270805..584f5733c91 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp @@ -125,7 +125,7 @@ be_visitor_union_branch_public_assign_cs::visit_array (be_array *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -198,7 +198,7 @@ be_visitor_union_branch_public_assign_cs::visit_enum (be_enum *) be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_assign_cs::" @@ -225,7 +225,7 @@ be_visitor_union_branch_public_assign_cs::visit_interface (be_interface *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -322,7 +322,7 @@ be_visitor_union_branch_public_assign_cs::visit_interface_fwd ( dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -437,7 +437,7 @@ be_visitor_union_branch_public_assign_cs::emit_valuetype_common (be_type *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -507,7 +507,7 @@ be_visitor_union_branch_public_assign_cs::visit_predefined_type ( dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -619,7 +619,7 @@ be_visitor_union_branch_public_assign_cs::visit_sequence (be_sequence *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -685,7 +685,7 @@ be_visitor_union_branch_public_assign_cs::visit_string (be_string *node) be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_assign_cs::" @@ -720,7 +720,7 @@ be_visitor_union_branch_public_assign_cs::visit_structure (be_structure *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -814,7 +814,7 @@ be_visitor_union_branch_public_assign_cs::visit_typedef (be_typedef *node) ), -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -825,7 +825,7 @@ be_visitor_union_branch_public_assign_cs::visit_union (be_union *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp index a9e96e188e9..21dfe6c92e0 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp @@ -62,7 +62,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -144,7 +144,7 @@ be_visitor_union_branch_public_ch::visit_enum (be_enum *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -206,7 +206,7 @@ be_visitor_union_branch_public_ch::visit_interface (be_interface *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -249,7 +249,7 @@ be_visitor_union_branch_public_ch::visit_interface_fwd (be_interface_fwd *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -292,7 +292,7 @@ be_visitor_union_branch_public_ch::visit_valuebox (be_valuebox *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -335,7 +335,7 @@ be_visitor_union_branch_public_ch::visit_valuetype (be_valuetype *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -378,7 +378,7 @@ be_visitor_union_branch_public_ch::visit_valuetype_fwd (be_valuetype_fwd *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -421,11 +421,11 @@ be_visitor_union_branch_public_ch::visit_predefined_type (be_predefined_type *no { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; be_typedef *td = this->ctx_->alias (); // Check if we are visiting this via a visit to a typedef node. - if (td != 0) + if (td != nullptr) { bt = td; } @@ -493,7 +493,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -611,7 +611,7 @@ be_visitor_union_branch_public_ch::visit_structure (be_structure *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -694,7 +694,7 @@ be_visitor_union_branch_public_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -703,7 +703,7 @@ be_visitor_union_branch_public_ch::visit_union (be_union *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp index c6d85ab4ea4..59f85375335 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp @@ -66,7 +66,7 @@ be_visitor_union_branch_public_ci::visit_array (be_array *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -201,7 +201,7 @@ be_visitor_union_branch_public_ci::visit_enum (be_enum *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // heck if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -272,7 +272,7 @@ be_visitor_union_branch_public_ci::visit_interface (be_interface *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -362,7 +362,7 @@ be_visitor_union_branch_public_ci::visit_interface_fwd (be_interface_fwd *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -470,7 +470,7 @@ be_visitor_union_branch_public_ci::emit_valuetype_common (be_type *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -549,7 +549,7 @@ be_visitor_union_branch_public_ci::visit_predefined_type ( dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -761,7 +761,7 @@ be_visitor_union_branch_public_ci::visit_sequence (be_sequence *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -844,7 +844,7 @@ be_visitor_union_branch_public_ci::visit_string (be_string *node) be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_ci::" @@ -1014,7 +1014,7 @@ be_visitor_union_branch_public_ci::visit_structure (be_structure *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -1170,7 +1170,7 @@ be_visitor_union_branch_public_ci::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -1181,7 +1181,7 @@ be_visitor_union_branch_public_ci::visit_union (be_union *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_constructor_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_constructor_cs.cpp index 75888dd093b..47d602193d7 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_constructor_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_constructor_cs.cpp @@ -69,7 +69,7 @@ be_visitor_union_branch_public_constructor_cs::visit_array (be_array *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -141,7 +141,7 @@ be_visitor_union_branch_public_constructor_cs::visit_predefined_type ( dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -187,7 +187,7 @@ be_visitor_union_branch_public_constructor_cs::visit_sequence (be_sequence *node dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -224,7 +224,7 @@ be_visitor_union_branch_public_constructor_cs::visit_structure (be_structure *no dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -285,7 +285,7 @@ be_visitor_union_branch_public_constructor_cs::visit_typedef (be_typedef *node) ), -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -296,7 +296,7 @@ be_visitor_union_branch_public_constructor_cs::visit_union (be_union *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp index 79bf8a03e1d..e8eaa9968e0 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp @@ -112,7 +112,7 @@ be_visitor_union_branch_public_reset_cs::visit_array (be_array *node) dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -123,7 +123,7 @@ be_visitor_union_branch_public_reset_cs::visit_array (be_array *node) bt = node; } - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -182,7 +182,7 @@ be_visitor_union_branch_public_reset_cs::visit_enum (be_enum *) be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -202,7 +202,7 @@ be_visitor_union_branch_public_reset_cs::visit_interface (be_interface *) be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -229,7 +229,7 @@ be_visitor_union_branch_public_reset_cs::visit_interface_fwd (be_interface_fwd * be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -257,7 +257,7 @@ be_visitor_union_branch_public_reset_cs::visit_valuebox ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -285,7 +285,7 @@ be_visitor_union_branch_public_reset_cs::visit_valuetype ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -313,7 +313,7 @@ be_visitor_union_branch_public_reset_cs::visit_valuetype_fwd ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -342,7 +342,7 @@ be_visitor_union_branch_public_reset_cs::visit_predefined_type ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -394,7 +394,7 @@ be_visitor_union_branch_public_reset_cs::visit_sequence ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -423,7 +423,7 @@ be_visitor_union_branch_public_reset_cs::visit_string ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -459,7 +459,7 @@ be_visitor_union_branch_public_reset_cs::visit_structure ( dynamic_cast<be_union_branch*> (this->ctx_->node ()); be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - be_type *bt = 0; + be_type *bt = nullptr; if (this->ctx_->alias ()) { @@ -470,7 +470,7 @@ be_visitor_union_branch_public_reset_cs::visit_structure ( bt = node; } - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" @@ -521,7 +521,7 @@ be_visitor_union_branch_public_reset_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -534,7 +534,7 @@ be_visitor_union_branch_public_reset_cs::visit_union ( be_union *bu = dynamic_cast<be_union*> (this->ctx_->scope ()); - if (ub == 0 || bu == 0) + if (ub == nullptr || bu == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_union_branch_public_reset_cs::" diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp index 78aea71a1dc..6507cad551c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp @@ -42,7 +42,7 @@ be_visitor_valuebox_any_op_ch::visit_valuebox (be_valuebox *node) *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested () && node->defined_in ()->scope_node_type () == AST_Decl::NT_module) @@ -97,7 +97,7 @@ be_visitor_valuebox_any_op_ch::visit_valuebox (be_valuebox *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp index 73a9d99f761..1d8e0e0e39e 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp @@ -67,7 +67,7 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) *os << be_global->core_versioning_end () << be_nl; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested () && node->defined_in ()->scope_node_type () == AST_Decl::NT_module) @@ -184,7 +184,7 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp index f3f9358ba5d..9168175a9a1 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp @@ -64,7 +64,7 @@ int be_visitor_valuebox_field_ch::visit_array (be_array *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -137,7 +137,7 @@ int be_visitor_valuebox_field_ch::visit_enum (be_enum *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -173,7 +173,7 @@ int be_visitor_valuebox_field_ch::visit_interface (be_interface *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -209,7 +209,7 @@ int be_visitor_valuebox_field_ch::visit_interface_fwd (be_interface_fwd *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -259,7 +259,7 @@ int be_visitor_valuebox_field_ch::visit_predefined_type (be_predefined_type *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -312,7 +312,7 @@ int be_visitor_valuebox_field_ch::visit_sequence (be_sequence *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -350,7 +350,7 @@ int be_visitor_valuebox_field_ch::visit_string (be_string *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -401,7 +401,7 @@ int be_visitor_valuebox_field_ch::visit_structure (be_structure *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -451,7 +451,7 @@ be_visitor_valuebox_field_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -459,7 +459,7 @@ int be_visitor_valuebox_field_ch::visit_union (be_union *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp index 30d21bb3b2a..662d0fd2b93 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp @@ -17,7 +17,7 @@ be_visitor_valuebox_field_ci::be_visitor_valuebox_field_ci ( be_visitor_context *ctx ) : be_visitor_decl (ctx), - vb_node_ (0) + vb_node_ (nullptr) { } @@ -63,7 +63,7 @@ int be_visitor_valuebox_field_ci::visit_array (be_array *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -151,7 +151,7 @@ int be_visitor_valuebox_field_ci::visit_enum (be_enum *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -188,7 +188,7 @@ int be_visitor_valuebox_field_ci::visit_interface (be_interface *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -234,7 +234,7 @@ int be_visitor_valuebox_field_ci::visit_interface_fwd (be_interface_fwd *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -308,7 +308,7 @@ int be_visitor_valuebox_field_ci::visit_predefined_type (be_predefined_type *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -370,7 +370,7 @@ int be_visitor_valuebox_field_ci::visit_sequence (be_sequence *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -407,7 +407,7 @@ int be_visitor_valuebox_field_ci::visit_string (be_string *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -465,7 +465,7 @@ int be_visitor_valuebox_field_ci::visit_structure (be_structure *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -513,7 +513,7 @@ be_visitor_valuebox_field_ci::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -521,7 +521,7 @@ int be_visitor_valuebox_field_ci::visit_union (be_union *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp index a0657150fc7..596313f333c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp @@ -17,7 +17,7 @@ be_visitor_valuebox_union_member_ci::be_visitor_valuebox_union_member_ci ( be_visitor_context *ctx ) : be_visitor_decl (ctx), - vb_node_ (0) + vb_node_ (nullptr) { } @@ -61,7 +61,7 @@ int be_visitor_valuebox_union_member_ci::visit_array (be_array *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -148,7 +148,7 @@ int be_visitor_valuebox_union_member_ci::visit_enum (be_enum *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -185,7 +185,7 @@ int be_visitor_valuebox_union_member_ci::visit_interface (be_interface *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -221,7 +221,7 @@ int be_visitor_valuebox_union_member_ci::visit_interface_fwd (be_interface_fwd *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -271,7 +271,7 @@ int be_visitor_valuebox_union_member_ci::visit_predefined_type (be_predefined_type *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -324,7 +324,7 @@ int be_visitor_valuebox_union_member_ci::visit_sequence (be_sequence *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -361,7 +361,7 @@ int be_visitor_valuebox_union_member_ci::visit_string (be_string *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -419,7 +419,7 @@ int be_visitor_valuebox_union_member_ci::visit_structure (be_structure *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -467,7 +467,7 @@ be_visitor_valuebox_union_member_ci::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -475,7 +475,7 @@ int be_visitor_valuebox_union_member_ci::visit_union (be_union *node) { be_decl *field = this->ctx_->node (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp index 6d64385f51c..f8b0beff227 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp @@ -270,7 +270,7 @@ be_visitor_valuebox_ch::visit_sequence (be_sequence *node) // generation for it. be_type *bt = dynamic_cast<be_type*> (node->base_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuebox_ch::" @@ -507,9 +507,9 @@ be_visitor_valuebox_ch::visit_structure (be_structure *node) // member. These functions have the same signatures as // acessor and modifier functions for union members. - AST_Decl *d = 0; - AST_Field *field = 0; - be_type *bt = 0; + AST_Decl *d = nullptr; + AST_Field *field = nullptr; + be_type *bt = nullptr; be_visitor_context ctx (*this->ctx_); for (UTL_ScopeActiveIterator si (node, UTL_Scope::IK_decls); @@ -518,7 +518,7 @@ be_visitor_valuebox_ch::visit_structure (be_structure *node) { d = si.item (); - if (d == 0 || (field = dynamic_cast<AST_Field*> (d)) == 0) + if (d == nullptr || (field = dynamic_cast<AST_Field*> (d)) == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_visitor_valuebox_ch::visit_structure -" @@ -608,9 +608,9 @@ be_visitor_valuebox_ch::visit_union (be_union *node) // Now generate the accessor and modifier functions for each union // member. - AST_Decl *d = 0; - AST_Field *field = 0; - be_type *bt = 0; + AST_Decl *d = nullptr; + AST_Field *field = nullptr; + be_type *bt = nullptr; be_visitor_context ctx (*this->ctx_); for (UTL_ScopeActiveIterator si (node, UTL_Scope::IK_decls); @@ -619,7 +619,7 @@ be_visitor_valuebox_ch::visit_union (be_union *node) { d = si.item (); - if (d == 0 || (field = dynamic_cast<AST_Field*> (d)) == 0) + if (d == nullptr || (field = dynamic_cast<AST_Field*> (d)) == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_visitor_valuebox_ch::visit_union -" diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp index 0df910222b4..6a3b47f6c10 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp @@ -426,7 +426,7 @@ be_visitor_valuebox_ci::visit_structure (be_structure *node) { d = si.item (); - if (d == 0 || (field = dynamic_cast<be_field*> (d)) == 0) + if (d == nullptr || (field = dynamic_cast<be_field*> (d)) == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_visitor_valuebox_cs::visit_structure -" @@ -508,7 +508,7 @@ be_visitor_valuebox_ci::visit_union (be_union *node) { d = si.item (); - if (d == 0 || (member = dynamic_cast<be_union_branch*> (d)) == 0) + if (d == nullptr || (member = dynamic_cast<be_union_branch*> (d)) == nullptr) { ACE_ERROR ((LM_ERROR, "(%N:%l) be_visitor_valuebox_ci::visit_union -" @@ -534,7 +534,7 @@ be_visitor_valuebox_ci::visit_union (be_union *node) // Retrieve the disriminant type. - be_type *bt = 0; + be_type *bt = nullptr; bt = dynamic_cast<be_type*> (node->disc_type ()); if (!bt) diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp index dd45e8f2e41..06ffc055f80 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp @@ -180,7 +180,7 @@ be_visitor_valuebox_cs::visit_valuebox (be_valuebox *node) const char * unmarshal_arg; be_predefined_type *bpt = dynamic_cast<be_predefined_type*> (bt); - if (bpt != 0) + if (bpt != nullptr) { switch (bpt->pt()) { @@ -214,7 +214,7 @@ be_visitor_valuebox_cs::visit_valuebox (be_valuebox *node) unmarshal_arg = "vb_object->_pd_value"; } } - else if (dynamic_cast<be_array*> (bt) != 0) + else if (dynamic_cast<be_array*> (bt) != nullptr) { is_array = true; unmarshal_arg = "temp"; @@ -271,7 +271,7 @@ be_visitor_valuebox_cs::visit_valuebox (be_valuebox *node) *os << "return (strm >> "; be_string *str = dynamic_cast<be_string*> (bt); - if (str != 0 && + if (str != nullptr && str->max_size ()->ev ()->u.ulval != 0) { if (str->width () == (long) sizeof (char)) @@ -450,7 +450,7 @@ be_visitor_valuebox_cs::visit_sequence (be_sequence *node) // generation for it. be_type *bt = dynamic_cast<be_type*> (node->base_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuebox_cs::" diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp index 77e138be8ab..cec1cc66c62 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp @@ -42,7 +42,7 @@ be_visitor_valuetype_any_op_ch::visit_valuetype (be_valuetype *node) *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested () && node->defined_in ()->scope_node_type () == AST_Decl::NT_module) @@ -97,7 +97,7 @@ be_visitor_valuetype_any_op_ch::visit_valuetype (be_valuetype *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp index 509937c55fa..a0c513724b9 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp @@ -66,7 +66,7 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) *os << be_global->core_versioning_end () << be_nl; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested () && node->defined_in ()->scope_node_type () == AST_Decl::NT_module) @@ -202,7 +202,7 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp index a633699f97d..699fac6e888 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp @@ -35,13 +35,13 @@ be_visitor_obv_operation_arglist::is_amh_exception_holder (be_operation *node) UTL_Scope *scope = node->defined_in (); be_interface *iface = dynamic_cast<be_interface*> (scope); - if (iface != 0) + if (iface != nullptr) { if (ACE_OS::strncmp (iface->local_name (), "AMH_", 4) == 0) { const char *last_E = ACE_OS::strrchr (iface->full_name (), 'E'); - if (last_E != 0 + if (last_E != nullptr && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0) { return true; @@ -124,13 +124,13 @@ be_visitor_obv_operation_arglist::visit_argument (be_argument *node) dynamic_cast<be_operation*> (this->ctx_->node ()); // Sometimes the operation is stored in the context scope instead. - if (op == 0) + if (op == nullptr) { op = dynamic_cast<be_operation*> (this->ctx_->scope ()); } - if (op == 0) + if (op == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_arglist::" diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp index f3106b00fe9..bcef3b7a8c0 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp @@ -129,7 +129,7 @@ be_visitor_valuetype_cdr_op_cs::visit_field (be_field *node) { be_type *bt = dynamic_cast<be_type*> (node->field_type ()); - if (bt == 0) + if (bt == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_ci::" diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp index 4f38613afac..550f1edfc43 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp @@ -175,7 +175,7 @@ be_visitor_valuetype_field_cdr_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp index 9af6e532cc5..2c395d126f6 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp @@ -65,7 +65,7 @@ be_visitor_valuetype_field_cdr_cs::visit_array (be_array *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -170,7 +170,7 @@ be_visitor_valuetype_field_cdr_cs::visit_enum (be_enum *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -232,7 +232,7 @@ be_visitor_valuetype_field_cdr_cs::visit_interface (be_interface *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -282,7 +282,7 @@ be_visitor_valuetype_field_cdr_cs::visit_interface_fwd (be_interface_fwd *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -338,7 +338,7 @@ be_visitor_valuetype_field_cdr_cs::valuetype_common (be_type *) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -390,7 +390,7 @@ be_visitor_valuetype_field_cdr_cs::visit_valuetype_fwd (be_valuetype_fwd *) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -460,7 +460,7 @@ be_visitor_valuetype_field_cdr_cs::visit_predefined_type (be_predefined_type *no be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -565,7 +565,7 @@ be_visitor_valuetype_field_cdr_cs::visit_sequence (be_sequence *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -630,7 +630,7 @@ be_visitor_valuetype_field_cdr_cs::visit_string (be_string *str) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -644,7 +644,7 @@ be_visitor_valuetype_field_cdr_cs::visit_string (be_string *str) switch (this->ctx_->sub_state ()) { case TAO_CodeGen::TAO_CDR_INPUT: - if (str != 0 && str->max_size ()->ev ()->u.ulval != 0) + if (str != nullptr && str->max_size ()->ev ()->u.ulval != 0) { if (str->width () == (long) sizeof (char)) { @@ -666,7 +666,7 @@ be_visitor_valuetype_field_cdr_cs::visit_string (be_string *str) } break; case TAO_CodeGen::TAO_CDR_OUTPUT: - if (str != 0 && str->max_size ()->ev ()->u.ulval != 0) + if (str != nullptr && str->max_size ()->ev ()->u.ulval != 0) { if (str->width () == (long) sizeof (char)) { @@ -712,7 +712,7 @@ be_visitor_valuetype_field_cdr_cs::visit_structure ( be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -782,7 +782,7 @@ be_visitor_valuetype_field_cdr_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -795,7 +795,7 @@ be_visitor_valuetype_field_cdr_cs::visit_union (be_union *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_cs::" @@ -904,7 +904,7 @@ be_visitor_valuetype_field_cdr_decl::visit_array (be_array *node) be_field *f = dynamic_cast<be_field*> (this->ctx_->node ()); - if (f == 0) + if (f == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_cdr_decl::" @@ -1006,6 +1006,6 @@ be_visitor_valuetype_field_cdr_decl::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp index bdd7fdb7cfa..fa9b36507f9 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp @@ -63,7 +63,7 @@ be_visitor_valuetype_field_ch::visit_array (be_array *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -146,7 +146,7 @@ be_visitor_valuetype_field_ch::visit_enum (be_enum *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -205,7 +205,7 @@ be_visitor_valuetype_field_ch::visit_interface (be_interface *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -248,7 +248,7 @@ be_visitor_valuetype_field_ch::visit_interface_fwd (be_interface_fwd *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -291,7 +291,7 @@ be_visitor_valuetype_field_ch::visit_valuebox (be_valuebox *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -334,7 +334,7 @@ be_visitor_valuetype_field_ch::visit_valuetype (be_valuetype *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -383,7 +383,7 @@ be_visitor_valuetype_field_ch::visit_valuetype_fwd (be_valuetype_fwd *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -432,7 +432,7 @@ be_visitor_valuetype_field_ch::visit_predefined_type (be_predefined_type *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -506,7 +506,7 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -647,7 +647,7 @@ be_visitor_valuetype_field_ch::visit_structure (be_structure *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) @@ -723,7 +723,7 @@ be_visitor_valuetype_field_ch::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -732,7 +732,7 @@ be_visitor_valuetype_field_ch::visit_union (be_union *node) { be_decl *ub = this->ctx_->node (); be_decl *bu = this->ctx_->scope ()->decl (); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ci.cpp index 261508bd9ba..2e948be0cee 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ci.cpp @@ -62,7 +62,7 @@ be_visitor_valuetype_field_ci::visit_array (be_array *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -109,7 +109,7 @@ be_visitor_valuetype_field_ci::visit_structure (be_structure *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -156,7 +156,7 @@ be_visitor_valuetype_field_ci::visit_union (be_union *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp index a33196f905d..eb3c29909c8 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp @@ -61,7 +61,7 @@ be_visitor_valuetype_field_cs::visit_array (be_array *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -191,7 +191,7 @@ be_visitor_valuetype_field_cs::visit_enum (be_enum *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -260,7 +260,7 @@ be_visitor_valuetype_field_cs::visit_interface (be_interface *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -329,7 +329,7 @@ be_visitor_valuetype_field_cs::visit_interface_fwd (be_interface_fwd *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -403,7 +403,7 @@ be_visitor_valuetype_field_cs::valuetype_common (be_type *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -484,7 +484,7 @@ be_visitor_valuetype_field_cs::visit_valuetype_fwd (be_valuetype_fwd *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -560,7 +560,7 @@ be_visitor_valuetype_field_cs::visit_predefined_type (be_predefined_type *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -718,7 +718,7 @@ be_visitor_valuetype_field_cs::visit_sequence (be_sequence *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -959,7 +959,7 @@ be_visitor_valuetype_field_cs::visit_structure (be_structure *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) @@ -1066,7 +1066,7 @@ be_visitor_valuetype_field_cs::visit_typedef (be_typedef *node) -1); } - this->ctx_->alias (0); + this->ctx_->alias (nullptr); return 0; } @@ -1076,7 +1076,7 @@ be_visitor_valuetype_field_cs::visit_union (be_union *node) be_decl *ub = this->ctx_->node (); be_valuetype *bu = dynamic_cast<be_valuetype*> (this->ctx_->scope ()->decl ()); - be_type *bt = 0; + be_type *bt = nullptr; // Check if we are visiting this node via a visit to a typedef node. if (this->ctx_->alias ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp index e8a0068182c..1185a0c88ea 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp @@ -42,7 +42,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) // If the valuetype has no fields, and no stateful inherit, // the stream arg is unused. - if (inh != 0 || node->data_members_count () > 0) + if (inh != nullptr || node->data_members_count () > 0) { *os << "strm"; } @@ -50,7 +50,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) *os << ", TAO_ChunkInfo&"; // If the valuetype has no fields, and no stateful inherit, // the chunking helper arg is unused. - if (inh != 0 || node->data_members_count () > 0) + if (inh != nullptr || node->data_members_count () > 0) { *os << "ci"; } @@ -137,7 +137,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) // If the valuetype has no fields, and no stateful inherit, // the stream arg is unused. - if (inh != 0 || node->data_members_count () > 0) + if (inh != nullptr || node->data_members_count () > 0) { *os << "strm"; } @@ -145,7 +145,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) *os << ", TAO_ChunkInfo&"; // If the valuetype has no fields, and no stateful inherit, // the chunking helper arg is unused. - if (inh != 0 || node->data_members_count () > 0) + if (inh != nullptr || node->data_members_count () > 0) { *os << "ci"; } @@ -281,7 +281,7 @@ be_visitor_valuetype_marshal_cs::gen_fields (be_valuetype *node, be_field *field = dynamic_cast<be_field*> (d); - if (field != 0 && attr == 0) + if (field != nullptr && attr == nullptr) { if (n_processed > 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp index 62f092fc062..d20a5668def 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp @@ -50,7 +50,7 @@ be_visitor_valuetype::visit_valuetype_scope (be_valuetype *node) AST_Field *field = dynamic_cast<AST_Field*> (d); - if (field != 0 && field->visibility () == AST_Field::vis_PRIVATE) + if (field != nullptr && field->visibility () == AST_Field::vis_PRIVATE) { this->begin_private (); } @@ -59,7 +59,7 @@ be_visitor_valuetype::visit_valuetype_scope (be_valuetype *node) this->begin_public (); } - if (bd == 0 || bd->accept (this) == -1) + if (bd == nullptr || bd->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " @@ -121,7 +121,7 @@ be_visitor_valuetype::visit_attribute (be_attribute *node) Identifier id ("void"); UTL_ScopedName sn (&id, - 0); + nullptr); be_predefined_type rt (AST_PredefinedType::PT_void, &sn); @@ -684,7 +684,7 @@ be_visitor_valuetype::gen_pd (be_valuetype *node) be_field *field = dynamic_cast<be_field*> (d); be_attribute *attr = dynamic_cast<be_attribute*> (d); - if (field == 0 || attr != 0) + if (field == nullptr || attr != nullptr) { continue; } @@ -764,7 +764,7 @@ be_visitor_valuetype::gen_obv_init_constructor_args (be_valuetype *node, AST_Type *parent = node->inherits_concrete (); // Generate for inherited members first. - if (parent != 0) + if (parent != nullptr) { be_valuetype *be_parent = dynamic_cast<be_valuetype*> (parent); @@ -784,7 +784,7 @@ be_visitor_valuetype::gen_obv_init_constructor_args (be_valuetype *node, be_attribute *attr = dynamic_cast<be_attribute*> (si.item ()); - if (f == 0 || attr != 0) + if (f == nullptr || attr != nullptr) { continue; } @@ -794,7 +794,7 @@ be_visitor_valuetype::gen_obv_init_constructor_args (be_valuetype *node, ACE_CString arg_name ("_tao_init_"); arg_name += f->local_name ()->get_string (); Identifier id (arg_name.c_str ()); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); be_type *ft = dynamic_cast<be_type*> (f->field_type ()); bool seen = ft->seen_in_operation (); @@ -902,7 +902,7 @@ be_visitor_valuetype::obv_need_ref_counter (be_valuetype* node) be_valuetype *vt = dynamic_cast<be_valuetype*> (node->inherits ()[i]); - if (vt != 0) + if (vt != nullptr) { if (be_visitor_valuetype::obv_have_ref_counter (vt)) { @@ -934,7 +934,7 @@ be_visitor_valuetype::obv_have_ref_counter (be_valuetype* node) { // Just try to find a VT with concrete factory in inheritance tree. - if (node == 0) + if (node == nullptr) { return false; } @@ -949,7 +949,7 @@ be_visitor_valuetype::obv_have_ref_counter (be_valuetype* node) { be_valuetype *vt = dynamic_cast<be_valuetype*> (node->inherits ()[i]); - if (vt != 0) + if (vt != nullptr) { if (be_visitor_valuetype::obv_have_ref_counter (vt)) { @@ -969,7 +969,7 @@ be_visitor_valuetype::is_amh_exception_holder (be_valuetype *node) const char *last_E = ACE_OS::strrchr (node->full_name (), 'E'); - if (last_E != 0 + if (last_E != nullptr && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0) { return true; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp index 4984e3448d9..9461007b1c6 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -67,7 +67,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) *os << be_idt_nl << ": " << be_idt; long i; // loop index - be_valuetype *inherited = 0; + be_valuetype *inherited = nullptr; long n_inherits = node->n_inherits (); int inherits_eventtype = 0; @@ -88,7 +88,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) *os << "," << be_nl; } - be_decl *scope = 0; + be_decl *scope = nullptr; if (inherited->is_nested ()) { @@ -498,7 +498,7 @@ be_visitor_valuetype_ch::gen_supported_ops (be_interface *, TAO_OutStream *os) { - AST_Decl *d = 0; + AST_Decl *d = nullptr; be_visitor_context ctx; ctx.stream (os); @@ -508,7 +508,7 @@ be_visitor_valuetype_ch::gen_supported_ops (be_interface *, { d = si.item (); - if (d == 0) + if (d == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_valuetype_ch::") diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp index bf6630e78ad..97f51289688 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -409,7 +409,7 @@ be_visitor_valuetype_cs::visit_operation (be_operation *node) be_valuetype *parent = dynamic_cast<be_valuetype*> (node->defined_in ()); - if (parent == 0 || ! this->is_amh_exception_holder (parent)) + if (parent == nullptr || ! this->is_amh_exception_holder (parent)) { return 0; } @@ -489,7 +489,7 @@ be_visitor_valuetype_cs::gen_ostream_operator_r (be_valuetype *node, AST_Type *parent = node->inherits_concrete (); // Recurse up the parent chain. - if (parent != 0) + if (parent != nullptr) { this->gen_ostream_operator_r (dynamic_cast<be_valuetype*> (parent), index); @@ -505,9 +505,9 @@ be_visitor_valuetype_cs::gen_ostream_operator_r (be_valuetype *node, dynamic_cast<be_attribute*> (i.item ()); // No way to access the private members from generated code. - if (f == 0 + if (f == nullptr || f->visibility () != AST_Field::vis_PUBLIC - || attr != 0) + || attr != nullptr) { continue; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp index 879f325fb37..2c9d57c00e3 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp @@ -92,7 +92,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) // int i = 0; - AST_Type *inherited = 0; + AST_Type *inherited = nullptr; for (; i < node->n_inherits (); ++i) { diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp index 14f9a18fead..4ad375c6f6b 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp @@ -214,7 +214,7 @@ be_visitor_valuetype_obv_cs::gen_obv_init_base_constructor_args ( AST_Type *parent = node->inherits_concrete (); // Generate for inherited members first. - if (parent != 0) + if (parent != nullptr) { be_valuetype *be_parent = dynamic_cast<be_valuetype*> (parent); @@ -231,7 +231,7 @@ be_visitor_valuetype_obv_cs::gen_obv_init_base_constructor_args ( be_attribute *attr = dynamic_cast<be_attribute*> (si.item ()); - if (f == 0 || attr != 0) + if (f == nullptr || attr != nullptr) { continue; } @@ -250,7 +250,7 @@ be_visitor_valuetype_obv_cs::gen_obv_init_constructor_inits ( AST_Type *parent = node->inherits_concrete (); // Generate for inherited members first. - if (parent != 0) + if (parent != nullptr) { be_valuetype *be_parent = dynamic_cast<be_valuetype*> (parent); this->gen_obv_init_constructor_inits (be_parent); @@ -266,7 +266,7 @@ be_visitor_valuetype_obv_cs::gen_obv_init_constructor_inits ( be_attribute *attr = dynamic_cast<be_attribute*> (si.item ()); - if (f == 0 || attr != 0) + if (f == nullptr || attr != nullptr) { continue; } @@ -287,7 +287,7 @@ be_visitor_valuetype_obv_cs::gen_obv_call_base_constructor_args ( // Generate for inherited members first. AST_Type *parent = node->inherits_concrete (); - if (parent != 0) + if (parent != nullptr) { be_valuetype *be_parent = dynamic_cast<be_valuetype*> (parent); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp index 6f61bfdb30e..d570cfbe4ea 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp @@ -36,7 +36,7 @@ be_visitor_valuetype_sh::visit_valuetype (be_valuetype *node) // We generate a skeleton class only if the valuetype supports a // non-abstract interface. - if (concrete == 0) + if (concrete == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp index bbfe3041e28..cb9cbde63b5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp @@ -37,7 +37,7 @@ be_visitor_valuetype_ss::visit_valuetype (be_valuetype *node) // We generate a skeleton class only if the valuetype supports a // non-abstract interface. - if (concrete == 0) + if (concrete == nullptr) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp index e6f07f9dc13..5fedde1a55a 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp @@ -54,7 +54,7 @@ be_visitor_valuetype_fwd_any_op_ch::visit_valuetype_fwd ( *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - be_module *module = 0; + be_module *module = nullptr; if (node->is_nested () && node->defined_in ()->scope_node_type () == AST_Decl::NT_module) @@ -110,7 +110,7 @@ be_visitor_valuetype_fwd_any_op_ch::visit_valuetype_fwd ( << node->name () << " *&);"; *os << be_global->core_versioning_end () << be_nl; - if (module != 0) + if (module != nullptr) { *os << "\n\n#endif"; } diff --git a/TAO/TAO_IDL/be/be_visitor_xplicit_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_xplicit_pre_proc.cpp index 10e49e6f12a..d09210817b9 100644 --- a/TAO/TAO_IDL/be/be_visitor_xplicit_pre_proc.cpp +++ b/TAO/TAO_IDL/be/be_visitor_xplicit_pre_proc.cpp @@ -44,8 +44,8 @@ be_visitor_xplicit_pre_proc::be_visitor_xplicit_pre_proc ( be_visitor_context *ctx) : be_visitor_ccm_pre_proc (ctx), - xplicit_ (0), - type_holder_ (0), + xplicit_ (nullptr), + type_holder_ (nullptr), ref_type_ (false) { } @@ -59,7 +59,7 @@ be_visitor_xplicit_pre_proc::visit_home (be_home *node) { UTL_NameList *parent_list = this->compute_inheritance (node); - FE_InterfaceHeader header (0, + FE_InterfaceHeader header (nullptr, parent_list, false, false, @@ -80,7 +80,7 @@ be_visitor_xplicit_pre_proc::visit_home (be_home *node) "Explicit", m); - be_interface *i = 0; + be_interface *i = nullptr; ACE_NEW_RETURN (i, be_interface (explicit_name, header.inherits (), @@ -115,13 +115,13 @@ be_visitor_xplicit_pre_proc::visit_home (be_home *node) explicit_name->destroy (); delete explicit_name; - explicit_name = 0; + explicit_name = nullptr; header.destroy (); parent_list->destroy (); delete parent_list; - parent_list = 0; + parent_list = nullptr; // Through with the scope containing the home. idl_global->scopes ().pop (); @@ -134,9 +134,9 @@ be_visitor_xplicit_pre_proc::visit_home (be_home *node) int be_visitor_xplicit_pre_proc::visit_operation (be_operation *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_operation *home_op = 0; + be_operation *home_op = nullptr; ACE_NEW_RETURN (home_op, be_operation (node->return_type (), node->flags (), @@ -146,7 +146,7 @@ be_visitor_xplicit_pre_proc::visit_operation (be_operation *node) -1); UTL_ExceptList *excep_list = node->exceptions (); - if (0 != excep_list) + if (nullptr != excep_list) { home_op->be_add_exceptions (excep_list->copy ()); } @@ -171,7 +171,7 @@ be_visitor_xplicit_pre_proc::visit_operation (be_operation *node) int be_visitor_xplicit_pre_proc::visit_argument (be_argument *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); this->ref_type_ = true; @@ -192,7 +192,7 @@ be_visitor_xplicit_pre_proc::visit_argument (be_argument *node) AST_Type *arg_type = dynamic_cast<AST_Type*> (this->type_holder_); - be_argument *added_arg = 0; + be_argument *added_arg = nullptr; ACE_NEW_RETURN (added_arg, be_argument (node->direction (), arg_type, @@ -207,12 +207,12 @@ be_visitor_xplicit_pre_proc::visit_argument (be_argument *node) int be_visitor_xplicit_pre_proc::visit_factory (be_factory *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Home *f_home = dynamic_cast<AST_Home*> (node->defined_in ()); - be_operation *added_factory = 0; + be_operation *added_factory = nullptr; ACE_NEW_RETURN (added_factory, be_operation (f_home->managed_component (), AST_Operation::OP_noflags, @@ -241,12 +241,12 @@ be_visitor_xplicit_pre_proc::visit_factory (be_factory *node) int be_visitor_xplicit_pre_proc::visit_finder (be_finder *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Home *f_home = dynamic_cast<AST_Home*> (node->defined_in ()); - be_operation *added_finder = 0; + be_operation *added_finder = nullptr; ACE_NEW_RETURN (added_finder, be_operation (f_home->managed_component (), AST_Operation::OP_noflags, @@ -321,9 +321,9 @@ be_visitor_xplicit_pre_proc::visit_structure (be_structure *node) return 0; } - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_structure *added_struct = 0; + be_structure *added_struct = nullptr; ACE_NEW_RETURN (added_struct, be_structure (&sn, false, @@ -349,16 +349,16 @@ int be_visitor_xplicit_pre_proc::visit_structure_fwd ( be_structure_fwd *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_structure *dummy = 0; + be_structure *dummy = nullptr; ACE_NEW_RETURN (dummy, be_structure (&sn, false, false), -1); - be_structure_fwd *added_struct_fwd = 0; + be_structure_fwd *added_struct_fwd = nullptr; ACE_NEW_RETURN (added_struct_fwd, be_structure_fwd (dummy, &sn), @@ -374,9 +374,9 @@ be_visitor_xplicit_pre_proc::visit_structure_fwd ( int be_visitor_xplicit_pre_proc::visit_exception (be_exception *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_exception *added_excep = 0; + be_exception *added_excep = nullptr; ACE_NEW_RETURN (added_excep, be_exception (&sn, false, @@ -409,9 +409,9 @@ be_visitor_xplicit_pre_proc::visit_enum (be_enum *node) return 0; } - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_enum *added_enum = 0; + be_enum *added_enum = nullptr; ACE_NEW_RETURN (added_enum, be_enum (&sn, false, @@ -452,11 +452,11 @@ be_visitor_xplicit_pre_proc::visit_field (be_field *node) this->ref_type_ = false; - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Type *field_type = dynamic_cast<AST_Type*> (this->type_holder_); - be_field *added_field = 0; + be_field *added_field = nullptr; ACE_NEW_RETURN (added_field, be_field (field_type, &sn, @@ -490,9 +490,9 @@ be_visitor_xplicit_pre_proc::visit_attribute (be_attribute *node) AST_Type *attr_type = dynamic_cast<AST_Type*> (this->type_holder_); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_attribute *added_attr = 0; + be_attribute *added_attr = nullptr; ACE_NEW_RETURN (added_attr, be_attribute (node->readonly (), attr_type, @@ -534,9 +534,9 @@ be_visitor_xplicit_pre_proc::visit_union (be_union *node) AST_ConcreteType *disc = dynamic_cast<AST_ConcreteType*> (this->type_holder_); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_union *added_union = 0; + be_union *added_union = nullptr; ACE_NEW_RETURN (added_union, be_union (disc, &sn, @@ -562,17 +562,17 @@ be_visitor_xplicit_pre_proc::visit_union (be_union *node) int be_visitor_xplicit_pre_proc::visit_union_fwd (be_union_fwd *node) { - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_union *dummy = 0; + be_union *dummy = nullptr; ACE_NEW_RETURN (dummy, - be_union (0, + be_union (nullptr, &sn, false, false), -1); - be_union_fwd *added_union_fwd = 0; + be_union_fwd *added_union_fwd = nullptr; ACE_NEW_RETURN (added_union_fwd, be_union_fwd (dummy, &sn), @@ -608,12 +608,12 @@ be_visitor_xplicit_pre_proc::visit_union_branch ( AST_Type *bt = dynamic_cast<AST_Type*> (this->type_holder_); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); // The union branch owns its label list so we have to copy it. UTL_LabelList *ll = node->labels ()->copy (); - be_union_branch *added_branch = 0; + be_union_branch *added_branch = nullptr; ACE_NEW_RETURN (added_branch, be_union_branch (ll, bt, &sn), -1); @@ -644,15 +644,15 @@ be_visitor_xplicit_pre_proc::visit_constant (be_constant *node) return 0; } - AST_Expression *new_v = 0; + AST_Expression *new_v = nullptr; ACE_NEW_RETURN (new_v, AST_Expression (node->constant_value (), node->et ()), -1); - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_constant *added_const = 0; + be_constant *added_const = nullptr; ACE_NEW_RETURN (added_const, be_constant (node->et (), new_v, @@ -673,9 +673,9 @@ be_visitor_xplicit_pre_proc::visit_enum_val (be_enum_val *node) return 0; } - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_enum_val *added_enum_val = 0; + be_enum_val *added_enum_val = nullptr; ACE_NEW_RETURN (added_enum_val, be_enum_val (node->constant_value ()->ev ()->u.ulval, &sn), @@ -706,8 +706,8 @@ be_visitor_xplicit_pre_proc::visit_array (be_array *node) this->ref_type_ = tmp; - AST_Expression *v = 0; - UTL_ExprList *v_list = 0; + AST_Expression *v = nullptr; + UTL_ExprList *v_list = nullptr; for (ACE_CDR::ULong i = 0; i < node->n_dims (); ++i) { @@ -716,12 +716,12 @@ be_visitor_xplicit_pre_proc::visit_array (be_array *node) AST_Expression::EV_ulong), -1); - UTL_ExprList *el = 0; + UTL_ExprList *el = nullptr; ACE_NEW_RETURN (el, - UTL_ExprList (v, 0), + UTL_ExprList (v, nullptr), -1); - if (v_list == 0) + if (v_list == nullptr) { v_list = el; } @@ -731,9 +731,9 @@ be_visitor_xplicit_pre_proc::visit_array (be_array *node) } } - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_array *added_array = 0; + be_array *added_array = nullptr; ACE_NEW_RETURN (added_array, be_array (&sn, node->n_dims (), @@ -745,11 +745,11 @@ be_visitor_xplicit_pre_proc::visit_array (be_array *node) // No need to add this new node to any scope - it's anonymous // and owned by the node that references it. - if (v_list != 0) + if (v_list != nullptr) { v_list->destroy (); delete v_list; - v_list = 0; + v_list = nullptr; } AST_Type *base_type = @@ -784,14 +784,14 @@ be_visitor_xplicit_pre_proc::visit_sequence (be_sequence *node) AST_Expression *v = node->max_size (); - AST_Expression *bound = 0; + AST_Expression *bound = nullptr; ACE_NEW_RETURN (bound, AST_Expression (v, AST_Expression::EV_ulong), -1); Identifier id ("sequence"); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); AST_Type *ft = dynamic_cast<AST_Type*> (this->type_holder_); @@ -827,14 +827,14 @@ be_visitor_xplicit_pre_proc::visit_string (be_string *node) return 0; } - AST_Expression *bound = 0; + AST_Expression *bound = nullptr; ACE_NEW_RETURN (bound, AST_Expression (b, AST_Expression::EV_ulong), -1); Identifier id ("string"); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); ACE_NEW_RETURN (this->type_holder_, be_string (AST_Decl::NT_string, @@ -871,11 +871,11 @@ be_visitor_xplicit_pre_proc::visit_typedef (be_typedef *node) this->ref_type_ = false; - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); AST_Type *bt = dynamic_cast<AST_Type*> (this->type_holder_); - be_typedef *added_typedef = 0; + be_typedef *added_typedef = nullptr; ACE_NEW_RETURN (added_typedef, be_typedef (bt, &sn, @@ -897,9 +897,9 @@ be_visitor_xplicit_pre_proc::visit_native (be_native *node) return 0; } - UTL_ScopedName sn (node->local_name (), 0); + UTL_ScopedName sn (node->local_name (), nullptr); - be_native *added_native = 0; + be_native *added_native = nullptr; ACE_NEW_RETURN (added_native, be_native (&sn), -1); @@ -930,7 +930,7 @@ be_visitor_xplicit_pre_proc::check_and_store (AST_Decl *node) UTL_ScopedName *tmpl_tail = this->xplicit_iface_rel_name (node); - if (tmpl_tail != 0) + if (tmpl_tail != nullptr) { AST_Decl *d = idl_global->scopes ().top ()->lookup_by_name ( @@ -941,7 +941,7 @@ be_visitor_xplicit_pre_proc::check_and_store (AST_Decl *node) tmpl_tail->destroy (); delete tmpl_tail; - tmpl_tail = 0; + tmpl_tail = nullptr; } else { @@ -955,9 +955,9 @@ be_visitor_xplicit_pre_proc::xplicit_iface_rel_name (AST_Decl *d) AST_Decl *tmp = d; ACE_CString name (d->full_name ()); - while (tmp != 0) + while (tmp != nullptr) { - if (dynamic_cast<be_home*> (tmp) != 0) + if (dynamic_cast<be_home*> (tmp) != nullptr) { ACE_CString head (tmp->local_name ()->get_string ()); @@ -971,5 +971,5 @@ be_visitor_xplicit_pre_proc::xplicit_iface_rel_name (AST_Decl *d) tmp = ScopeAsDecl (tmp->defined_in ()); } - return 0; + return nullptr; } diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp index f2ef45176fa..2985c2bfb8f 100644 --- a/TAO/TAO_IDL/driver/drv_args.cpp +++ b/TAO/TAO_IDL/driver/drv_args.cpp @@ -184,7 +184,7 @@ void DRV_parse_args (long ac, char **av) { ACE_CString buffer; - char *s = 0; + char *s = nullptr; long i; bool has_space = false; @@ -512,7 +512,7 @@ DRV_parse_args (long ac, char **av) be_util::arg_post_proc (); // Make sure the output directory is valid. - if (idl_global->temp_dir () == 0) + if (idl_global->temp_dir () == nullptr) { ACE_TCHAR tmpdir[MAXPATHLEN + 1]; diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp index e6de7325526..40685658071 100644 --- a/TAO/TAO_IDL/driver/drv_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_preproc.cpp @@ -90,9 +90,9 @@ trademarks or registered trademarks of Sun Microsystems, Inc. // Storage for preprocessor args. unsigned long const DRV_MAX_ARGCOUNT = 1024; unsigned long DRV_argcount = 0; -ACE_TCHAR const * DRV_arglist[DRV_MAX_ARGCOUNT] = { 0 }; +ACE_TCHAR const * DRV_arglist[DRV_MAX_ARGCOUNT] = { nullptr }; -static char const * output_arg_format = 0; +static char const * output_arg_format = nullptr; static long output_arg_index = 0; ACE_TCHAR const TCHAR_DIR_DOT[] = ACE_TEXT("."); @@ -112,7 +112,7 @@ static char tmp_ifile[MAXPATHLEN + 1] = { 0 }; // Lines can be 1024 chars long intially - // it will expand as required. #define LINEBUF_SIZE 1024 -char* drv_line = 0; +char* drv_line = nullptr; static size_t drv_line_size = LINEBUF_SIZE + 1; // Push the new CPP location if we got a -Yp argument. @@ -140,7 +140,7 @@ DRV_cpp_putarg (const char *str) if (str && ACE_OS::strchr (str, ' ')) { - ACE_TCHAR *buf = 0; + ACE_TCHAR *buf = nullptr; ACE_NEW_NORETURN (buf, ACE_TCHAR[ACE_OS::strlen (str) + 3]); if (buf) { @@ -161,11 +161,11 @@ DRV_cpp_putarg (const char *str) void DRV_cpp_expand_output_arg (const char *filename) { - if (output_arg_format != 0) + if (output_arg_format != nullptr) { ACE::strdelete (const_cast<ACE_TCHAR *> ( DRV_arglist[output_arg_index])); - DRV_arglist[output_arg_index] = 0; + DRV_arglist[output_arg_index] = nullptr; ACE_NEW (DRV_arglist[output_arg_index], ACE_TCHAR [ACE_OS::strlen (output_arg_format) @@ -185,7 +185,7 @@ DRV_cpp_calc_total_argsize(void) { unsigned long size = 0; unsigned long ix = 0; - while (DRV_arglist[ix] != 0) + while (DRV_arglist[ix] != nullptr) { size += ACE_Utils::truncate_cast<unsigned long> (ACE_OS::strlen (DRV_arglist[ix]) + 1); ++ix; @@ -233,7 +233,7 @@ DRV_get_line (FILE *file) { // Create a bigger buffer size_t temp_size = drv_line_size * 2; - char *temp = 0; + char *temp = nullptr; ACE_NEW_RETURN (temp, char [temp_size], false); ACE_OS::strcpy (temp, drv_line); delete [] drv_line; @@ -280,7 +280,7 @@ DRV_cpp_init (void) const char *platform_cpp_args = FE_get_cpp_args_from_env (); - if (platform_cpp_args == 0) + if (platform_cpp_args == nullptr) { // If no cpp flag was defined by the user, we define some // platform specific flags here. @@ -298,11 +298,11 @@ DRV_cpp_init (void) char* TAO_ROOT = ACE_OS::getenv ("TAO_ROOT"); - if (TAO_ROOT != 0) + if (TAO_ROOT != nullptr) { DRV_add_include_path (include_path1, TAO_ROOT, - 0, + nullptr, true); DRV_add_include_path (include_path2, @@ -314,7 +314,7 @@ DRV_cpp_init (void) { char* ACE_ROOT = ACE_OS::getenv ("ACE_ROOT"); - if (ACE_ROOT != 0) + if (ACE_ROOT != nullptr) { DRV_add_include_path (include_path1, ACE_ROOT, @@ -343,7 +343,7 @@ DRV_cpp_init (void) #else DRV_add_include_path (include_path1, ".", - 0, + nullptr, true); #endif /* TAO_IDL_INCLUDE_DIR */ } @@ -360,13 +360,13 @@ DRV_cpp_init (void) { // Check for an argument that specifies // the preprocessor's output file. - if (ACE_OS::strstr (platform_arglist[i], ACE_TEXT ("%s")) != 0 - && output_arg_format == 0) + if (ACE_OS::strstr (platform_arglist[i], ACE_TEXT ("%s")) != nullptr + && output_arg_format == nullptr) { output_arg_format = ACE::strnew (ACE_TEXT_ALWAYS_CHAR (platform_arglist[i])); output_arg_index = DRV_argcount; - DRV_cpp_putarg (0); + DRV_cpp_putarg (nullptr); } else { @@ -381,7 +381,7 @@ DRV_sweep_dirs (const char *rel_path, { // Zero rel_path means we're not using this option, and // so we become a no-op. - if (rel_path == 0) + if (rel_path == nullptr) { return 0; } @@ -400,9 +400,9 @@ DRV_sweep_dirs (const char *rel_path, bname += rel_path; bool include_added = false; char abspath[MAXPATHLEN] = ""; - char *full_path = 0; + char *full_path = nullptr; - for (ACE_DIRENT *dir_entry; (dir_entry = dir.read ()) != 0;) + for (ACE_DIRENT *dir_entry; (dir_entry = dir.read ()) != nullptr;) { // Skip the ".." and "." files in each directory. if (ACE::isdotdir (dir_entry->d_name) == true) @@ -448,7 +448,7 @@ DRV_sweep_dirs (const char *rel_path, idl_global->add_rel_include_path (bname.c_str ()); full_path = ACE_OS::realpath ("", abspath); - if (full_path != 0) + if (full_path != nullptr) { idl_global->add_include_path (full_path, false); @@ -492,7 +492,7 @@ DRV_add_include_path (ACE_CString& include_path, const char *suffix, bool is_system) { - if (path == 0) + if (path == nullptr) { return include_path; } @@ -530,7 +530,7 @@ DRV_add_include_path (ACE_CString& include_path, ) ) ); - if (suffix != 0) + if (suffix != nullptr) { if (!include_path.length () && ((nativeDir == *suffix) || (foreignDir == *suffix))) @@ -589,7 +589,7 @@ DRV_cpp_post_init (void) // When adding new dirs here don't forget to update // FE_Utils::validate_orb_include accordingly. - if (TAO_ROOT != 0) + if (TAO_ROOT != nullptr) { DRV_add_include_path (include_path3, TAO_ROOT, @@ -601,7 +601,7 @@ DRV_cpp_post_init (void) // If TAO_ROOT isn't defined, assume it's under ACE_ROOT. char* ACE_ROOT = ACE_OS::getenv ("ACE_ROOT"); - if (ACE_ROOT != 0) + if (ACE_ROOT != nullptr) { DRV_add_include_path (include_path3, ACE_ROOT, @@ -620,7 +620,7 @@ DRV_cpp_post_init (void) // be a warning from DRV_preproc(). DRV_add_include_path (include_path3, ".", - 0, + nullptr, true); #endif /* TAO_IDL_INCLUDE_DIR */ } @@ -631,11 +631,11 @@ DRV_cpp_post_init (void) // When adding new dirs here don't forget to update // FE_Utils::validate_orb_include accordingly. - if (CIAO_ROOT != 0) + if (CIAO_ROOT != nullptr) { DRV_add_include_path (include_path4, CIAO_ROOT, - 0, + nullptr, true); DRV_add_include_path (include_path5, @@ -656,7 +656,7 @@ DRV_cpp_post_init (void) // have to be restored. char cwd_path[MAXPATHLEN]; - if (ACE_OS::getcwd (cwd_path, sizeof (cwd_path)) == 0) + if (ACE_OS::getcwd (cwd_path, sizeof (cwd_path)) == nullptr) { ACE_ERROR ((LM_ERROR, "DRV_cpp_post_init: ACE_OS::getcwd failed\n")); @@ -911,10 +911,10 @@ DRV_get_orb_idl_includes (void) static char const orb_idl[] = "tao/orb.idl"; // Search for orb.idl in supplied include file search paths. - char const * directory = 0; + char const * directory = nullptr; FILE * fp = FE_Utils::open_included_file (orb_idl, directory); - if (fp == 0) + if (fp == nullptr) { // Fall back on $TAO_ROOT/tao/orb.idl if orb.idl is not in the // include path. @@ -924,7 +924,7 @@ DRV_get_orb_idl_includes (void) fp = ACE_OS::fopen (orb_idl_path.c_str (), "r"); - if (fp == 0) + if (fp == nullptr) { ACE_ERROR ((LM_ERROR, "TAO_IDL: cannot open or find file: %C\n", @@ -959,7 +959,7 @@ DRV_copy_input (FILE *fin, const char *fn, const char *orig_filename) { - if (f == 0) + if (f == nullptr) { ACE_ERROR ((LM_ERROR, "%C: cannot open temp file \"%C\" for copying from \"%C\": %p\n", @@ -970,7 +970,7 @@ DRV_copy_input (FILE *fin, throw Bailout (); } - if (fin == 0) + if (fin == nullptr) { ACE_ERROR ((LM_ERROR, "%C: cannot open input file\n", @@ -1035,9 +1035,9 @@ DRV_stripped_name (char *fn) char *n = fn; size_t l; - if (n == 0) + if (n == nullptr) { - return 0; + return nullptr; } l = ACE_OS::strlen (n); @@ -1134,7 +1134,7 @@ DRV_pre_proc (const char *myfile) // by the preprocessor. FILE * const file = ACE_OS::fopen (myfile, "r"); - if (file == 0) + if (file == nullptr) { ACE_ERROR ((LM_ERROR, "%C: ERROR: Unable to open file : %p\n", @@ -1152,7 +1152,7 @@ DRV_pre_proc (const char *myfile) myfile); ACE_OS::fclose (file); - UTL_String *utl_string = 0; + UTL_String *utl_string = nullptr; #if defined (ACE_OPENVMS) { @@ -1186,13 +1186,13 @@ DRV_pre_proc (const char *myfile) ACE_Auto_String_Free safety (ACE_OS::strdup (myfile)); - UTL_String *stripped_tmp = 0; + UTL_String *stripped_tmp = nullptr; ACE_NEW (stripped_tmp, UTL_String (DRV_stripped_name (safety.get ()), true)); idl_global->set_stripped_filename (stripped_tmp); - UTL_String *real_tmp = 0; + UTL_String *real_tmp = nullptr; ACE_NEW (real_tmp, UTL_String (t_ifile, true)); @@ -1204,7 +1204,7 @@ DRV_pre_proc (const char *myfile) DRV_cpp_expand_output_arg (t_file); DRV_cpp_putarg (t_ifile); - DRV_cpp_putarg (0); // Null terminate the DRV_arglist. + DRV_cpp_putarg (nullptr); // Null terminate the DRV_arglist. // For complex builds, the default // command line buffer size of 1024 @@ -1266,7 +1266,7 @@ DRV_pre_proc (const char *myfile) ACE_HANDLE fd = ACE_INVALID_HANDLE; - if (output_arg_format == 0) + if (output_arg_format == nullptr) { // If the following open() fails, then we're either being hit with a // symbolic link attack, or another process opened the file before @@ -1347,7 +1347,7 @@ DRV_pre_proc (const char *myfile) DRV_argcount -= 2; ACE::strdelete ( const_cast<ACE_TCHAR *> (DRV_arglist[DRV_argcount])); - DRV_arglist[DRV_argcount] = 0; + DRV_arglist[DRV_argcount] = nullptr; ACE_exitcode status = 0; if (process.wait (&status) == ACE_INVALID_PID) @@ -1406,7 +1406,7 @@ DRV_pre_proc (const char *myfile) FILE * const yyin = ACE_OS::fopen (t_file, "r"); - if (yyin == 0) + if (yyin == nullptr) { ACE_ERROR ((LM_ERROR, "%C: Could not open cpp " @@ -1427,7 +1427,7 @@ DRV_pre_proc (const char *myfile) char buffer[ACE_MAXLOGMSGLEN]; size_t bytes; - if (preproc == 0) + if (preproc == nullptr) { ACE_ERROR ((LM_ERROR, "%C: Could not open cpp " diff --git a/TAO/TAO_IDL/fe/fe_component_header.cpp b/TAO/TAO_IDL/fe/fe_component_header.cpp index bf9a73f838e..420c68d3277 100644 --- a/TAO/TAO_IDL/fe/fe_component_header.cpp +++ b/TAO/TAO_IDL/fe/fe_component_header.cpp @@ -20,7 +20,7 @@ FE_ComponentHeader::FE_ComponentHeader (UTL_ScopedName *n, false, false, false), - base_component_ (0) + base_component_ (nullptr) { this->compile_inheritance (base_component); this->compile_supports (supports); @@ -65,7 +65,7 @@ FE_ComponentHeader::compile_inheritance (UTL_ScopedName *base_component) { // If there is a base component, look up the decl and assign our member. // We also inherit its supported interfaces. - if (base_component == 0) + if (base_component == nullptr) { return; } @@ -74,7 +74,7 @@ FE_ComponentHeader::compile_inheritance (UTL_ScopedName *base_component) AST_Decl *d = s->lookup_by_name (base_component, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (base_component); @@ -90,7 +90,7 @@ FE_ComponentHeader::compile_inheritance (UTL_ScopedName *base_component) this->base_component_ = dynamic_cast<AST_Component*> (d); - if (this->base_component_ == 0) + if (this->base_component_ == nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_USE, d); @@ -101,22 +101,22 @@ FE_ComponentHeader::compile_inheritance (UTL_ScopedName *base_component) this->name (), this->base_component_ ); - this->base_component_ = 0; + this->base_component_ = nullptr; } } void FE_ComponentHeader::compile_supports (UTL_NameList *supports) { - if (supports == 0) + if (supports == nullptr) { return; } - AST_Decl *d = 0; - UTL_ScopedName *item = 0; - AST_Interface *iface = 0; - AST_Type *t = 0; + AST_Decl *d = nullptr; + UTL_ScopedName *item = nullptr; + AST_Interface *iface = nullptr; + AST_Type *t = nullptr; long j = 0; long k = 0; @@ -128,7 +128,7 @@ FE_ComponentHeader::compile_supports (UTL_NameList *supports) item = l.item (); // Check that scope stack is valid. - if (idl_global->scopes ().top () == 0) + if (idl_global->scopes ().top () == nullptr) { idl_global->err ()->lookup_error (item); @@ -142,7 +142,7 @@ FE_ComponentHeader::compile_supports (UTL_NameList *supports) d = s->lookup_by_name (item, true); - if (d == 0) + if (d == nullptr) { AST_Decl *sad = ScopeAsDecl (s); @@ -155,7 +155,7 @@ FE_ComponentHeader::compile_supports (UTL_NameList *supports) } // Not found? - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (item); diff --git a/TAO/TAO_IDL/fe/fe_declarator.cpp b/TAO/TAO_IDL/fe/fe_declarator.cpp index 69cb53e8fa1..b364cd9eb54 100644 --- a/TAO/TAO_IDL/fe/fe_declarator.cpp +++ b/TAO/TAO_IDL/fe/fe_declarator.cpp @@ -89,10 +89,10 @@ FE_Declarator::compose (AST_Decl *d) { AST_Type *ct = dynamic_cast<AST_Type*> (d); - if (ct == 0) + if (ct == nullptr) { idl_global->err ()->not_a_type (d); - return 0; + return nullptr; } else if (ct->node_type () == AST_Decl::NT_param_holder) { @@ -103,7 +103,7 @@ FE_Declarator::compose (AST_Decl *d) if (ph->info ()->type_ == AST_Decl::NT_const) { idl_global->err ()->not_a_type (d); - return 0; + return nullptr; } } @@ -119,11 +119,11 @@ FE_Declarator::compose (AST_Decl *d) idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_ADD, d); - return 0; + return nullptr; } } - AST_Array *arr = 0; + AST_Array *arr = nullptr; // All uses of forward declared types must // not have a different prefix from the place of declaration. @@ -138,7 +138,7 @@ FE_Declarator::compose (AST_Decl *d) scope = ScopeAsDecl (scope->defined_in ()); // Are we at global scope? - if (scope == 0) + if (scope == nullptr) { break; } @@ -171,7 +171,7 @@ FE_Declarator::compose (AST_Decl *d) */ } - if (this->pd_decl_type == FD_simple || this->pd_complex_part == 0) + if (this->pd_decl_type == FD_simple || this->pd_complex_part == nullptr) { return ct; } @@ -194,7 +194,7 @@ FE_Declarator::compose (AST_Decl *d) } // We shouldn't get here. - return 0; + return nullptr; } void @@ -204,7 +204,7 @@ FE_Declarator::destroy (void) { this->pd_name->destroy (); delete this->pd_name; - this->pd_name = 0; + this->pd_name = nullptr; } } diff --git a/TAO/TAO_IDL/fe/fe_extern.cpp b/TAO/TAO_IDL/fe/fe_extern.cpp index 440d81cdc3c..fc7973d5bd0 100644 --- a/TAO/TAO_IDL/fe/fe_extern.cpp +++ b/TAO/TAO_IDL/fe/fe_extern.cpp @@ -132,10 +132,10 @@ FE_set_yyin (FILE * f) UTL_Error * FE_new_UTL_Error (void) { - UTL_Error *retval = 0; + UTL_Error *retval = nullptr; ACE_NEW_RETURN (retval, UTL_Error, - 0); + nullptr); return retval; } @@ -143,10 +143,10 @@ FE_new_UTL_Error (void) UTL_Indenter * FE_new_UTL_Indenter (void) { - UTL_Indenter *retval = 0; + UTL_Indenter *retval = nullptr; ACE_NEW_RETURN (retval, UTL_Indenter, - 0); + nullptr); return retval; } diff --git a/TAO/TAO_IDL/fe/fe_global.cpp b/TAO/TAO_IDL/fe/fe_global.cpp index dc644b404a4..d863dcb9b11 100644 --- a/TAO/TAO_IDL/fe/fe_global.cpp +++ b/TAO/TAO_IDL/fe/fe_global.cpp @@ -1,3 +1,3 @@ #include "global_extern.h" -IDL_GlobalData *idl_global = 0; +IDL_GlobalData *idl_global = nullptr; diff --git a/TAO/TAO_IDL/fe/fe_home_header.cpp b/TAO/TAO_IDL/fe/fe_home_header.cpp index d7a3118d20e..1585cea5a82 100644 --- a/TAO/TAO_IDL/fe/fe_home_header.cpp +++ b/TAO/TAO_IDL/fe/fe_home_header.cpp @@ -15,11 +15,11 @@ FE_HomeHeader::FE_HomeHeader (UTL_ScopedName *n, UTL_ScopedName *managed_component, UTL_ScopedName *primary_key) : FE_ComponentHeader (n, - 0, + nullptr, supports, false), - base_home_ (0), - primary_key_ (0) + base_home_ (nullptr), + primary_key_ (nullptr) { // No need to call compile_supports(), it got done in // the call to the base class FE_ComponentHeader. @@ -53,7 +53,7 @@ FE_HomeHeader::primary_key (void) const void FE_HomeHeader::compile_inheritance (UTL_ScopedName *base_home) { - if (base_home == 0) + if (base_home == nullptr) { return; } @@ -62,7 +62,7 @@ FE_HomeHeader::compile_inheritance (UTL_ScopedName *base_home) AST_Decl *d = s->lookup_by_name (base_home, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (base_home); @@ -78,7 +78,7 @@ FE_HomeHeader::compile_inheritance (UTL_ScopedName *base_home) this->base_home_ = dynamic_cast<AST_Home*> (d); - if (this->base_home_ == 0) + if (this->base_home_ == nullptr) { idl_global->err ()->inheritance_error (this->name (), d); } @@ -88,7 +88,7 @@ void FE_HomeHeader::compile_managed_component ( UTL_ScopedName *mc_name) { - if (mc_name == 0) + if (mc_name == nullptr) { return; } @@ -97,7 +97,7 @@ FE_HomeHeader::compile_managed_component ( AST_Decl *d = s->lookup_by_name (mc_name, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (mc_name); @@ -113,7 +113,7 @@ FE_HomeHeader::compile_managed_component ( this->managed_component_ = dynamic_cast<AST_Component*> (d); - if (this->managed_component_ == 0) + if (this->managed_component_ == nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_ILLEGAL_USE, d); @@ -123,7 +123,7 @@ FE_HomeHeader::compile_managed_component ( void FE_HomeHeader::compile_primary_key (UTL_ScopedName *primary_key) { - if (primary_key == 0) + if (primary_key == nullptr) { return; } @@ -132,7 +132,7 @@ FE_HomeHeader::compile_primary_key (UTL_ScopedName *primary_key) AST_Decl *d = s->lookup_by_name (primary_key, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (primary_key); @@ -150,7 +150,7 @@ FE_HomeHeader::compile_primary_key (UTL_ScopedName *primary_key) this->primary_key_ = dynamic_cast<AST_Type*> (d); - if (this->primary_key_ == 0) + if (this->primary_key_ == nullptr) { idl_global->err ()->valuetype_expected (d); } diff --git a/TAO/TAO_IDL/fe/fe_init.cpp b/TAO/TAO_IDL/fe/fe_init.cpp index 65425c5402a..a6481e77039 100644 --- a/TAO/TAO_IDL/fe/fe_init.cpp +++ b/TAO/TAO_IDL/fe/fe_init.cpp @@ -84,12 +84,12 @@ fe_populate_global_scope (void) // No need to created a scoped name for the basic types, the // AST_PredefinedType constructor will do that. - AST_PredefinedType *pdt = 0; + AST_PredefinedType *pdt = nullptr; AST_Root *root = dynamic_cast<AST_Root*> (idl_global->root ()); Identifier void_id ("void"); - UTL_ScopedName void_name (&void_id, 0); + UTL_ScopedName void_name (&void_id, nullptr); pdt = idl_global->gen ()->create_predefined_type ( @@ -104,7 +104,7 @@ fe_populate_global_scope (void) idl_global->pragma_prefixes ().push (prefix); Identifier corba_id ("CORBA"); - UTL_ScopedName sn (&corba_id, 0); + UTL_ScopedName sn (&corba_id, nullptr); AST_Module *m = idl_global->gen ()->create_module (root, &sn); @@ -115,103 +115,103 @@ fe_populate_global_scope (void) pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_long, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_ulong, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_longlong, - 0); + nullptr); m->fe_add_predefined_type(pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_ulonglong, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_short, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_ushort, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_float, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_double, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_longdouble, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_char, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_wchar, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_octet, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_any, - 0); + nullptr); m->fe_add_predefined_type (pdt); pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_boolean, - 0); + nullptr); m->fe_add_predefined_type (pdt); Identifier Object_id ("Object"); - UTL_ScopedName Object_name (&Object_id, 0); + UTL_ScopedName Object_name (&Object_id, nullptr); pdt = idl_global->gen ()->create_predefined_type ( @@ -223,7 +223,7 @@ fe_populate_global_scope (void) // Add these to make all keywords protected even in different spellings Identifier ValueBase_id ("ValueBase"); - UTL_ScopedName ValueBase_name (&ValueBase_id, 0); + UTL_ScopedName ValueBase_name (&ValueBase_id, nullptr); pdt = idl_global->gen ()->create_predefined_type ( @@ -233,7 +233,7 @@ fe_populate_global_scope (void) m->fe_add_predefined_type (pdt); Identifier AbstractBase_id ("AbstractBase"); - UTL_ScopedName AbstractBase_name (&AbstractBase_id, 0); + UTL_ScopedName AbstractBase_name (&AbstractBase_id, nullptr); pdt = idl_global->gen ()->create_predefined_type ( @@ -243,7 +243,7 @@ fe_populate_global_scope (void) m->fe_add_predefined_type (pdt); Identifier TypeCode_id ("TypeCode"); - UTL_ScopedName TypeCode_name (&TypeCode_id, 0); + UTL_ScopedName TypeCode_name (&TypeCode_id, nullptr); pdt = idl_global->gen ()->create_predefined_type ( @@ -252,7 +252,7 @@ fe_populate_global_scope (void) m->fe_add_predefined_type (pdt); - char *trash = 0; + char *trash = nullptr; idl_global->pragma_prefixes ().pop (trash); ACE::strdelete (trash); } @@ -360,19 +360,19 @@ FE_init (void) IDL_GlobalData); // Initialize some of its data. - idl_global->set_root (0); - idl_global->set_gen (0); + idl_global->set_root (nullptr); + idl_global->set_gen (nullptr); idl_global->set_err (FE_new_UTL_Error ()); idl_global->set_err_count (0); idl_global->set_indent (FE_new_UTL_Indenter ()); - idl_global->set_filename (0); - idl_global->set_main_filename (0); - idl_global->set_real_filename (0); - idl_global->set_stripped_filename (0); + idl_global->set_filename (nullptr); + idl_global->set_main_filename (nullptr); + idl_global->set_real_filename (nullptr); + idl_global->set_stripped_filename (nullptr); idl_global->set_import (true); idl_global->set_in_main_file (false); idl_global->set_lineno (-1); - idl_global->set_prog_name (0); + idl_global->set_prog_name (nullptr); char local_escapes[LOCAL_ESCAPES_BUFFER_SIZE]; ACE_OS::memset (&local_escapes, @@ -381,7 +381,7 @@ FE_init (void) idl_global->set_local_escapes (local_escapes); idl_global->set_compile_flags (0); - idl_global->set_include_file_names (0); + idl_global->set_include_file_names (nullptr); idl_global->set_n_include_file_names (0); idl_global->set_parse_state (IDL_GlobalData::PS_NoState); idl_global->preserve_cpp_keywords (false); @@ -393,10 +393,10 @@ FE_init (void) void FE_populate (void) { - AST_Root *r = 0; + AST_Root *r = nullptr; // Check that the BE init created a generator object - if (idl_global->gen () == 0) + if (idl_global->gen () == nullptr) { ACE_ERROR (( LM_ERROR, @@ -408,11 +408,11 @@ FE_populate (void) // Create a global root for the AST. Note that the AST root has no name. Identifier root_id (""); - UTL_ScopedName root_name (&root_id, 0); + UTL_ScopedName root_name (&root_id, nullptr); r = idl_global->gen ()->create_root (&root_name); idl_global->set_root (r); - if (r == 0) + if (r == nullptr) { ACE_ERROR (( LM_ERROR, @@ -439,10 +439,10 @@ void FE_extract_env_include_paths (ACE_Unbounded_Queue<ACE_CString> &list) { ACE_Env_Value<char*> incl_paths (ACE_TEXT ("INCLUDE"), - (char *) 0); + (char *) nullptr); const char *aggr_str = incl_paths; - if (aggr_str != 0) + if (aggr_str != nullptr) { char separator; #if defined (ACE_WIN32) @@ -469,7 +469,7 @@ FE_store_env_include_paths (void) ACE_Unbounded_Queue<ACE_CString> list; FE_extract_env_include_paths (list); - ACE_CString *path_tmp = 0; + ACE_CString *path_tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<ACE_CString>iter (list); !iter.done (); iter.advance ()) { @@ -483,11 +483,11 @@ FE_store_env_include_paths (void) const char * FE_get_cpp_loc_from_env (void) { - const char *cpp_loc = 0; + const char *cpp_loc = nullptr; // See if TAO_IDL_PREPROCESSOR is defined. ACE_Env_Value<char*> preprocessor (ACE_TEXT ("TAO_IDL_PREPROCESSOR"), - (char *) 0); + (char *) nullptr); // Set cpp_loc to the built in location, unless it has been overriden by // environment variables. @@ -499,7 +499,7 @@ FE_get_cpp_loc_from_env (void) { // Check for the deprecated CPP_LOCATION environment variable ACE_Env_Value<char*> cpp_path (ACE_TEXT ("CPP_LOCATION"), - (char *) 0); + (char *) nullptr); if (cpp_path != 0) { @@ -523,11 +523,11 @@ FE_get_cpp_loc_from_env (void) const char * FE_get_cpp_args_from_env (void) { - const char *cpp_args = 0; + const char *cpp_args = nullptr; // Added some customizable preprocessor options ACE_Env_Value<char*> args1 (ACE_TEXT ("TAO_IDL_PREPROCESSOR_ARGS"), - (char *) 0); + (char *) nullptr); if (args1 != 0) { @@ -538,7 +538,7 @@ FE_get_cpp_args_from_env (void) // Check for the deprecated TAO_IDL_DEFAULT_CPP_FLAGS environment // variable. ACE_Env_Value<char*> args2 (ACE_TEXT ("TAO_IDL_DEFAULT_CPP_FLAGS"), - (char *) 0); + (char *) nullptr); if (args2 != 0) { diff --git a/TAO/TAO_IDL/fe/fe_interface_header.cpp b/TAO/TAO_IDL/fe/fe_interface_header.cpp index 56c426d255e..e7738ad71ab 100644 --- a/TAO/TAO_IDL/fe/fe_interface_header.cpp +++ b/TAO/TAO_IDL/fe/fe_interface_header.cpp @@ -139,14 +139,14 @@ FE_InterfaceHeader::FE_InterfaceHeader (UTL_ScopedName *n, bool compile_now) : interface_name_ (n), has_template_parent_ (false), - inherits_ (0), + inherits_ (nullptr), n_inherits_ (0), - inherits_flat_ (0), + inherits_flat_ (nullptr), n_inherits_flat_ (0), is_local_ (is_local), is_abstract_ (is_abstract), - iseen_ (0), - iseen_flat_ (0), + iseen_ (nullptr), + iseen_flat_ (nullptr), iallocated_ (0), iused_ (0), iallocated_flat_ (0), @@ -178,11 +178,11 @@ FE_InterfaceHeader::is_abstract (void) const void FE_InterfaceHeader::destroy (void) { - if (0 != this->interface_name_) + if (nullptr != this->interface_name_) { this->interface_name_->destroy (); delete this->interface_name_; - this->interface_name_ = 0; + this->interface_name_ = nullptr; } delete [] this->iseen_; @@ -194,7 +194,7 @@ void FE_InterfaceHeader::compile_one_inheritance (AST_Type *i) { // Check for badly formed interface. - if (i == 0) + if (i == nullptr) { return; } @@ -211,7 +211,7 @@ FE_InterfaceHeader::compile_one_inheritance (AST_Type *i) AST_Interface *iface = dynamic_cast<AST_Interface*> (i); - if (iface == 0) + if (iface == nullptr) { // If a template parameter as parent appears at any time, // we bag the flat list until instantiation time. @@ -235,7 +235,7 @@ FE_InterfaceHeader::compile_one_inheritance (AST_Type *i) AST_Interface *tmp = dynamic_cast<AST_Interface*> (parents[j]); - if (tmp == 0) + if (tmp == nullptr) { // If a template parameter as parent appears at any time, // we bag the flat list until instantiation time. @@ -261,14 +261,14 @@ void FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces, bool for_valuetype) { - if (ifaces == 0) + if (ifaces == nullptr) { return; } - AST_Decl *d = 0; - UTL_ScopedName *item = 0; - AST_Interface *i = 0; + AST_Decl *d = nullptr; + UTL_ScopedName *item = nullptr; + AST_Interface *i = nullptr; // Compute expanded flattened non-repeating list of interfaces // which this one inherits from. @@ -282,7 +282,7 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces, UTL_Scope *s = idl_global->scopes ().top (); // Check that scope stack is valid. - if (s == 0) + if (s == nullptr) { idl_global->err ()->lookup_error (item); @@ -296,13 +296,13 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces, true); // full_def_only // Undefined interface? - if (0 == d) + if (nullptr == d) { // If the lookup now succeeds, without the full_def_only // constraint, it's an error. d = s->lookup_by_name (item, false); - if (0 != d) + if (nullptr != d) { idl_global->err ()->inheritance_fwd_error ( this->interface_name_, @@ -312,7 +312,7 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces, } } - if (0 == d) + if (nullptr == d) { AST_Decl *sad = ScopeAsDecl (s); @@ -325,7 +325,7 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces, } // Not found? - if (0 == d) + if (nullptr == d) { idl_global->err ()->lookup_error (item); @@ -344,7 +344,7 @@ FE_InterfaceHeader::compile_inheritance (UTL_NameList *ifaces, i = dynamic_cast<AST_Interface*> (d); - if (i != 0) + if (i != nullptr) { if (this->check_inherit (i, for_valuetype) == -1) { @@ -403,7 +403,7 @@ FE_InterfaceHeader::check_inherit (AST_Interface *i, { // We use the narrow instead of node_type() here so we can get a // match with both valuetypes and eventtypes. - bool is_valuetype = (dynamic_cast<AST_ValueType*> (i) != 0); + bool is_valuetype = (dynamic_cast<AST_ValueType*> (i) != nullptr); if ( // Non-local interfaces may not inherit from local ones. @@ -424,7 +424,7 @@ FE_InterfaceHeader::check_inherit (AST_Interface *i, void FE_InterfaceHeader::add_inheritance (AST_Type *i) { - AST_Type **oiseen = 0; + AST_Type **oiseen = nullptr; // Make sure there's space for one more. if (this->iallocated_ == this->iused_) @@ -461,7 +461,7 @@ FE_InterfaceHeader::add_inheritance (AST_Type *i) void FE_InterfaceHeader::add_inheritance_flat (AST_Interface *i) { - AST_Interface **oiseen_flat = 0; + AST_Interface **oiseen_flat = nullptr; // Make sure there's space for one more. if (this->iallocated_flat_ == this->iused_flat_) @@ -506,14 +506,14 @@ FE_InterfaceHeader::already_seen (AST_Type *ip) AST_Param_Holder *tmp = dynamic_cast<AST_Param_Holder*> (this->iseen_[i]); - if (ph != 0 && tmp != 0) + if (ph != nullptr && tmp != nullptr) { if (ph->info ()->name_ == tmp->info ()->name_) { idl_global->err ()->duplicate_param_id (ph->name ()); ph->destroy (); delete ph; - ph = 0; + ph = nullptr; return true; } } @@ -612,9 +612,9 @@ void FE_InterfaceHeader::destroy_flat_arrays (void) { delete [] this->inherits_flat_; - this->inherits_flat_ = 0; + this->inherits_flat_ = nullptr; delete [] this->iseen_flat_; - this->iseen_flat_ = 0; + this->iseen_flat_ = nullptr; this->n_inherits_flat_ = 0; this->iallocated_flat_ = 0; this->iused_flat_ = 0; diff --git a/TAO/TAO_IDL/fe/fe_lookup.cpp b/TAO/TAO_IDL/fe/fe_lookup.cpp index 9a130541e72..2756a6bd529 100644 --- a/TAO/TAO_IDL/fe/fe_lookup.cpp +++ b/TAO/TAO_IDL/fe/fe_lookup.cpp @@ -43,134 +43,134 @@ TAO_IDL_CPP_Keyword_Table::lookup (const char *str, unsigned int len) static const struct TAO_IDL_CPP_Keyword_Entry wordlist[] = { - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"delete", "_cxx_delete"}, {"mutable", "_cxx_mutable"}, - {"",0}, + {"",nullptr}, {"enum", "_cxx_enum"}, - {"",0}, + {"",nullptr}, {"double", "_cxx_double"}, {"do", "_cxx_do"}, {"unsigned", "_cxx_unsigned"}, - {"",0}, + {"",nullptr}, {"union", "_cxx_union"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"goto", "_cxx_goto"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"and", "_cxx_and"}, {"auto", "_cxx_auto"}, - {"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"namespace", "_cxx_namespace"}, {"using", "_cxx_using"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"else", "_cxx_else"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"asm", "_cxx_asm"}, - {"",0}, + {"",nullptr}, {"while", "_cxx_while"}, - {"",0},{"",0}, + {"",nullptr},{"",nullptr}, {"new", "_cxx_new"}, {"long", "_cxx_long"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"return", "_cxx_return"}, - {"",0},{"",0}, + {"",nullptr},{"",nullptr}, {"void", "_cxx_void"}, {"false", "_cxx_false"}, - {"",0},{"",0}, + {"",nullptr},{"",nullptr}, {"volatile", "_cxx_volatile"}, - {"",0},{"",0}, + {"",nullptr},{"",nullptr}, {"switch", "_cxx_switch"}, - {"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"not_eq", "_cxx_not_eq"}, {"private", "_cxx_private"}, - {"",0}, + {"",nullptr}, {"protected", "_cxx_protected"}, - {"",0}, + {"",nullptr}, {"inline", "_cxx_inline"}, - {"",0}, + {"",nullptr}, {"operator", "_cxx_operator"}, {"bool", "_cxx_bool"}, - {"",0}, + {"",nullptr}, {"and_eq", "_cxx_and_eq"}, - {"",0}, + {"",nullptr}, {"continue", "_cxx_continue"}, - {"",0}, + {"",nullptr}, {"break", "_cxx_break"}, {"friend", "_cxx_friend"}, - {"",0}, + {"",nullptr}, {"for", "_cxx_for"}, {"case", "_cxx_case"}, {"catch", "_cxx_catch"}, {"signed", "_cxx_signed"}, {"or", "_cxx_or"}, {"register", "_cxx_register"}, - {"",0},{"",0}, + {"",nullptr},{"",nullptr}, {"public", "_cxx_public"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"or_eq", "_cxx_or_eq"}, {"bitand", "_cxx_bitand"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"compl", "_cxx_compl"}, {"extern", "_cxx_extern"}, - {"",0},{"",0}, + {"",nullptr},{"",nullptr}, {"char", "_cxx_char"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"default", "_cxx_default"}, {"template", "_cxx_template"}, - {"",0}, + {"",nullptr}, {"class", "_cxx_class"}, {"sizeof", "_cxx_sizeof"}, - {"",0}, + {"",nullptr}, {"not", "_cxx_not"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"if", "_cxx_if"}, - {"",0}, + {"",nullptr}, {"this", "_cxx_this"}, {"short", "_cxx_short"}, - {"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"bitor", "_cxx_bitor"}, - {"",0}, + {"",nullptr}, {"virtual", "_cxx_virtual"}, {"xor", "_cxx_xor"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"throw", "_cxx_throw"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"true", "_cxx_true"}, - {"",0}, + {"",nullptr}, {"xor_eq", "_cxx_xor_eq"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"reinterpret_cast", "_cxx_reinterpret_cast"}, - {"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"typeid", "_cxx_typeid"}, - {"",0}, + {"",nullptr}, {"typename", "_cxx_typename"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"dynamic_cast", "_cxx_dynamic_cast"}, {"int", "_cxx_int"}, - {"",0}, + {"",nullptr}, {"float", "_cxx_float"}, - {"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"const", "_cxx_const"}, - {"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"const_cast", "_cxx_const_cast"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, + {"",nullptr}, {"static", "_cxx_static"}, - {"",0},{"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"typedef", "_cxx_typedef"}, {"try", "_cxx_try"}, - {"",0},{"",0}, + {"",nullptr},{"",nullptr}, {"export", "_cxx_export"}, - {"",0}, + {"",nullptr}, {"explicit", "_cxx_explicit"}, - {"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr}, {"wchar_t", "_cxx_wchar_t"}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0},{"",0}, - {"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, + {"",nullptr}, {"struct", "_cxx_struct"}, - {"",0},{"",0},{"",0},{"",0}, + {"",nullptr},{"",nullptr},{"",nullptr},{"",nullptr}, {"static_cast", "_cxx_static_cast"}, }; @@ -186,5 +186,5 @@ TAO_IDL_CPP_Keyword_Table::lookup (const char *str, unsigned int len) return &wordlist[key]; } } - return 0; + return nullptr; } diff --git a/TAO/TAO_IDL/fe/fe_obv_header.cpp b/TAO/TAO_IDL/fe/fe_obv_header.cpp index d63106425f4..4f9990c141b 100644 --- a/TAO/TAO_IDL/fe/fe_obv_header.cpp +++ b/TAO/TAO_IDL/fe/fe_obv_header.cpp @@ -66,10 +66,10 @@ FE_OBVHeader::FE_OBVHeader (UTL_ScopedName *n, false, false, false), - supports_ (0), + supports_ (nullptr), n_supports_ (0), - inherits_concrete_ (0), - supports_concrete_ (0), + inherits_concrete_ (nullptr), + supports_concrete_ (nullptr), truncatable_ (truncatable) { this->compile_inheritance (inherits, @@ -133,7 +133,7 @@ FE_OBVHeader::compile_inheritance (UTL_NameList *vtypes, AST_Type *t = this->inherits_[0]; AST_ValueType *vt = dynamic_cast<AST_ValueType*> (t); - if (vt != 0 + if (vt != nullptr && vt->is_abstract () == false) { this->inherits_concrete_ = vt; @@ -166,9 +166,9 @@ FE_OBVHeader::compile_inheritance (UTL_NameList *vtypes, void FE_OBVHeader::compile_supports (UTL_NameList *supports) { - if (supports == 0) + if (supports == nullptr) { - this->supports_ = 0; + this->supports_ = nullptr; this->n_supports_ = 0; return; } @@ -179,10 +179,10 @@ FE_OBVHeader::compile_supports (UTL_NameList *supports) ACE_NEW (this->supports_, AST_Type *[length]); - AST_Decl *d = 0; - UTL_ScopedName *item = 0; - AST_Interface *iface = 0; - AST_Type *t = 0; + AST_Decl *d = nullptr; + UTL_ScopedName *item = nullptr; + AST_Interface *iface = nullptr; + AST_Type *t = nullptr; int i = 0; for (UTL_NamelistActiveIterator l (supports); !l.is_done (); l.next ()) @@ -190,7 +190,7 @@ FE_OBVHeader::compile_supports (UTL_NameList *supports) item = l.item (); // Check that scope stack is valid. - if (idl_global->scopes ().top () == 0) + if (idl_global->scopes ().top () == nullptr) { idl_global->err ()->lookup_error (item); @@ -204,7 +204,7 @@ FE_OBVHeader::compile_supports (UTL_NameList *supports) d = s->lookup_by_name (item, true); - if (d == 0) + if (d == nullptr) { AST_Decl *sad = ScopeAsDecl (s); @@ -217,7 +217,7 @@ FE_OBVHeader::compile_supports (UTL_NameList *supports) } // Not found? - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (item); @@ -263,14 +263,14 @@ FE_OBVHeader::compile_supports (UTL_NameList *supports) } // Forward declared interface? - if (iface != 0 && !iface->is_defined ()) + if (iface != nullptr && !iface->is_defined ()) { idl_global->err ()->supports_fwd_error (this->interface_name_, iface); continue; } - if (iface != 0 && !iface->is_abstract ()) + if (iface != nullptr && !iface->is_abstract ()) { if (i == 0) { @@ -303,16 +303,16 @@ FE_OBVHeader::check_concrete_supported_inheritance (AST_Interface *d) return true; } - AST_ValueType *vt = 0; - AST_Type *concrete = 0; - AST_Interface *ancestor = 0; + AST_ValueType *vt = nullptr; + AST_Type *concrete = nullptr; + AST_Interface *ancestor = nullptr; for (long i = 0; i < this->n_inherits_; ++i) { vt = dynamic_cast<AST_ValueType*> (this->inherits_[i]); concrete = vt->supports_concrete (); - if (0 == concrete) + if (nullptr == concrete) { return true; } diff --git a/TAO/TAO_IDL/fe/fe_private.cpp b/TAO/TAO_IDL/fe/fe_private.cpp index 64c0f8b0e9b..83cecd041d8 100644 --- a/TAO/TAO_IDL/fe/fe_private.cpp +++ b/TAO/TAO_IDL/fe/fe_private.cpp @@ -65,4 +65,4 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "fe_private.h" #include "utl_strlist.h" -UTL_StrList *DRV_global_pragmas = 0; +UTL_StrList *DRV_global_pragmas = nullptr; diff --git a/TAO/TAO_IDL/fe/fe_utils.cpp b/TAO/TAO_IDL/fe/fe_utils.cpp index 32ab27879db..bc3eda3fcff 100644 --- a/TAO/TAO_IDL/fe/fe_utils.cpp +++ b/TAO/TAO_IDL/fe/fe_utils.cpp @@ -27,7 +27,7 @@ FE_Utils::T_Param_Info::T_Param_Info (void) : type_ (AST_Decl::NT_fixed), const_type_ (AST_Expression::EV_none), - enum_const_type_decl_ (0) + enum_const_type_decl_ (nullptr) { } @@ -41,8 +41,8 @@ FE_Utils::duplicate_param_id (T_PARAMLIST_INFO *params) !i.done (); i.advance (), ++cur_pos) { - FE_Utils::T_Param_Info *this_one = 0; - FE_Utils::T_Param_Info *that_one = 0; + FE_Utils::T_Param_Info *this_one = nullptr; + FE_Utils::T_Param_Info *that_one = nullptr; i.next (this_one); @@ -63,7 +63,7 @@ FE_Utils::duplicate_param_id (T_PARAMLIST_INFO *params) void FE_Utils::T_ARGLIST::destroy (void) { - AST_Decl **d = 0; + AST_Decl **d = nullptr; for (T_ARGLIST::ITERATOR i (this->begin ()); !i.done (); @@ -183,10 +183,10 @@ FE_Utils::ExprTypeToPredefinedType (AST_Expression::ExprType et) UTL_ScopedName * FE_Utils::string_to_scoped_name (const char *s) { - UTL_ScopedName *retval = 0; + UTL_ScopedName *retval = nullptr; ACE_CString str (s); - Identifier *id = 0; - UTL_ScopedName *sn = 0; + Identifier *id = nullptr; + UTL_ScopedName *sn = nullptr; while (! str.empty ()) { @@ -204,15 +204,15 @@ FE_Utils::string_to_scoped_name (const char *s) // Construct a UTL_ScopedName segment. ACE_NEW_RETURN (id, Identifier (lname.c_str ()), - 0); + nullptr); ACE_NEW_RETURN (sn, - UTL_ScopedName (id, 0), - 0); + UTL_ScopedName (id, nullptr), + nullptr); // Either make it the head of a new list or the tail of // an existing one. - if (retval == 0) + if (retval == nullptr) { retval = sn; } @@ -260,7 +260,7 @@ FE_Utils::create_uses_multiple_stuff (AST_Component *c, struct_name += u->local_name ()->get_string (); struct_name += "Connection"; Identifier struct_id (struct_name.c_str ()); - UTL_ScopedName sn (&struct_id, 0); + UTL_ScopedName sn (&struct_id, nullptr); // In case this call comes from the backend. We // will pop the scope before returning. @@ -281,7 +281,7 @@ FE_Utils::create_uses_multiple_stuff (AST_Component *c, Identifier object_id ("objref"); UTL_ScopedName object_name (&object_id, - 0); + nullptr); AST_Field *object_field = idl_global->gen ()->create_field (ft, &object_name, @@ -291,7 +291,7 @@ FE_Utils::create_uses_multiple_stuff (AST_Component *c, Identifier local_id ("Cookie"); UTL_ScopedName local_name (&local_id, - 0); + nullptr); Identifier module_id ("Components"); UTL_ScopedName scoped_name (&module_id, &local_name); @@ -300,7 +300,7 @@ FE_Utils::create_uses_multiple_stuff (AST_Component *c, local_id.destroy (); module_id.destroy (); - if (d == 0) + if (d == nullptr) { // This would happen if we haven't included Components.idl. idl_global->err ()->lookup_error (&scoped_name); @@ -311,7 +311,7 @@ FE_Utils::create_uses_multiple_stuff (AST_Component *c, Identifier cookie_id ("ck"); UTL_ScopedName cookie_name (&cookie_id, - 0); + nullptr); AST_Field *cookie_field = idl_global->gen ()->create_field (cookie, &cookie_name, @@ -328,7 +328,7 @@ FE_Utils::create_uses_multiple_stuff (AST_Component *c, AST_Sequence *sequence = idl_global->gen ()->create_sequence (bound_expr, connection, - 0, + nullptr, 0, 0); @@ -336,7 +336,7 @@ FE_Utils::create_uses_multiple_stuff (AST_Component *c, seq_string += 's'; Identifier seq_id (seq_string.c_str ()); UTL_ScopedName seq_name (&seq_id, - 0); + nullptr); AST_Typedef *connections = idl_global->gen ()->create_typedef (sequence, &seq_name, @@ -363,7 +363,7 @@ FE_Utils::create_implied_ami_uses_stuff (void) ! i.done (); i.advance ()) { - char **item = 0; + char **item = nullptr; i.next (item); UTL_ScopedName *sn = @@ -372,24 +372,24 @@ FE_Utils::create_implied_ami_uses_stuff (void) AST_Decl *d = idl_global->root ()->lookup_by_name (sn, true); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (sn); sn->destroy (); delete sn; - sn = 0; + sn = nullptr; continue; } sn->destroy (); delete sn; - sn = 0; + sn = nullptr; AST_Uses *u = dynamic_cast<AST_Uses*> (d); - if (u == 0) + if (u == nullptr) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("idl_global::create_") @@ -408,7 +408,7 @@ FE_Utils::create_implied_ami_uses_stuff (void) AST_Component *c = dynamic_cast<AST_Component*> (u->defined_in ()); - if (c == 0) + if (c == nullptr) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("idl_global::create_") @@ -476,7 +476,7 @@ FE_Utils::check_for_seq_of_param (FE_Utils::T_PARAMLIST_INFO *list) !i.done (); i.advance (), ++index) { - FE_Utils::T_Param_Info *param = 0; + FE_Utils::T_Param_Info *param = nullptr; i.next (param); if (param->name_.find (pattern) == 0) @@ -501,26 +501,26 @@ FILE * FE_Utils::open_included_file (char const * filename, char const *& directory) { - FILE * f = 0; + FILE * f = nullptr; ACE_CString const the_file (ACE_CString ('/') + ACE_CString (filename)); for (IDL_GlobalData::Unbounded_Paths_Queue_Iterator i ( idl_global->include_paths ()); - !i.done () && f == 0; + !i.done () && f == nullptr; i.advance ()) { - IDL_GlobalData::Include_Path_Info *path_info = 0; + IDL_GlobalData::Include_Path_Info *path_info = nullptr; (void) i.next (path_info); - if (path_info->path_ != 0) + if (path_info->path_ != nullptr) { ACE_CString const complete_filename (ACE_CString (path_info->path_) + the_file); f = ACE_OS::fopen (complete_filename.c_str (), "r"); - if (f != 0) + if (f != nullptr) directory = path_info->path_; } } @@ -533,7 +533,7 @@ FE_Utils::is_include_file_found (ACE_CString & inc_file, UTL_String * idl_file_name) { char abspath[MAXPATHLEN] = ""; - char *full_path = 0; + char *full_path = nullptr; // If the include path has literal "s (because of an include // of a Windows path with spaces), we must remove them here. @@ -552,11 +552,11 @@ FE_Utils::is_include_file_found (ACE_CString & inc_file, full_path = ACE_OS::realpath (inc_file.c_str (), abspath); - if (full_path != 0) + if (full_path != nullptr) { FILE *test = ACE_OS::fopen (abspath, "r"); - if (test == 0) + if (test == nullptr) { return false; } @@ -605,9 +605,9 @@ FE_Utils::validate_included_idl_files (void) char pre_abspath [MAXPATHLEN] = ""; char post_abspath [MAXPATHLEN] = ""; - IDL_GlobalData::Include_Path_Info *path_info = 0; - char *post_tmp = 0; - char *full_path = 0; + IDL_GlobalData::Include_Path_Info *path_info = nullptr; + char *post_tmp = nullptr; + char *full_path = nullptr; // We are going to assemble a list of the include files found in // the top level file in the order that they are found in the pre- @@ -690,7 +690,7 @@ FE_Utils::validate_included_idl_files (void) } // Reduce length and zero the discarded element - pre_preproc_includes [--n_pre_preproc_includes] = 0; + pre_preproc_includes [--n_pre_preproc_includes] = nullptr; // Break out to next entry in pre-processor // output @@ -709,7 +709,7 @@ FE_Utils::validate_included_idl_files (void) for (size_t l = 0u; l < n_pre_preproc_includes; ++l) { delete [] pre_preproc_includes [l]; - pre_preproc_includes [l] = 0; + pre_preproc_includes [l] = nullptr; } // Copy list back @@ -745,7 +745,7 @@ FE_Utils::validate_orb_include (UTL_String * idl_file_name) !iter.done (); iter.advance ()) { - IDL_GlobalData::Include_Path_Info *path_info = 0; + IDL_GlobalData::Include_Path_Info *path_info = nullptr; iter.next (path_info); ACE_CString partial = path_info->path_; @@ -800,7 +800,7 @@ FE_Utils::original_local_name (Identifier *local_name) const TAO_IDL_CPP_Keyword_Entry *entry = cpp_key_tbl.lookup (lname + 5, len); - if (entry != 0) + if (entry != nullptr) { ACE_CString tmp (lname + 5); local_name->replace_string (tmp.c_str ()); @@ -834,10 +834,10 @@ FE_Utils::can_be_redefined (AST_Decl *prev_decl, UTL_Scope *prev_scope = prev_decl->defined_in (); UTL_Scope *curr_scope = curr_decl->defined_in (); - AST_Structure *s = 0; - AST_StructureFwd *s_fwd = 0; - AST_Template_Module *ptm = 0; - AST_Template_Module *ctm = 0; + AST_Structure *s = nullptr; + AST_StructureFwd *s_fwd = nullptr; + AST_Template_Module *ptm = nullptr; + AST_Template_Module *ctm = nullptr; bool nt_eq = (pnt == cnt); bool s_eq = (prev_scope == curr_scope); @@ -854,7 +854,7 @@ FE_Utils::can_be_redefined (AST_Decl *prev_decl, /// Neither can be a template module. ptm = dynamic_cast<AST_Template_Module*> (prev_decl); ctm = dynamic_cast<AST_Template_Module*> (curr_decl); - return (ptm == 0 && ctm == 0); + return (ptm == nullptr && ctm == nullptr); /// For the *_fwd types, if scopes aren't related, it's ok. /// If they are related, then we need another fwd or a full decl. case AST_Decl::NT_component_fwd: @@ -875,8 +875,8 @@ FE_Utils::can_be_redefined (AST_Decl *prev_decl, case AST_Decl::NT_struct: case AST_Decl::NT_union: s = dynamic_cast<AST_Structure*> (prev_decl); - s_fwd = (s == 0 ? 0 : s->fwd_decl ()); - return (!s_eq || s_fwd != 0); + s_fwd = (s == nullptr ? nullptr : s->fwd_decl ()); + return (!s_eq || s_fwd != nullptr); /// Only 2 or more full definitions in the same scope are illegal, /// and that is caught elsewhere. case AST_Decl::NT_interface: @@ -910,7 +910,7 @@ void FE_Utils::tmpl_mod_ref_check (AST_Decl *context, AST_Decl *ref) { - if (ref == 0 + if (ref == nullptr || ref->node_type () == AST_Decl::NT_param_holder || idl_global->in_tmpl_mod_alias ()) { @@ -962,7 +962,7 @@ FE_Utils::check_one_seq_of_param (FE_Utils::T_PARAMLIST_INFO *list, break; } - FE_Utils::T_Param_Info *info = 0; + FE_Utils::T_Param_Info *info = nullptr; i.next (info); if (info->name_ == param_id) @@ -979,12 +979,12 @@ FE_Utils::get_tm_container (AST_Decl *contained) { AST_Decl *d = contained; - while (d != 0) + while (d != nullptr) { AST_Template_Module *tm = dynamic_cast<AST_Template_Module*> (d); - if (tm != 0) + if (tm != nullptr) { return tm; } @@ -992,5 +992,5 @@ FE_Utils::get_tm_container (AST_Decl *contained) d = ScopeAsDecl (d->defined_in ()); } - return 0; + return nullptr; } diff --git a/TAO/TAO_IDL/fe/idl.tab.cpp b/TAO/TAO_IDL/fe/idl.tab.cpp index 9b4ef38cad2..cbdd6e146fb 100644 --- a/TAO/TAO_IDL/fe/idl.tab.cpp +++ b/TAO/TAO_IDL/fe/idl.tab.cpp @@ -152,8 +152,8 @@ extern "C" int tao_yywrap (void); extern char tao_yytext[]; extern int tao_yyleng; -AST_Enum *tao_enum_constant_decl = 0; -AST_String *tao_string_decl = 0; +AST_Enum *tao_enum_constant_decl = nullptr; +AST_String *tao_string_decl = nullptr; AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none; bool stack_based_lookup_for_primary_expr = false; @@ -3038,7 +3038,7 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); yyerrok; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 3044 "fe/idl.tab.cpp" break; @@ -3076,13 +3076,13 @@ yyreduce: IDL_GlobalData::PS_ModuleIDSeen); } - AST_Module *m = 0; + AST_Module *m = nullptr; UTL_Scope *s = idl_global->scopes ().top_non_null (); /* * Make a new module and add it to the enclosing scope */ - if (s != 0) + if (s != nullptr) { m = idl_global->gen ()->create_module (s, (yyvsp[0].idlist)); (void) s->fe_add_module (m); @@ -3090,7 +3090,7 @@ yyreduce: (yyvsp[0].idlist)->destroy (); delete (yyvsp[0].idlist); - (yyvsp[0].idlist) = 0; + (yyvsp[0].idlist) = nullptr; /* * Push it on the stack @@ -3186,7 +3186,7 @@ yyreduce: // We've probably tried to reopen a template module, // going further will cause a crash. - if (m == 0) + if (m == nullptr) { return 1; } @@ -3238,9 +3238,9 @@ yyreduce: // Clear the pointer so scoped name lookup will know // that we are no longer in a template module scope. - idl_global->current_params (0); + idl_global->current_params (nullptr); - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 3246 "fe/idl.tab.cpp" break; @@ -3273,7 +3273,7 @@ yyreduce: AST_Decl *d = s->lookup_by_name ((yyvsp[-6].idlist)); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[-6].idlist)); return 1; @@ -3282,7 +3282,7 @@ yyreduce: AST_Template_Module *ref = dynamic_cast<AST_Template_Module*> (d); - if (ref == 0) + if (ref == nullptr) { idl_global->err ()->template_module_expected (d); return 1; @@ -3298,7 +3298,7 @@ yyreduce: return 1; } - UTL_ScopedName sn ((yyvsp[0].idval), 0); + UTL_ScopedName sn ((yyvsp[0].idval), nullptr); AST_Template_Module_Ref *tmr = idl_global->gen ()->create_template_module_ref ( @@ -3311,7 +3311,7 @@ yyreduce: sn.destroy (); (yyvsp[-6].idlist)->destroy (); delete (yyvsp[-6].idlist); - (yyvsp[-6].idlist) = 0; + (yyvsp[-6].idlist) = nullptr; // Save the current flag value to be restored below. bool itmna_flag = idl_global->in_tmpl_mod_no_alias (); @@ -3371,10 +3371,10 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName *sn = (yyvsp[-5].idlist); - AST_Template_Module *ref = 0; + AST_Template_Module *ref = nullptr; AST_Decl *d = s->lookup_by_name (sn); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (sn); return 1; @@ -3383,7 +3383,7 @@ yyreduce: { ref = dynamic_cast<AST_Template_Module*> (d); - if (ref == 0) + if (ref == nullptr) { idl_global->err ()->template_module_expected (d); return 1; @@ -3392,8 +3392,8 @@ yyreduce: sn->destroy (); delete sn; - sn = 0; - (yyvsp[-5].idlist) = 0; + sn = nullptr; + (yyvsp[-5].idlist) = nullptr; if (! ref->match_arg_names ((yyvsp[-3].alval))) { @@ -3402,7 +3402,7 @@ yyreduce: ACE_NEW_RETURN (sn, UTL_ScopedName ((yyvsp[0].idval), - 0), + nullptr), 1); AST_Template_Module_Inst *tmi = @@ -3426,7 +3426,7 @@ yyreduce: idl_global->set_err_count (idl_global->err_count () + 1); } - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 3432 "fe/idl.tab.cpp" break; @@ -3435,10 +3435,10 @@ yyreduce: #line 916 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Interface *i = 0; + AST_Interface *i = nullptr; FE_InterfaceHeader *header = (yyvsp[0].ihval); - (yyvsp[0].ihval) = 0; + (yyvsp[0].ihval) = nullptr; /* * Make a new interface node and add it to its enclosing scope. @@ -3525,7 +3525,7 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen); - if ((yyvsp[0].nlval) != 0 && (yyvsp[0].nlval)->truncatable ()) + if ((yyvsp[0].nlval) != nullptr && (yyvsp[0].nlval)->truncatable ()) { idl_global->err ()->syntax_error ( IDL_GlobalData::PS_InheritColonSeen @@ -3538,9 +3538,9 @@ yyreduce: * list of all interfaces which this interface inherits from, * recursively */ - UTL_ScopedName *n = 0; + UTL_ScopedName *n = nullptr; ACE_NEW_RETURN (n, - UTL_ScopedName ((yyvsp[-1].idval), 0), + UTL_ScopedName ((yyvsp[-1].idval), nullptr), 1); ACE_NEW_RETURN ((yyval.ihval), FE_InterfaceHeader (n, @@ -3550,11 +3550,11 @@ yyreduce: true), 1); - if (0 != (yyvsp[0].nlval)) + if (nullptr != (yyvsp[0].nlval)) { (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } } #line 3561 "fe/idl.tab.cpp" @@ -3571,9 +3571,9 @@ yyreduce: * list of all interfaces which this interface inherits from, * recursively */ - UTL_ScopedName *n = 0; + UTL_ScopedName *n = nullptr; ACE_NEW_RETURN (n, - UTL_ScopedName ((yyvsp[-1].idval), 0), + UTL_ScopedName ((yyvsp[-1].idval), nullptr), 1); ACE_NEW_RETURN ((yyval.ihval), FE_InterfaceHeader (n, @@ -3583,11 +3583,11 @@ yyreduce: true), 1); - if (0 != (yyvsp[0].nlval)) + if (nullptr != (yyvsp[0].nlval)) { (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } } #line 3594 "fe/idl.tab.cpp" @@ -3604,9 +3604,9 @@ yyreduce: * list of all interfaces which this interface inherits from, * recursively */ - UTL_ScopedName *n = 0; + UTL_ScopedName *n = nullptr; ACE_NEW_RETURN (n, - UTL_ScopedName ((yyvsp[-1].idval), 0), + UTL_ScopedName ((yyvsp[-1].idval), nullptr), 1); ACE_NEW_RETURN ((yyval.ihval), FE_InterfaceHeader (n, @@ -3616,11 +3616,11 @@ yyreduce: true), 1); - if (0 != (yyvsp[0].nlval)) + if (nullptr != (yyvsp[0].nlval)) { (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } } #line 3627 "fe/idl.tab.cpp" @@ -3646,7 +3646,7 @@ yyreduce: case 77: #line 1095 "fe/idl.ypp" { - (yyval.nlval) = 0; + (yyval.nlval) = nullptr; } #line 3652 "fe/idl.tab.cpp" break; @@ -3665,7 +3665,7 @@ yyreduce: { FE_OBVHeader *&valuetype_header = (yyvsp[0].vhval); UTL_Scope *scope = idl_global->scopes ().top_non_null (); - AST_ValueType *valuetype = 0; + AST_ValueType *valuetype = nullptr; if (scope && valuetype_header) { @@ -3698,7 +3698,7 @@ yyreduce: // FE_OBVHeader is not automatically destroyed in the AST valuetype_header->destroy (); delete valuetype_header; - valuetype_header = 0; + valuetype_header = nullptr; } /* @@ -3737,7 +3737,7 @@ yyreduce: idl_global->scopes ().top_non_null () ); - if (vt != 0 && vt->will_have_factory ()) + if (vt != nullptr && vt->will_have_factory ()) { idl_global->valuefactory_seen_ = true; } @@ -3756,10 +3756,10 @@ yyreduce: #line 1198 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_ValueType *v = 0; - AST_Interface *i = 0; + AST_ValueType *v = nullptr; + AST_Interface *i = nullptr; - if (s != 0 && (yyvsp[0].vhval) != 0) + if (s != nullptr && (yyvsp[0].vhval) != nullptr) { v = idl_global->gen ()->create_valuetype ( @@ -3788,7 +3788,7 @@ yyreduce: // FE_OBVHeader is not automatically destroyed in the AST (yyvsp[0].vhval)->destroy (); delete (yyvsp[0].vhval); - (yyvsp[0].vhval) = 0; + (yyvsp[0].vhval) = nullptr; } /* @@ -3825,7 +3825,7 @@ yyreduce: */ idl_global->scopes ().pop (); - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 3831 "fe/idl.tab.cpp" break; @@ -3843,31 +3843,31 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen); - UTL_ScopedName *sn = 0; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (sn, - UTL_ScopedName ((yyvsp[-3].idval), 0), + UTL_ScopedName ((yyvsp[-3].idval), nullptr), 1); ACE_NEW_RETURN ((yyval.vhval), FE_OBVHeader (sn, (yyvsp[-2].nlval), (yyvsp[0].nlval), - ((yyvsp[-2].nlval) != 0 + ((yyvsp[-2].nlval) != nullptr ? (yyvsp[-2].nlval)->truncatable () : false)), 1); - if (0 != (yyvsp[0].nlval)) + if (nullptr != (yyvsp[0].nlval)) { (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } - if (0 != (yyvsp[-2].nlval)) + if (nullptr != (yyvsp[-2].nlval)) { (yyvsp[-2].nlval)->destroy (); delete (yyvsp[-2].nlval); - (yyvsp[-2].nlval) = 0; + (yyvsp[-2].nlval) = nullptr; } } #line 3874 "fe/idl.tab.cpp" @@ -3917,7 +3917,7 @@ yyreduce: case 99: #line 1330 "fe/idl.ypp" { - (yyval.nlval) = 0; + (yyval.nlval) = nullptr; } #line 3923 "fe/idl.tab.cpp" break; @@ -3927,15 +3927,15 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_ValueTypeFwd *f = 0; + nullptr); + AST_ValueTypeFwd *f = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeForwardSeen); /* * Create a node representing a forward declaration of an * valuetype. Store it in the enclosing scope */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_valuetype_fwd (&n, true); @@ -3944,7 +3944,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; } #line 3950 "fe/idl.tab.cpp" break; @@ -3954,15 +3954,15 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_ValueTypeFwd *f = 0; + nullptr); + AST_ValueTypeFwd *f = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeForwardSeen); /* * Create a node representing a forward declaration of an * valuetype. Store it in the enclosing scope */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_valuetype_fwd (&n, false); @@ -3971,9 +3971,9 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 3979 "fe/idl.tab.cpp" break; @@ -3985,18 +3985,18 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[-1].idval), - 0); + nullptr); - if (s != 0 && (yyvsp[0].dcval) != 0) + if (s != nullptr && (yyvsp[0].dcval) != nullptr) { /* * Get the type_spec associated with the valuebox */ - AST_Type *tp = 0; + AST_Type *tp = nullptr; AST_Typedef *td = dynamic_cast<AST_Typedef*> ((yyvsp[0].dcval)); - if (td == 0) + if (td == nullptr) { tp = dynamic_cast<AST_Type*> ((yyvsp[0].dcval)); } @@ -4005,7 +4005,7 @@ yyreduce: tp = td->primitive_base_type (); } - if (tp == 0) + if (tp == nullptr) { // The <type_spec> given is a valid type idl_global->err ()->not_a_type ((yyvsp[0].dcval)); @@ -4038,9 +4038,9 @@ yyreduce: (yyvsp[-1].idval)->destroy (); delete (yyvsp[-1].idval); - (yyvsp[-1].idval) = 0; + (yyvsp[-1].idval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 4046 "fe/idl.tab.cpp" break; @@ -4080,7 +4080,7 @@ yyreduce: #line 1484 "fe/idl.ypp" { AST_Decl *&node = (yyvsp[0].dcval); - AST_Decls *value = 0; + AST_Decls *value = nullptr; if (node) { value = new AST_Decls; @@ -4095,7 +4095,7 @@ yyreduce: #line 1495 "fe/idl.ypp" { AST_Decl *&node = (yyvsp[0].dcval); - AST_Decls *value = 0; + AST_Decls *value = nullptr; if (node) { value = new AST_Decls; @@ -4296,7 +4296,7 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); yyerrok; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 4302 "fe/idl.tab.cpp" break; @@ -4325,13 +4325,13 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen); - UTL_NameList *nl = 0; + UTL_NameList *nl = nullptr; ACE_NEW_RETURN (nl, UTL_NameList ((yyvsp[0].idlist), - 0), + nullptr), 1); - if ((yyvsp[-3].nlval) == 0) + if ((yyvsp[-3].nlval) == nullptr) { (yyval.nlval) = nl; } @@ -4347,7 +4347,7 @@ yyreduce: case 136: #line 1673 "fe/idl.ypp" { - (yyval.nlval) = 0; + (yyval.nlval) = nullptr; } #line 4353 "fe/idl.tab.cpp" break; @@ -4359,7 +4359,7 @@ yyreduce: ACE_NEW_RETURN ((yyval.idlist), UTL_IdList ((yyvsp[0].idval), - 0), + nullptr), 1); } #line 4366 "fe/idl.tab.cpp" @@ -4378,16 +4378,16 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen); - Identifier *id = 0; + Identifier *id = nullptr; ACE_NEW_RETURN (id, Identifier ((yyvsp[-2].strval)), 1); ACE::strdelete ((yyvsp[-2].strval)); - (yyvsp[-2].strval) = 0; - UTL_IdList *sn = 0; + (yyvsp[-2].strval) = nullptr; + UTL_IdList *sn = nullptr; ACE_NEW_RETURN (sn, UTL_IdList ((yyvsp[0].idval), - 0), + nullptr), 1); ACE_NEW_RETURN ((yyval.idlist), UTL_IdList (id, @@ -4406,7 +4406,7 @@ yyreduce: // If there is a global one, it gets put into the UTL_IdList, // so we clean it up in the case above. ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; } #line 4412 "fe/idl.tab.cpp" break; @@ -4416,10 +4416,10 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen); - UTL_IdList *sn = 0; + UTL_IdList *sn = nullptr; ACE_NEW_RETURN (sn, UTL_IdList ((yyvsp[0].idval), - 0), + nullptr), 1); (yyvsp[-3].idlist)->nconc (sn); (yyval.idlist) = (yyvsp[-3].idlist); @@ -4434,7 +4434,7 @@ yyreduce: Identifier ((yyvsp[0].strval)), 1); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; } #line 4440 "fe/idl.tab.cpp" break; @@ -4446,7 +4446,7 @@ yyreduce: whereas id is usually a reference to a defining identifier */ ACE_NEW_RETURN ((yyval.idval), Identifier ((yyvsp[0].strval)), 1); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; } #line 4452 "fe/idl.tab.cpp" break; @@ -4455,7 +4455,7 @@ yyreduce: #line 1759 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - UTL_ScopedName n ((yyvsp[0].idval), 0); + UTL_ScopedName n ((yyvsp[0].idval), nullptr); if (ACE_OS::strcmp ((yyvsp[0].idval)->get_string (), "TypeCode") == 0 @@ -4471,19 +4471,19 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; break; } - AST_InterfaceFwd *f = 0; + AST_InterfaceFwd *f = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceForwardSeen); /* * Create a node representing a forward declaration of an * interface. Store it in the enclosing scope */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_interface_fwd (&n, 0, @@ -4493,7 +4493,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; } #line 4499 "fe/idl.tab.cpp" break; @@ -4503,8 +4503,8 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_InterfaceFwd *f = 0; + nullptr); + AST_InterfaceFwd *f = nullptr; idl_global->set_parse_state ( IDL_GlobalData::PS_InterfaceForwardSeen ); @@ -4513,7 +4513,7 @@ yyreduce: * Create a node representing a forward declaration of an * interface. Store it in the enclosing scope */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_interface_fwd (&n, 1, @@ -4523,7 +4523,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; } #line 4529 "fe/idl.tab.cpp" break; @@ -4533,8 +4533,8 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_InterfaceFwd *f = 0; + nullptr); + AST_InterfaceFwd *f = nullptr; idl_global->set_parse_state ( IDL_GlobalData::PS_InterfaceForwardSeen ); @@ -4543,7 +4543,7 @@ yyreduce: * Create a node representing a forward declaration of an * interface. Store it in the enclosing scope */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_interface_fwd (&n, 0, @@ -4553,7 +4553,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; (yyval.dcval) = dynamic_cast<AST_Decl *> (f); } @@ -4595,39 +4595,39 @@ yyreduce: case 151: #line 1877 "fe/idl.ypp" { - (yyval.dcval) = 0; - UTL_ScopedName n ((yyvsp[-4].idval), 0); + (yyval.dcval) = nullptr; + UTL_ScopedName n ((yyvsp[-4].idval), nullptr); UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Constant *c = 0; + AST_Constant *c = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_ConstExprSeen); /* * Create a node representing a constant declaration. Store * it in the enclosing scope. */ - if ((yyvsp[0].exval) != 0 && s != 0) + if ((yyvsp[0].exval) != nullptr && s != nullptr) { AST_Param_Holder *param_holder = (yyvsp[0].exval)->param_holder (); AST_Expression::AST_ExprValue *result = (yyvsp[0].exval)->check_and_coerce ((yyvsp[-6].etval), tao_enum_constant_decl); - tao_enum_constant_decl = 0; + tao_enum_constant_decl = nullptr; // If the expression is a template parameter place // holder, 'result' will be 0, but it's ok. - if (result == 0 && param_holder == 0) + if (result == nullptr && param_holder == nullptr) { idl_global->err ()->coercion_error ((yyvsp[0].exval), (yyvsp[-6].etval)); (yyvsp[0].exval)->destroy (); delete (yyvsp[0].exval); - (yyvsp[0].exval) = 0; + (yyvsp[0].exval) = nullptr; } else { AST_Expression::ExprType et = (yyvsp[-6].etval); - if (param_holder != 0 + if (param_holder != nullptr && et != param_holder->info ()->const_type_) { idl_global->err ()->mismatched_template_param ( @@ -4642,12 +4642,12 @@ yyreduce: } delete result; - result = 0; + result = nullptr; } (yyvsp[-4].idval)->destroy (); delete (yyvsp[-4].idval); - (yyvsp[-4].idval) = 0; + (yyvsp[-4].idval) = nullptr; } #line 4653 "fe/idl.tab.cpp" break; @@ -4672,8 +4672,8 @@ yyreduce: #line 1950 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_PredefinedType *c = 0; - AST_Typedef *t = 0; + AST_PredefinedType *c = nullptr; + AST_Typedef *t = nullptr; UTL_ScopedName *sn = (yyvsp[0].idlist); /* @@ -4683,7 +4683,7 @@ yyreduce: AST_Decl *d = s->lookup_by_name (sn); - if (s != 0 && d != 0) + if (s != nullptr && d != nullptr) { /* * Look through typedefs. @@ -4692,7 +4692,7 @@ yyreduce: { t = dynamic_cast<AST_Typedef*> (d); - if (t == 0) + if (t == nullptr) { break; } @@ -4732,8 +4732,8 @@ yyreduce: sn->destroy (); delete sn; - sn = 0; - (yyvsp[0].idlist) = 0; + sn = nullptr; + (yyvsp[0].idlist) = nullptr; } #line 4739 "fe/idl.tab.cpp" break; @@ -4875,7 +4875,7 @@ yyreduce: idl_global->gen ()->create_expr ( AST_Expression::EC_u_plus, (yyvsp[0].exval), - 0 + nullptr ); } #line 4882 "fe/idl.tab.cpp" @@ -4888,7 +4888,7 @@ yyreduce: idl_global->gen ()->create_expr ( AST_Expression::EC_u_minus, (yyvsp[0].exval), - 0 + nullptr ); } #line 4895 "fe/idl.tab.cpp" @@ -4901,7 +4901,7 @@ yyreduce: idl_global->gen ()->create_expr ( AST_Expression::EC_bit_neg, (yyvsp[0].exval), - 0 + nullptr ); } #line 4908 "fe/idl.tab.cpp" @@ -4917,7 +4917,7 @@ yyreduce: * but only when it is evaluated (such as when it is assigned * as a constant value). */ - AST_Expression *expr = 0; + AST_Expression *expr = nullptr; AST_Decl *node = stack_based_lookup_for_primary_expr ? idl_global->scopes ().lookup_by_name (name) : @@ -4963,7 +4963,7 @@ yyreduce: (yyval.exval) = expr; name->destroy (); delete name; - (yyvsp[0].idlist) = name = 0; + (yyvsp[0].idlist) = name = nullptr; } #line 4969 "fe/idl.tab.cpp" break; @@ -4999,7 +4999,7 @@ yyreduce: (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].sval)); (yyvsp[0].sval)->destroy (); delete (yyvsp[0].sval); - (yyvsp[0].sval) = 0; + (yyvsp[0].sval) = nullptr; } #line 5005 "fe/idl.tab.cpp" break; @@ -5010,7 +5010,7 @@ yyreduce: char *wide_string = (yyvsp[0].wsval); (yyval.exval) = idl_global->gen ()->create_expr (wide_string); ACE_OS::free (wide_string); - (yyvsp[0].wsval) = 0; + (yyvsp[0].wsval) = nullptr; } #line 5016 "fe/idl.tab.cpp" break; @@ -5076,7 +5076,7 @@ yyreduce: * AST_Constant), the AST_ExprValue will probably not be set, * but there's no need to check anyway */ - if (ev != 0) + if (ev != nullptr) { switch (ev->et) { @@ -5143,7 +5143,7 @@ yyreduce: } Identifier *id = (yyvsp[-1].idval); - UTL_ScopedName name (id, 0); + UTL_ScopedName name (id, nullptr); AST_Annotation_Decl::escape_name (&name); AST_Annotation_Decl *annotation_decl = idl_global->gen ()-> create_annotation_decl (&name); @@ -5162,7 +5162,7 @@ yyreduce: id->destroy (); delete id; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 5168 "fe/idl.tab.cpp" break; @@ -5186,7 +5186,7 @@ yyreduce: Identifier *name = (yyvsp[-2].idval); // Annotation member names can't clash with C++ keywords FE_Utils::original_local_name (name); - UTL_ScopedName *scoped_name = new UTL_ScopedName (name, 0); + UTL_ScopedName *scoped_name = new UTL_ScopedName (name, nullptr); AST_Expression *default_value = (yyvsp[-1].exval); AST_Decl * type_obj; @@ -5204,7 +5204,7 @@ yyreduce: } FE_Declarator *declarator = new FE_Declarator ( - scoped_name, FE_Declarator::FD_simple, 0); + scoped_name, FE_Declarator::FD_simple, nullptr); AST_Annotation_Member *member = idl_global->gen ()-> create_annotation_member ( type, declarator->compose (type_obj), declarator->name ()); @@ -5218,7 +5218,7 @@ yyreduce: // Check if types are compatible, else report error AST_Expression::AST_ExprValue *result = default_value->check_and_coerce (type, tao_enum_constant_decl); - tao_enum_constant_decl = 0; + tao_enum_constant_decl = nullptr; if (result) { member->value (default_value); @@ -5244,7 +5244,7 @@ yyreduce: case 210: #line 2462 "fe/idl.ypp" { - (yyval.exval) = 0; + (yyval.exval) = nullptr; } #line 5250 "fe/idl.tab.cpp" break; @@ -5294,7 +5294,7 @@ yyreduce: "Annotations are an IDL4 feature"); } - AST_Annotation_Decl *decl = 0; + AST_Annotation_Decl *decl = nullptr; UTL_ScopedName *name = (yyvsp[0].idlist); AST_Annotation_Decl::escape_name (name); @@ -5351,7 +5351,7 @@ yyreduce: { idl_global->ignore_lookup_errors_ = false; stack_based_lookup_for_primary_expr = false; - AST_Annotation_Appl *appl = 0; + AST_Annotation_Appl *appl = nullptr; UTL_ScopedName *name = (yyvsp[-2].idlist); AST_Annotation_Decl *decl = (yyvsp[-1].annotation_decl_val); AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val); @@ -5389,7 +5389,7 @@ yyreduce: case 217: #line 2591 "fe/idl.ypp" { - (yyval.annotation_params_val) = 0; + (yyval.annotation_params_val) = nullptr; } #line 5395 "fe/idl.tab.cpp" break; @@ -5399,7 +5399,7 @@ yyreduce: { AST_Annotation_Appl::Params *params = new AST_Annotation_Appl::Params; AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param; - param->id = 0; + param->id = nullptr; param->expr = (yyvsp[0].exval); params->push (param); (yyval.annotation_params_val) = params; @@ -5501,14 +5501,14 @@ yyreduce: #line 2668 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Native *node = 0; + AST_Native *node = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_NativeSeen); /* * Create a node representing a Native and add it to its * enclosing scope */ - if (s != 0) + if (s != nullptr) { node = idl_global->gen ()->create_native ( @@ -5522,9 +5522,9 @@ yyreduce: (yyvsp[0].deval)->destroy (); delete (yyvsp[0].deval); - (yyvsp[0].deval) = 0; + (yyvsp[0].deval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 5530 "fe/idl.tab.cpp" break; @@ -5532,7 +5532,7 @@ yyreduce: case 230: #line 2696 "fe/idl.ypp" { - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 5538 "fe/idl.tab.cpp" break; @@ -5552,8 +5552,8 @@ yyreduce: UTL_DeclList *decls = (yyvsp[0].dlval); UTL_Scope *s = idl_global->scopes ().top_non_null (); - FE_Declarator *d = 0; - AST_Typedef *t = 0; + FE_Declarator *d = nullptr; + AST_Typedef *t = nullptr; unsigned long index = 0UL; idl_global->set_parse_state (IDL_GlobalData::PS_DeclaratorsSeen); @@ -5566,13 +5566,13 @@ yyreduce: for (UTL_DecllistActiveIterator l (decls); !l.is_done (); l.next ()) { d = l.item (); - if (d == 0) + if (d == nullptr) { continue; } AST_Type *tp = d->compose (type_spec); - if (tp == 0) + if (tp == nullptr) { continue; } @@ -5605,7 +5605,7 @@ yyreduce: // This FE_Declarator class isn't destroyed with the AST. decls->destroy (); delete decls; - (yyvsp[0].dlval) = decls = 0; + (yyvsp[0].dlval) = decls = nullptr; } (yyval.dcval) = t; @@ -5628,15 +5628,15 @@ yyreduce: #line 2787 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Decl *d = 0; + AST_Decl *d = nullptr; - if (s != 0) + if (s != nullptr) { d = s->lookup_by_name ((yyvsp[0].idlist)); } - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[0].idlist)); } @@ -5675,13 +5675,13 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen); - UTL_DeclList *dl = 0; + UTL_DeclList *dl = nullptr; ACE_NEW_RETURN (dl, UTL_DeclList ((yyvsp[0].deval), - 0), + nullptr), 1); - if ((yyvsp[-3].dlval) == 0) + if ((yyvsp[-3].dlval) == nullptr) { (yyval.dlval) = dl; } @@ -5697,7 +5697,7 @@ yyreduce: case 258: #line 2877 "fe/idl.ypp" { - (yyval.dlval) = 0; + (yyval.dlval) = nullptr; } #line 5703 "fe/idl.tab.cpp" break; @@ -5726,13 +5726,13 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen); - UTL_DeclList *dl = 0; + UTL_DeclList *dl = nullptr; ACE_NEW_RETURN (dl, UTL_DeclList ((yyvsp[0].deval), - 0), + nullptr), 1); - if ((yyvsp[-3].dlval) == 0) + if ((yyvsp[-3].dlval) == nullptr) { (yyval.dlval) = dl; } @@ -5748,7 +5748,7 @@ yyreduce: case 264: #line 2924 "fe/idl.ypp" { - (yyval.dlval) = 0; + (yyval.dlval) = nullptr; } #line 5754 "fe/idl.tab.cpp" break; @@ -5756,15 +5756,15 @@ yyreduce: case 265: #line 2931 "fe/idl.ypp" { - UTL_ScopedName *sn = 0; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (sn, UTL_ScopedName ((yyvsp[0].idval), - 0), + nullptr), 1); ACE_NEW_RETURN ((yyval.deval), FE_Declarator (sn, FE_Declarator::FD_simple, - 0), + nullptr), 1); } #line 5771 "fe/idl.tab.cpp" @@ -5773,11 +5773,11 @@ yyreduce: case 266: #line 2947 "fe/idl.ypp" { - UTL_ScopedName *sn = 0; + UTL_ScopedName *sn = nullptr; ACE_NEW_RETURN (sn, UTL_ScopedName ( (yyvsp[0].dcval)->local_name ()->copy (), - 0 + nullptr ), 1); ACE_NEW_RETURN ((yyval.deval), @@ -5938,14 +5938,14 @@ yyreduce: #line 3074 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - UTL_ScopedName n ((yyvsp[0].idval), 0); - AST_Structure *d = 0; + UTL_ScopedName n ((yyvsp[0].idval), nullptr); + AST_Structure *d = nullptr; /* * Create a node representing a struct declaration. Add it * to the enclosing scope */ - if (s != 0) + if (s != nullptr) { d = idl_global->gen ()->create_structure ( @@ -5964,7 +5964,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; } #line 5970 "fe/idl.tab.cpp" break; @@ -6039,15 +6039,15 @@ yyreduce: #line 3160 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - FE_Declarator *d = 0; - AST_Field *f = 0; + FE_Declarator *d = nullptr; + AST_Field *f = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsCompleted); - AST_Decls *members = 0; + AST_Decls *members = nullptr; /* * Check for illegal recursive use of type. */ - if ((yyvsp[-4].dcval) != 0 + if ((yyvsp[-4].dcval) != nullptr && AST_illegal_recursive_type ((yyvsp[-4].dcval))) { idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, @@ -6066,14 +6066,14 @@ yyreduce: { d = l.item (); - if (d == 0) + if (d == nullptr) { continue; } AST_Type *tp = d->compose ((yyvsp[-4].dcval)); - if (tp == 0) + if (tp == nullptr) { continue; } @@ -6086,7 +6086,7 @@ yyreduce: (yyvsp[-2].dlval)->destroy (); delete (yyvsp[-2].dlval); - (yyvsp[-2].dlval) = 0; + (yyvsp[-2].dlval) = nullptr; (yyval.decls_val) = members; } @@ -6139,17 +6139,17 @@ yyreduce: #line 3242 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - UTL_ScopedName n ((yyvsp[-3].idval), 0); - AST_Union *u = 0; + UTL_ScopedName n ((yyvsp[-3].idval), nullptr); + AST_Union *u = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen); /* * Create a node representing an empty union. Add it to its enclosing * scope. */ - if (s != 0) + if (s != nullptr) { - u = idl_global->gen ()->create_union (0, + u = idl_global->gen ()->create_union (nullptr, &n, s->is_local (), s->is_abstract ()); @@ -6194,25 +6194,25 @@ yyreduce: AST_Annotation_Appls *disc_annotations = (yyvsp[-3].annotations_val); UTL_Scope *s = idl_global->scopes ().top_non_null (); - UTL_ScopedName n ((yyvsp[-8].idval), 0); + UTL_ScopedName n ((yyvsp[-8].idval), nullptr); idl_global->set_parse_state (IDL_GlobalData::PS_SwitchCloseParSeen); /* * Create a node representing a union. */ - if ((yyvsp[-2].dcval) != 0 && s != 0) + if ((yyvsp[-2].dcval) != nullptr && s != nullptr) { AST_ConcreteType *tp = dynamic_cast<AST_ConcreteType*> ((yyvsp[-2].dcval)); - if (tp == 0) + if (tp == nullptr) { idl_global->err ()->not_a_type ((yyvsp[-2].dcval)); } else { /* Create a union with a correct discriminator. */ - AST_Union *u = 0; + AST_Union *u = nullptr; u = idl_global->gen ()->create_union (tp, &n, s->is_local (), @@ -6236,7 +6236,7 @@ yyreduce: (yyvsp[-8].idval)->destroy (); delete (yyvsp[-8].idval); - (yyvsp[-8].idval) = 0; + (yyvsp[-8].idval) = nullptr; delete disc_annotations; } @@ -6271,7 +6271,7 @@ yyreduce: idl_global->scopes ().top_non_null () ); - if ((yyval.dcval) != 0) + if ((yyval.dcval) != nullptr) { idl_global->scopes ().pop (); } @@ -6335,9 +6335,9 @@ yyreduce: #line 3402 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Decl *d = 0; - AST_PredefinedType *p = 0; - AST_Typedef *t = 0; + AST_Decl *d = nullptr; + AST_PredefinedType *p = nullptr; + AST_Typedef *t = nullptr; bool found = false; /* @@ -6349,7 +6349,7 @@ yyreduce: d = s->lookup_by_name ((yyvsp[0].idlist)); - if (s != 0 && d != 0) + if (s != nullptr && d != nullptr) { while (!found) { @@ -6362,7 +6362,7 @@ yyreduce: case AST_Decl::NT_pre_defined: p = dynamic_cast<AST_PredefinedType*> (d); - if (p != 0) + if (p != nullptr) { switch (p->pt ()) { @@ -6383,18 +6383,18 @@ yyreduce: idl_global->err ()->error0 ( UTL_Error::EIDL_DISC_TYPE ); - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; found = true; break; default: - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; found = true; break; } } else { - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; found = true; } @@ -6402,14 +6402,14 @@ yyreduce: case AST_Decl::NT_typedef: t = dynamic_cast<AST_Typedef*> (d); - if (t != 0) + if (t != nullptr) { d = t->base_type (); } break; default: - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; found = true; break; } @@ -6417,16 +6417,16 @@ yyreduce: } else { - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } - if ((yyval.dcval) == 0) + if ((yyval.dcval) == nullptr) { idl_global->err ()->lookup_error ((yyvsp[0].idlist)); (yyvsp[0].idlist)->destroy (); delete (yyvsp[0].idlist); - (yyvsp[0].idlist) = 0; + (yyvsp[0].idlist) = nullptr; /* If we don't return here, we'll crash later.*/ if (!idl_global->ignore_lookup_errors_) @@ -6437,7 +6437,7 @@ yyreduce: (yyvsp[0].idlist)->destroy (); delete (yyvsp[0].idlist); - (yyvsp[0].idlist) = 0; + (yyvsp[0].idlist) = nullptr; } #line 6443 "fe/idl.tab.cpp" break; @@ -6462,7 +6462,7 @@ yyreduce: #line 3527 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_UnionBranch *b = 0; + AST_UnionBranch *b = nullptr; AST_Annotation_Appls *annotations = (yyvsp[-3].annotations_val); AST_Field *f = (yyvsp[-2].ffval); idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemCompleted); @@ -6471,7 +6471,7 @@ yyreduce: * Create several nodes representing branches of a union. * Add them to the enclosing scope (the union scope) */ - if (s != 0 && (yyvsp[-5].llval) != 0 && (yyvsp[-2].ffval) != 0) + if (s != nullptr && (yyvsp[-5].llval) != nullptr && (yyvsp[-2].ffval) != nullptr) { b = idl_global->gen ()->create_union_branch ( @@ -6486,7 +6486,7 @@ yyreduce: // but the rest still needs to be cleaned up. f->AST_Decl::destroy (); delete f; - f = 0; + f = nullptr; } delete annotations; @@ -6525,13 +6525,13 @@ yyreduce: case 324: #line 3581 "fe/idl.ypp" { - UTL_LabelList *ll = 0; + UTL_LabelList *ll = nullptr; ACE_NEW_RETURN (ll, UTL_LabelList ((yyvsp[0].ulval), - 0), + nullptr), 1); - if ((yyvsp[-1].llval) == 0) + if ((yyvsp[-1].llval) == nullptr) { (yyval.llval) = ll; } @@ -6547,7 +6547,7 @@ yyreduce: case 325: #line 3599 "fe/idl.ypp" { - (yyval.llval) = 0; + (yyval.llval) = nullptr; } #line 6553 "fe/idl.tab.cpp" break; @@ -6567,7 +6567,7 @@ yyreduce: (yyval.ulval) = idl_global->gen ()->create_union_label ( AST_UnionLabel::UL_default, - 0 + nullptr ); } #line 6574 "fe/idl.tab.cpp" @@ -6618,28 +6618,28 @@ yyreduce: /* * Check for illegal recursive use of type */ - if ((yyvsp[-2].dcval) != 0 + if ((yyvsp[-2].dcval) != nullptr && AST_illegal_recursive_type ((yyvsp[-2].dcval))) { idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, (yyvsp[-2].dcval)); - (yyval.ffval) = 0; + (yyval.ffval) = nullptr; } /* * Create a field in a union branch */ - else if ((yyvsp[-2].dcval) == 0 - || (yyvsp[0].deval) == 0) + else if ((yyvsp[-2].dcval) == nullptr + || (yyvsp[0].deval) == nullptr) { - (yyval.ffval) = 0; + (yyval.ffval) = nullptr; } else { AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval)); - if (tp == 0) + if (tp == nullptr) { - (yyval.ffval) = 0; + (yyval.ffval) = nullptr; } else { @@ -6651,7 +6651,7 @@ yyreduce: (yyvsp[0].deval)->destroy (); delete (yyvsp[0].deval); - (yyvsp[0].deval) = 0; + (yyvsp[0].deval) = nullptr; } } #line 6658 "fe/idl.tab.cpp" @@ -6662,13 +6662,13 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_StructureFwd *d = 0; + nullptr); + AST_StructureFwd *d = nullptr; /* * Create a node representing a forward declaration of a struct. */ - if (s != 0) + if (s != nullptr) { d = idl_global->gen ()->create_structure_fwd (&n); (void) s->fe_add_structure_fwd (d); @@ -6676,7 +6676,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; (yyval.dcval) = d; } @@ -6688,13 +6688,13 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_UnionFwd *u = 0; + nullptr); + AST_UnionFwd *u = nullptr; /* * Create a node representing a forward declaration of a union. */ - if (s != 0) + if (s != nullptr) { u = idl_global->gen ()->create_union_fwd (&n); (void) s->fe_add_union_fwd (u); @@ -6702,7 +6702,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; } #line 6708 "fe/idl.tab.cpp" break; @@ -6719,15 +6719,15 @@ yyreduce: #line 3741 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - UTL_ScopedName n ((yyvsp[0].idval), 0); - AST_Enum *e = 0; + UTL_ScopedName n ((yyvsp[0].idval), nullptr); + AST_Enum *e = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_EnumIDSeen); /* * Create a node representing an enum and add it to its * enclosing scope. */ - if (s != 0) + if (s != nullptr) { e = idl_global->gen ()->create_enum (&n, s->is_local (), @@ -6745,7 +6745,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; } #line 6751 "fe/idl.tab.cpp" break; @@ -6774,9 +6774,9 @@ yyreduce: /* * Done with this enum. Pop its scope from the scopes stack. */ - if (idl_global->scopes ().top () == 0) + if (idl_global->scopes ().top () == nullptr) { - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } else { @@ -6804,21 +6804,21 @@ yyreduce: AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val); Identifier id ((yyvsp[0].strval)); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; - UTL_ScopedName n (&id, 0); - AST_EnumVal *e = 0; - AST_Enum *c = 0; + (yyvsp[0].strval) = nullptr; + UTL_ScopedName n (&id, nullptr); + AST_EnumVal *e = nullptr; + AST_Enum *c = nullptr; /* * Create a node representing one enumerator in an enum * Add it to the enclosing scope (the enum scope) */ - if (s != 0 + if (s != nullptr && s->scope_node_type () == AST_Decl::NT_enum) { c = dynamic_cast<AST_Enum*> (s); - if (c != 0) + if (c != nullptr) { e = idl_global->gen ()->create_enum_val ( c->next_enum_val (), @@ -6857,10 +6857,10 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen); - AST_Sequence *seq = 0; + AST_Sequence *seq = nullptr; Decl_Annotations_Pair *seq_head = (yyvsp[-5].decl_annotations_pair_val); - AST_Decl *type = 0; - AST_Annotation_Appls *type_annotations = 0; + AST_Decl *type = nullptr; + AST_Annotation_Appls *type_annotations = nullptr; if (seq_head) { type = seq_head->decl; @@ -6871,7 +6871,7 @@ yyreduce: /* * Remove sequence marker from scopes stack. */ - if (idl_global->scopes ().top () == 0) + if (idl_global->scopes ().top () == nullptr) { idl_global->scopes ().pop (); } @@ -6881,10 +6881,10 @@ yyreduce: /* * Create a node representing a sequence */ - AST_Expression::AST_ExprValue *ev = 0; - AST_Param_Holder *param_holder = 0; + AST_Expression::AST_ExprValue *ev = nullptr; + AST_Param_Holder *param_holder = nullptr; - if ((yyvsp[-2].exval) != 0) + if ((yyvsp[-2].exval) != nullptr) { param_holder = (yyvsp[-2].exval)->param_holder (); @@ -6895,8 +6895,8 @@ yyreduce: // If the expression corresponds to a template parameter, // it's ok for the coercion to fail at this point. We check // for a type mismatch below. - if (0 == (yyvsp[-2].exval) - || (0 == ev && 0 == param_holder)) + if (nullptr == (yyvsp[-2].exval) + || (nullptr == ev && nullptr == param_holder)) { idl_global->err ()->coercion_error ((yyvsp[-2].exval), AST_Expression::EV_ulong); @@ -6905,7 +6905,7 @@ yyreduce: { AST_Type *tp = dynamic_cast<AST_Type*> (type); - if (0 == tp) + if (nullptr == tp) { ; // Error will be caught in FE_Declarator. } @@ -6913,7 +6913,7 @@ yyreduce: { Identifier id ("sequence"); UTL_ScopedName sn (&id, - 0); + nullptr); seq = idl_global->gen ()->create_sequence ( @@ -6931,7 +6931,7 @@ yyreduce: delete type_annotations; delete ev; - ev = 0; + ev = nullptr; (yyval.dcval) = seq; } #line 6938 "fe/idl.tab.cpp" @@ -6942,10 +6942,10 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen); - AST_Sequence *seq = 0; + AST_Sequence *seq = nullptr; Decl_Annotations_Pair *seq_head = (yyvsp[-1].decl_annotations_pair_val); - AST_Decl *type = 0; - AST_Annotation_Appls *type_annotations = 0; + AST_Decl *type = nullptr; + AST_Annotation_Appls *type_annotations = nullptr; if (seq_head) { type = seq_head->decl; @@ -6956,7 +6956,7 @@ yyreduce: /* * Remove sequence marker from scopes stack. */ - if (idl_global->scopes ().top () == 0) + if (idl_global->scopes ().top () == nullptr) { idl_global->scopes ().pop (); } @@ -6970,14 +6970,14 @@ yyreduce: { AST_Type *tp = dynamic_cast<AST_Type*> (type); - if (tp == 0) + if (tp == nullptr) { ; // Error will be caught in FE_Declarator. } else { Identifier id ("sequence"); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); ACE_CDR::ULong bound = 0UL; seq = @@ -7011,7 +7011,7 @@ yyreduce: /* * Push a sequence marker on scopes stack. */ - idl_global->scopes ().push (0); + idl_global->scopes ().push (nullptr); } #line 7017 "fe/idl.tab.cpp" break; @@ -7069,18 +7069,18 @@ yyreduce: /* * Create a node representing a string. */ - AST_Expression::AST_ExprValue *ev = 0; + AST_Expression::AST_ExprValue *ev = nullptr; - if ((yyvsp[-2].exval) != 0) + if ((yyvsp[-2].exval) != nullptr) { ev = (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong); } - if (0 == (yyvsp[-2].exval) || 0 == ev) + if (nullptr == (yyvsp[-2].exval) || nullptr == ev) { idl_global->err ()->coercion_error ((yyvsp[-2].exval), AST_Expression::EV_ulong); - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } else { @@ -7099,7 +7099,7 @@ yyreduce: } delete ev; - ev = 0; + ev = nullptr; } #line 7105 "fe/idl.tab.cpp" break; @@ -7163,12 +7163,12 @@ yyreduce: /* * Create a node representing a string. */ - if ((yyvsp[-2].exval) == 0 - || (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong) == 0) + if ((yyvsp[-2].exval) == nullptr + || (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong) == nullptr) { idl_global->err ()->coercion_error ((yyvsp[-2].exval), AST_Expression::EV_ulong); - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } else { @@ -7237,7 +7237,7 @@ yyreduce: { idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted); - AST_Array *array = 0; + AST_Array *array = nullptr; AST_Annotation_Appls *base_type_annotations = (yyvsp[-1].annotations_val); UTL_ExprList *array_dims = (yyvsp[0].elval); @@ -7247,7 +7247,7 @@ yyreduce: if (array_dims) { UTL_ScopedName sn ((yyvsp[-3].idval), - 0); + nullptr); array = idl_global->gen ()->create_array ( &sn, @@ -7286,13 +7286,13 @@ yyreduce: case 366: #line 4246 "fe/idl.ypp" { - UTL_ExprList *el = 0; + UTL_ExprList *el = nullptr; ACE_NEW_RETURN (el, UTL_ExprList ((yyvsp[0].exval), - 0), + nullptr), 1); - if ((yyvsp[-1].elval) == 0) + if ((yyvsp[-1].elval) == nullptr) { (yyval.elval) = el; } @@ -7308,7 +7308,7 @@ yyreduce: case 367: #line 4264 "fe/idl.ypp" { - (yyval.elval) = 0; + (yyval.elval) = nullptr; } #line 7314 "fe/idl.tab.cpp" break; @@ -7338,10 +7338,10 @@ yyreduce: * Array dimensions are expressions which must be coerced to * positive integers. */ - AST_Expression::AST_ExprValue *ev = 0; - AST_Param_Holder *param_holder = 0; + AST_Expression::AST_ExprValue *ev = nullptr; + AST_Param_Holder *param_holder = nullptr; - if ((yyvsp[-2].exval) != 0) + if ((yyvsp[-2].exval) != nullptr) { param_holder = (yyvsp[-2].exval)->param_holder (); @@ -7350,16 +7350,16 @@ yyreduce: (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong); } - if (0 == (yyvsp[-2].exval) - || (ev == 0 && param_holder == 0)) + if (nullptr == (yyvsp[-2].exval) + || (ev == nullptr && param_holder == nullptr)) { idl_global->err ()->coercion_error ((yyvsp[-2].exval), AST_Expression::EV_ulong); - (yyval.exval) = 0; + (yyval.exval) = nullptr; } else { - if (param_holder != 0) + if (param_holder != nullptr) { AST_Expression::ExprType et = param_holder->info ()->const_type_; @@ -7373,7 +7373,7 @@ yyreduce: param_holder->info ()->name_.c_str ()); delete ev; - ev = 0; + ev = nullptr; return 1; } } @@ -7382,7 +7382,7 @@ yyreduce: } delete ev; - ev = 0; + ev = nullptr; } #line 7388 "fe/idl.tab.cpp" break; @@ -7423,8 +7423,8 @@ yyreduce: #line 4357 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Attribute *a = 0; - FE_Declarator *d = 0; + AST_Attribute *a = nullptr; + FE_Declarator *d = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted); @@ -7432,20 +7432,20 @@ yyreduce: * Create nodes representing attributes and add them to the * enclosing scope. */ - if (s != 0 && (yyvsp[-4].dcval) != 0 && (yyvsp[-2].dlval) != 0) + if (s != nullptr && (yyvsp[-4].dcval) != nullptr && (yyvsp[-2].dlval) != nullptr) { for (UTL_DecllistActiveIterator l ((yyvsp[-2].dlval)); !l.is_done (); l.next ()) { d = l.item (); - if (d == 0) + if (d == nullptr) { continue; } AST_Type *tp = d->compose ((yyvsp[-4].dcval)); - if (tp == 0) + if (tp == nullptr) { continue; } @@ -7453,13 +7453,13 @@ yyreduce: a = idl_global->gen ()->create_attribute ( true, tp, d->name (), s->is_local (), s->is_abstract ()); - if ((yyvsp[0].nlval) != 0) + if ((yyvsp[0].nlval) != nullptr) { (void) a->fe_add_get_exceptions ((yyvsp[0].nlval)); (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } (void) s->fe_add_attribute (a); @@ -7468,7 +7468,7 @@ yyreduce: (yyvsp[-2].dlval)->destroy (); delete (yyvsp[-2].dlval); - (yyvsp[-2].dlval) = 0; + (yyvsp[-2].dlval) = nullptr; (yyval.dcval) = a; } @@ -7511,8 +7511,8 @@ yyreduce: #line 4428 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Attribute *a = 0; - FE_Declarator *d = 0; + AST_Attribute *a = nullptr; + FE_Declarator *d = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseCompleted); @@ -7520,20 +7520,20 @@ yyreduce: * Create nodes representing attributes and add them to the * enclosing scope. */ - if (s != 0 && (yyvsp[-6].dcval) != 0 && (yyvsp[-4].dlval) != 0) + if (s != nullptr && (yyvsp[-6].dcval) != nullptr && (yyvsp[-4].dlval) != nullptr) { for (UTL_DecllistActiveIterator l ((yyvsp[-4].dlval)); !l.is_done (); l.next ()) { d = l.item (); - if (d == 0) + if (d == nullptr) { continue; } AST_Type *tp = d->compose ((yyvsp[-6].dcval)); - if (tp == 0) + if (tp == nullptr) { continue; } @@ -7541,22 +7541,22 @@ yyreduce: a = idl_global->gen ()->create_attribute ( false, tp, d->name (), s->is_local (), s->is_abstract ()); - if ((yyvsp[-2].nlval) != 0) + if ((yyvsp[-2].nlval) != nullptr) { (void) a->fe_add_get_exceptions ((yyvsp[-2].nlval)); (yyvsp[-2].nlval)->destroy (); delete (yyvsp[-2].nlval); - (yyvsp[-2].nlval) = 0; + (yyvsp[-2].nlval) = nullptr; } - if ((yyvsp[0].nlval) != 0) + if ((yyvsp[0].nlval) != nullptr) { (void) a->fe_add_set_exceptions ((yyvsp[0].nlval)); (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } (void) s->fe_add_attribute (a); @@ -7565,7 +7565,7 @@ yyreduce: (yyvsp[-4].dlval)->destroy (); delete (yyvsp[-4].dlval); - (yyvsp[-4].dlval) = 0; + (yyvsp[-4].dlval) = nullptr; (yyval.dcval) = a; } @@ -7585,8 +7585,8 @@ yyreduce: { Identifier *&id = (yyvsp[0].idval); UTL_Scope *scope = idl_global->scopes ().top_non_null (); - UTL_ScopedName scoped_name (id, 0); - AST_Exception *exception = 0; + UTL_ScopedName scoped_name (id, nullptr); + AST_Exception *exception = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_ExceptIDSeen); /* @@ -7609,7 +7609,7 @@ yyreduce: id->destroy (); delete id; - id = 0; + id = nullptr; (yyval.dcval) = exception; } @@ -7657,28 +7657,28 @@ yyreduce: case 389: #line 4553 "fe/idl.ypp" { - AST_Operation *op = 0; + AST_Operation *op = nullptr; UTL_Scope *scope = idl_global->scopes ().top_non_null (); AST_Operation::Flags op_flags = (yyvsp[-3].ofval); AST_Decl *type_node = (yyvsp[-2].dcval); - (yyvsp[-2].dcval) = 0; + (yyvsp[-2].dcval) = nullptr; Identifier id ((yyvsp[0].strval)); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; - UTL_ScopedName name (&id, 0); + UTL_ScopedName name (&id, nullptr); idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen); /* * Create a node representing an operation on an interface * and add it to its enclosing scope. */ - if (scope != 0 && type_node != 0) + if (scope != nullptr && type_node != nullptr) { AST_Type *type = dynamic_cast<AST_Type*> (type_node); - if (type == 0) + if (type == nullptr) { idl_global->err ()->not_a_type (type_node); } @@ -7702,7 +7702,7 @@ yyreduce: idl_global->err ()->local_remote_mismatch (type, op); op->destroy (); delete op; - op = 0; + op = nullptr; } else { @@ -7739,22 +7739,22 @@ yyreduce: #line 4622 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Operation *o = 0; + AST_Operation *o = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_OpCompleted); /* * Add exceptions and context to the operation. */ - if (s != 0 && s->scope_node_type () == AST_Decl::NT_op) + if (s != nullptr && s->scope_node_type () == AST_Decl::NT_op) { o = dynamic_cast<AST_Operation*> (s); - if ((yyvsp[-2].nlval) != 0 && o != 0) + if ((yyvsp[-2].nlval) != nullptr && o != nullptr) { (void) o->fe_add_exceptions ((yyvsp[-2].nlval)); } - if ((yyvsp[0].slval) != 0) + if ((yyvsp[0].slval) != nullptr) { (void) o->fe_add_context ((yyvsp[0].slval)); } @@ -7836,18 +7836,18 @@ yyreduce: Identifier id ((yyvsp[0].strval)); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; UTL_ScopedName n (&id, - 0); - AST_Factory *factory = 0; + nullptr); + AST_Factory *factory = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen); /* * Create a node representing an factory construct * and add it to its enclosing scope */ - if (s != 0) + if (s != nullptr) { factory = idl_global->gen ()->create_factory (&n); (void) s->fe_add_factory (factory); @@ -7950,20 +7950,20 @@ yyreduce: #line 4794 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Argument *a = 0; + AST_Argument *a = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen); /* * Create a node representing an argument to an operation * Add it to the enclosing scope (the operation scope). */ - if ((yyvsp[-2].dcval) != 0 - && (yyvsp[0].deval) != 0 && - s != 0) + if ((yyvsp[-2].dcval) != nullptr + && (yyvsp[0].deval) != nullptr && + s != nullptr) { AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval)); - if (tp != 0) + if (tp != nullptr) { a = idl_global->gen ()->create_argument ( AST_Argument::dir_IN, @@ -7977,7 +7977,7 @@ yyreduce: (yyvsp[0].deval)->destroy (); delete (yyvsp[0].deval); - (yyvsp[0].deval) = 0; + (yyvsp[0].deval) = nullptr; } #line 7983 "fe/idl.tab.cpp" break; @@ -8042,20 +8042,20 @@ yyreduce: #line 4869 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Argument *a = 0; + AST_Argument *a = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen); /* * Create a node representing an argument to an operation * Add it to the enclosing scope (the operation scope). */ - if ((yyvsp[-2].dcval) != 0 - && (yyvsp[0].deval) != 0 - && s != 0) + if ((yyvsp[-2].dcval) != nullptr + && (yyvsp[0].deval) != nullptr + && s != nullptr) { AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval)); - if (tp != 0) + if (tp != nullptr) { if (!s->is_local () && tp->is_local ()) { @@ -8076,7 +8076,7 @@ yyreduce: (yyvsp[0].deval)->destroy (); delete (yyvsp[0].deval); - (yyvsp[0].deval) = 0; + (yyvsp[0].deval) = nullptr; } #line 8082 "fe/idl.tab.cpp" break; @@ -8096,19 +8096,19 @@ yyreduce: #line 4920 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Decl *d = 0; + AST_Decl *d = nullptr; UTL_ScopedName *n = (yyvsp[0].idlist); - if (s != 0) + if (s != nullptr) { d = s->lookup_by_name (n, false, false); } - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (n); (yyvsp[0].idlist)->destroy (); - (yyvsp[0].idlist) = 0; + (yyvsp[0].idlist) = nullptr; /* If we don't return here, we'll crash later.*/ return 1; @@ -8118,7 +8118,7 @@ yyreduce: d->last_referenced_as ((yyvsp[0].idlist)); AST_Decl::NodeType nt = d->node_type (); AST_Type *t = dynamic_cast<AST_Type*> (d); - AST_Typedef *td = 0; + AST_Typedef *td = nullptr; bool can_be_undefined = false; if (nt == AST_Decl::NT_typedef) @@ -8176,7 +8176,7 @@ yyreduce: AST_StructureFwd *fwd = dynamic_cast<AST_StructureFwd*> (d); - if (fwd != 0) + if (fwd != nullptr) { t = fwd->full_definition (); @@ -8252,7 +8252,7 @@ yyreduce: case 434: #line 5056 "fe/idl.ypp" { - (yyval.nlval) = 0; + (yyval.nlval) = nullptr; } #line 8258 "fe/idl.tab.cpp" break; @@ -8285,7 +8285,7 @@ yyreduce: case 438: #line 5077 "fe/idl.ypp" { - (yyval.nlval) = 0; + (yyval.nlval) = nullptr; } #line 8291 "fe/idl.tab.cpp" break; @@ -8318,7 +8318,7 @@ yyreduce: case 442: #line 5098 "fe/idl.ypp" { - (yyval.nlval) = 0; + (yyval.nlval) = nullptr; } #line 8324 "fe/idl.tab.cpp" break; @@ -8351,7 +8351,7 @@ yyreduce: case 446: #line 5119 "fe/idl.ypp" { - (yyval.slval) = 0; + (yyval.slval) = nullptr; } #line 8357 "fe/idl.tab.cpp" break; @@ -8378,13 +8378,13 @@ yyreduce: case 449: #line 5141 "fe/idl.ypp" { - UTL_StrList *sl = 0; + UTL_StrList *sl = nullptr; ACE_NEW_RETURN (sl, UTL_StrList ((yyvsp[0].sval), - 0), + nullptr), 1); - if ((yyvsp[-3].slval) == 0) + if ((yyvsp[-3].slval) == nullptr) { (yyval.slval) = sl; } @@ -8400,7 +8400,7 @@ yyreduce: case 450: #line 5159 "fe/idl.ypp" { - (yyval.slval) = 0; + (yyval.slval) = nullptr; } #line 8406 "fe/idl.tab.cpp" break; @@ -8412,7 +8412,7 @@ yyreduce: AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist)); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); } @@ -8425,13 +8425,13 @@ yyreduce: (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyvsp[0].sval)->destroy (); delete (yyvsp[0].sval); - (yyvsp[0].sval) = 0; + (yyvsp[0].sval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 8437 "fe/idl.tab.cpp" break; @@ -8452,7 +8452,7 @@ yyreduce: s->lookup_by_name ((yyvsp[-1].idlist)); } - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); } @@ -8465,13 +8465,13 @@ yyreduce: (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyvsp[0].sval)->destroy (); delete (yyvsp[0].sval); - (yyvsp[0].sval) = 0; + (yyvsp[0].sval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 8477 "fe/idl.tab.cpp" break; @@ -8481,8 +8481,8 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_ComponentFwd *f = 0; + nullptr); + AST_ComponentFwd *f = nullptr; idl_global->set_parse_state ( IDL_GlobalData::PS_ComponentForwardSeen ); @@ -8491,7 +8491,7 @@ yyreduce: * Create a node representing a forward declaration of a * component. Store it in the enclosing scope. */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_component_fwd (&n); (void) s->fe_add_component_fwd (f); @@ -8499,9 +8499,9 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 8507 "fe/idl.tab.cpp" break; @@ -8511,7 +8511,7 @@ yyreduce: { FE_ComponentHeader *&component_header = (yyvsp[0].chval); UTL_Scope *scope = idl_global->scopes ().top_non_null (); - AST_Component *component = 0; + AST_Component *component = nullptr; /* * Make a new component node and add it to the enclosing scope. @@ -8539,7 +8539,7 @@ yyreduce: // This FE_ComponentHeader class isn't destroyed with the AST. component_header->destroy (); delete component_header; - component_header = 0; + component_header = nullptr; } /* @@ -8608,10 +8608,10 @@ yyreduce: * Create an AST representation of the information in the header * part of a component. */ - UTL_ScopedName *n = 0; + UTL_ScopedName *n = nullptr; ACE_NEW_RETURN (n, UTL_ScopedName ((yyvsp[-4].idval), - 0), + nullptr), 1); ACE_NEW_RETURN ((yyval.chval), FE_ComponentHeader (n, @@ -8620,18 +8620,18 @@ yyreduce: false), 1); - if (0 != (yyvsp[0].nlval)) + if (nullptr != (yyvsp[0].nlval)) { (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } - if (0 != (yyvsp[-2].idlist)) + if (nullptr != (yyvsp[-2].idlist)) { (yyvsp[-2].idlist)->destroy (); delete (yyvsp[-2].idlist); - (yyvsp[-2].idlist) = 0; + (yyvsp[-2].idlist) = nullptr; } } #line 8638 "fe/idl.tab.cpp" @@ -8656,7 +8656,7 @@ yyreduce: case 465: #line 5388 "fe/idl.ypp" { - (yyval.idlist) = 0; + (yyval.idlist) = nullptr; } #line 8662 "fe/idl.tab.cpp" break; @@ -8805,12 +8805,12 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; AST_Decl::NodeType nt = AST_Decl::NT_type; - AST_Param_Holder *ph = 0; + AST_Param_Holder *ph = nullptr; AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist), true, false); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); so_far_so_good = false; @@ -8861,7 +8861,7 @@ yyreduce: } } - AST_Provides *provides = 0; + AST_Provides *provides = nullptr; if (so_far_so_good) { @@ -8872,7 +8872,7 @@ yyreduce: FE_Utils::original_local_name ((yyvsp[0].idval)); UTL_ScopedName sn ((yyvsp[0].idval), - 0); + nullptr); provides = idl_global->gen ()->create_provides ( &sn, port_interface_type); @@ -8882,11 +8882,11 @@ yyreduce: (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; (yyval.dcval) = dynamic_cast<AST_Decl *> (provides); } @@ -8906,16 +8906,16 @@ yyreduce: case 485: #line 5579 "fe/idl.ypp" { - Identifier *corba_id = 0; + Identifier *corba_id = nullptr; ACE_NEW_RETURN (corba_id, Identifier ("Object"), 1); - UTL_IdList *conc_name = 0; + UTL_IdList *conc_name = nullptr; ACE_NEW_RETURN (conc_name, UTL_IdList (corba_id, - 0), + nullptr), 1); ACE_NEW_RETURN (corba_id, @@ -8936,12 +8936,12 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; AST_Decl::NodeType nt = AST_Decl::NT_type; - AST_Param_Holder *ph = 0; + AST_Param_Holder *ph = nullptr; AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist), true, false); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); so_far_so_good = false; @@ -8992,7 +8992,7 @@ yyreduce: } } - AST_Uses *uses = 0; + AST_Uses *uses = nullptr; if (so_far_so_good) { @@ -9003,7 +9003,7 @@ yyreduce: FE_Utils::original_local_name ((yyvsp[0].idval)); UTL_ScopedName sn ((yyvsp[0].idval), - 0); + nullptr); uses = idl_global->gen ()->create_uses ( &sn, port_interface_type, (yyvsp[-2].bval)); @@ -9012,7 +9012,7 @@ yyreduce: AST_Component *c = dynamic_cast<AST_Component*> (s); - if (c != 0 + if (c != nullptr && uses->is_multiple () && !idl_global->using_ifr_backend () && !idl_global->ignore_idl3 () @@ -9027,11 +9027,11 @@ yyreduce: (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; (yyval.dcval) = uses; } @@ -9070,12 +9070,12 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; AST_Decl::NodeType nt = AST_Decl::NT_type; - AST_Param_Holder *ph = 0; + AST_Param_Holder *ph = nullptr; AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist), true, false); - if (0 == d) + if (nullptr == d) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); so_far_so_good = false; @@ -9109,7 +9109,7 @@ yyreduce: } } - AST_Emits *e = 0; + AST_Emits *e = nullptr; if (so_far_so_good) { @@ -9120,7 +9120,7 @@ yyreduce: FE_Utils::original_local_name ((yyvsp[0].idval)); UTL_ScopedName sn ((yyvsp[0].idval), - 0); + nullptr); e = idl_global->gen ()->create_emits (&sn, event_type); @@ -9129,11 +9129,11 @@ yyreduce: (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; (yyval.dcval) = e; } @@ -9146,12 +9146,12 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; AST_Decl::NodeType nt = AST_Decl::NT_type; - AST_Param_Holder *ph = 0; + AST_Param_Holder *ph = nullptr; AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist), true, false); - if (0 == d) + if (nullptr == d) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); so_far_so_good = false; @@ -9185,7 +9185,7 @@ yyreduce: } } - AST_Publishes *p = 0; + AST_Publishes *p = nullptr; if (so_far_so_good) { @@ -9195,18 +9195,18 @@ yyreduce: // Strip off _cxx_, if any, for port name. FE_Utils::original_local_name ((yyvsp[0].idval)); - UTL_ScopedName sn ((yyvsp[0].idval), 0); + UTL_ScopedName sn ((yyvsp[0].idval), nullptr); p = idl_global->gen ()->create_publishes (&sn, event_type); s->fe_add_publishes (p); } (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; (yyval.dcval) = p; } @@ -9219,12 +9219,12 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; AST_Decl::NodeType nt = AST_Decl::NT_type; - AST_Param_Holder *ph = 0; + AST_Param_Holder *ph = nullptr; AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist), true, false); - if (0 == d) + if (nullptr == d) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); so_far_so_good = false; @@ -9258,7 +9258,7 @@ yyreduce: } } - AST_Consumes *c = 0; + AST_Consumes *c = nullptr; if (so_far_so_good) { @@ -9269,7 +9269,7 @@ yyreduce: FE_Utils::original_local_name ((yyvsp[0].idval)); UTL_ScopedName sn ((yyvsp[0].idval), - 0); + nullptr); c = idl_global->gen ()->create_consumes (&sn, event_type); @@ -9278,11 +9278,11 @@ yyreduce: (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; (yyval.dcval) = c; } @@ -9293,12 +9293,12 @@ yyreduce: #line 5953 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Home *h = 0; + AST_Home *h = nullptr; /* * Make a new home node and add it to the enclosing scope. */ - if (s != 0 && (yyvsp[0].hhval) != 0) + if (s != nullptr && (yyvsp[0].hhval) != nullptr) { h = idl_global->gen ()->create_home ( @@ -9319,7 +9319,7 @@ yyreduce: // This FE_HomeHeader class isn't destroyed with the AST. (yyvsp[0].hhval)->destroy (); delete (yyvsp[0].hhval); - (yyvsp[0].hhval) = 0; + (yyvsp[0].hhval) = nullptr; } /* @@ -9338,7 +9338,7 @@ yyreduce: */ idl_global->scopes ().pop (); - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 9344 "fe/idl.tab.cpp" break; @@ -9400,9 +9400,9 @@ yyreduce: * Create an AST representation of the information in the header * part of a component home. */ - UTL_ScopedName *n = 0; + UTL_ScopedName *n = nullptr; ACE_NEW_RETURN (n, - UTL_ScopedName ((yyvsp[-10].idval), 0), + UTL_ScopedName ((yyvsp[-10].idval), nullptr), 1); ACE_NEW_RETURN ((yyval.hhval), @@ -9415,27 +9415,27 @@ yyreduce: (yyvsp[-2].idlist)->destroy (); delete (yyvsp[-2].idlist); - (yyvsp[-2].idlist) = 0; + (yyvsp[-2].idlist) = nullptr; - if (0 != (yyvsp[-8].idlist)) + if (nullptr != (yyvsp[-8].idlist)) { (yyvsp[-8].idlist)->destroy (); delete (yyvsp[-8].idlist); - (yyvsp[-8].idlist) = 0; + (yyvsp[-8].idlist) = nullptr; } - if (0 != (yyvsp[0].idlist)) + if (nullptr != (yyvsp[0].idlist)) { (yyvsp[0].idlist)->destroy (); delete (yyvsp[0].idlist); - (yyvsp[0].idlist) = 0; + (yyvsp[0].idlist) = nullptr; } - if (0 != (yyvsp[-6].nlval)) + if (nullptr != (yyvsp[-6].nlval)) { (yyvsp[-6].nlval)->destroy (); delete (yyvsp[-6].nlval); - (yyvsp[-6].nlval) = 0; + (yyvsp[-6].nlval) = nullptr; } } #line 9442 "fe/idl.tab.cpp" @@ -9460,7 +9460,7 @@ yyreduce: case 504: #line 6083 "fe/idl.ypp" { - (yyval.idlist) = 0; + (yyval.idlist) = nullptr; } #line 9466 "fe/idl.tab.cpp" break; @@ -9476,7 +9476,7 @@ yyreduce: case 506: #line 6095 "fe/idl.ypp" { - (yyval.idlist) = 0; + (yyval.idlist) = nullptr; } #line 9482 "fe/idl.tab.cpp" break; @@ -9542,7 +9542,7 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); + nullptr); idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen); /* @@ -9554,7 +9554,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; /* * Push the factory scope onto the scopes stack. @@ -9581,7 +9581,7 @@ yyreduce: /* * Add exceptions and context to the factory. */ - if ((yyvsp[0].nlval) != 0) + if ((yyvsp[0].nlval) != nullptr) { (void) s->fe_add_exceptions ((yyvsp[0].nlval)); } @@ -9599,7 +9599,7 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); + nullptr); idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen); @@ -9615,7 +9615,7 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; /* * Push the operation scope onto the scopes stack. @@ -9642,7 +9642,7 @@ yyreduce: /* * Add exceptions and context to the finder. */ - if ((yyvsp[0].nlval) != 0) + if ((yyvsp[0].nlval) != nullptr) { (void) s->fe_add_exceptions ((yyvsp[0].nlval)); } @@ -9660,15 +9660,15 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_EventTypeFwd *f = 0; + nullptr); + AST_EventTypeFwd *f = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeForwardSeen); /* * Create a node representing a forward declaration of an * eventtype. Store it in the enclosing scope */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_eventtype_fwd (&n, false); @@ -9677,9 +9677,9 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 9685 "fe/idl.tab.cpp" break; @@ -9689,15 +9689,15 @@ yyreduce: { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), - 0); - AST_EventTypeFwd *f = 0; + nullptr); + AST_EventTypeFwd *f = nullptr; idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeForwardSeen); /* * Create a node representing a forward declaration of an * eventtype. Store it in the enclosing scope */ - if (s != 0) + if (s != nullptr) { f = idl_global->gen ()->create_eventtype_fwd (&n, true); @@ -9706,9 +9706,9 @@ yyreduce: (yyvsp[0].idval)->destroy (); delete (yyvsp[0].idval); - (yyvsp[0].idval) = 0; + (yyvsp[0].idval) = nullptr; - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 9714 "fe/idl.tab.cpp" break; @@ -9717,13 +9717,13 @@ yyreduce: #line 6315 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_EventType *e = 0; - AST_Interface *i = 0; + AST_EventType *e = nullptr; + AST_Interface *i = nullptr; - if (s != 0 && (yyvsp[-1].idval) != 0) + if (s != nullptr && (yyvsp[-1].idval) != nullptr) { UTL_ScopedName sn ((yyvsp[-1].idval), - 0); + nullptr); e = idl_global->gen ()->create_eventtype ( &sn, @@ -9756,7 +9756,7 @@ yyreduce: (yyvsp[-1].idval)->destroy (); delete (yyvsp[-1].idval); - (yyvsp[-1].idval) = 0; + (yyvsp[-1].idval) = nullptr; } #line 9762 "fe/idl.tab.cpp" break; @@ -9787,7 +9787,7 @@ yyreduce: */ idl_global->scopes ().pop (); - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 9793 "fe/idl.tab.cpp" break; @@ -9812,7 +9812,7 @@ yyreduce: ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Sorry, I (TAO_IDL) can't handle") ACE_TEXT (" custom yet\n"))); - (yyval.idval) = 0; + (yyval.idval) = nullptr; } #line 9818 "fe/idl.tab.cpp" break; @@ -9842,7 +9842,7 @@ yyreduce: ACE_NEW_RETURN ((yyval.vhval), FE_OBVHeader ( - 0, + nullptr, (yyvsp[-2].nlval), (yyvsp[0].nlval), (yyvsp[-2].nlval) @@ -9851,18 +9851,18 @@ yyreduce: true), 1); - if (0 != (yyvsp[0].nlval)) + if (nullptr != (yyvsp[0].nlval)) { (yyvsp[0].nlval)->destroy (); delete (yyvsp[0].nlval); - (yyvsp[0].nlval) = 0; + (yyvsp[0].nlval) = nullptr; } - if (0 != (yyvsp[-2].nlval)) + if (nullptr != (yyvsp[-2].nlval)) { (yyvsp[-2].nlval)->destroy (); delete (yyvsp[-2].nlval); - (yyvsp[-2].nlval) = 0; + (yyvsp[-2].nlval) = nullptr; } } #line 9869 "fe/idl.tab.cpp" @@ -9874,13 +9874,13 @@ yyreduce: UTL_Scope *scope = idl_global->scopes ().top_non_null (); Identifier *&event_id = (yyvsp[-1].idval); FE_OBVHeader *&event_header = (yyvsp[0].vhval); - AST_EventType *eventtype = 0; + AST_EventType *eventtype = nullptr; if (scope && event_header) { // We create the scoped name here instead of with the // FE_OBVHeader because there is a token for it only here. - UTL_ScopedName sn (event_id, 0); + UTL_ScopedName sn (event_id, nullptr); eventtype = idl_global->gen ()->create_eventtype ( &sn, event_header->inherits (), @@ -9908,7 +9908,7 @@ yyreduce: // FE_OBVHeader is not automatically destroyed in the AST event_header->destroy (); delete event_header; - event_header = 0; + event_header = nullptr; sn.destroy (); } @@ -10054,14 +10054,14 @@ yyreduce: case 555: #line 6583 "fe/idl.ypp" { - if ((yyvsp[0].plval) == 0) + if ((yyvsp[0].plval) == nullptr) { ACE_NEW_RETURN ((yyvsp[0].plval), FE_Utils::T_PARAMLIST_INFO, 1); } (yyvsp[0].plval)->enqueue_head (*(yyvsp[-1].pival)); delete (yyvsp[-1].pival); - (yyvsp[-1].pival) = 0; + (yyvsp[-1].pival) = nullptr; // The param added above is always the last one parsed, // so we check for matches between sequence<T> & T here. @@ -10072,7 +10072,7 @@ yyreduce: if (!bad_id.empty ()) { delete (yyvsp[0].plval); - (yyvsp[0].plval) = 0; + (yyvsp[0].plval) = nullptr; idl_global->err ()->mismatch_seq_of_param (bad_id.c_str ()); return 1; @@ -10086,7 +10086,7 @@ yyreduce: case 556: #line 6614 "fe/idl.ypp" { - if ((yyvsp[-2].plval) == 0) + if ((yyvsp[-2].plval) == nullptr) { ACE_NEW_RETURN ((yyvsp[-2].plval), FE_Utils::T_PARAMLIST_INFO, 1); } @@ -10095,7 +10095,7 @@ yyreduce: (yyval.plval) = (yyvsp[-2].plval); delete (yyvsp[0].pival); - (yyvsp[0].pival) = 0; + (yyvsp[0].pival) = nullptr; } #line 10101 "fe/idl.tab.cpp" break; @@ -10103,7 +10103,7 @@ yyreduce: case 557: #line 6627 "fe/idl.ypp" { - (yyval.plval) = 0; + (yyval.plval) = nullptr; } #line 10109 "fe/idl.tab.cpp" break; @@ -10121,7 +10121,7 @@ yyreduce: (yyval.pival)->type_ = nt; (yyval.pival)->name_ = (yyvsp[0].strval); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; if (nt == AST_Decl::NT_const) { @@ -10131,7 +10131,7 @@ yyreduce: // Reset these values. t_param_const_type = AST_Expression::EV_none; - tao_enum_constant_decl = 0; + tao_enum_constant_decl = nullptr; } } #line 10138 "fe/idl.tab.cpp" @@ -10149,9 +10149,9 @@ yyreduce: (yyval.pival)->name_ += (yyvsp[0].strval); ACE::strdelete ((yyvsp[-2].strval)); - (yyvsp[-2].strval) = 0; + (yyvsp[-2].strval) = nullptr; ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; } #line 10157 "fe/idl.tab.cpp" break; @@ -10167,10 +10167,10 @@ yyreduce: case 561: #line 6684 "fe/idl.ypp" { - UTL_StrList *sl = 0; - ACE_NEW_RETURN (sl, UTL_StrList ((yyvsp[0].sval), 0), 1); + UTL_StrList *sl = nullptr; + ACE_NEW_RETURN (sl, UTL_StrList ((yyvsp[0].sval), nullptr), 1); - if ((yyvsp[-2].slval) == 0) + if ((yyvsp[-2].slval) == nullptr) { (yyval.slval) = sl; } @@ -10186,7 +10186,7 @@ yyreduce: case 562: #line 6699 "fe/idl.ypp" { - (yyval.slval) = 0; + (yyval.slval) = nullptr; } #line 10192 "fe/idl.tab.cpp" break; @@ -10218,9 +10218,9 @@ yyreduce: Identifier id (id_value); ACE::strdelete (id_value); - id_value = 0; + id_value = nullptr; - UTL_ScopedName scoped_name (&id, 0); + UTL_ScopedName scoped_name (&id, nullptr); AST_PortType *porttype = idl_global->gen ()->create_porttype ( &scoped_name); scope->fe_add_porttype (porttype); @@ -10303,10 +10303,10 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist)); - AST_PortType *pt = 0; + AST_PortType *pt = nullptr; bool so_far_so_good = true; - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); so_far_so_good = false; @@ -10315,7 +10315,7 @@ yyreduce: { pt = dynamic_cast<AST_PortType*> (d); - if (pt == 0) + if (pt == nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_PORTTYPE_EXPECTED, d); @@ -10323,15 +10323,15 @@ yyreduce: } } - AST_Extended_Port *ep = 0; + AST_Extended_Port *ep = nullptr; if (so_far_so_good) { Identifier id ((yyvsp[0].strval)); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); ep = idl_global->gen ()->create_extended_port (&sn, pt); s->fe_add_extended_port (ep); @@ -10345,7 +10345,7 @@ yyreduce: AST_Uses *u = dynamic_cast<AST_Uses*> (d); - if (u != 0 && u->is_multiple ()) + if (u != nullptr && u->is_multiple ()) { AST_Component *c = dynamic_cast<AST_Component*> (s); @@ -10360,7 +10360,7 @@ yyreduce: (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyval.dcval) = ep; } @@ -10374,10 +10374,10 @@ yyreduce: UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Decl *d = s->lookup_by_name ((yyvsp[-1].idlist)); - AST_PortType *pt = 0; + AST_PortType *pt = nullptr; bool so_far_so_good = true; - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[-1].idlist)); so_far_so_good = false; @@ -10386,7 +10386,7 @@ yyreduce: { pt = dynamic_cast<AST_PortType*> (d); - if (pt == 0) + if (pt == nullptr) { idl_global->err ()->error1 (UTL_Error::EIDL_PORTTYPE_EXPECTED, d); @@ -10394,22 +10394,22 @@ yyreduce: } } - AST_Mirror_Port *mp = 0; + AST_Mirror_Port *mp = nullptr; if (so_far_so_good) { Identifier id ((yyvsp[0].strval)); ACE::strdelete ((yyvsp[0].strval)); - (yyvsp[0].strval) = 0; + (yyvsp[0].strval) = nullptr; - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); mp = idl_global->gen ()->create_mirror_port (&sn, pt); s->fe_add_mirror_port (mp); } (yyvsp[-1].idlist)->destroy (); delete (yyvsp[-1].idlist); - (yyvsp[-1].idlist) = 0; + (yyvsp[-1].idlist) = nullptr; (yyval.dcval) = mp; } @@ -10419,7 +10419,7 @@ yyreduce: case 579: #line 6914 "fe/idl.ypp" { - if ((yyvsp[0].alval) == 0) + if ((yyvsp[0].alval) == nullptr) { ACE_NEW_RETURN ((yyvsp[0].alval), FE_Utils::T_ARGLIST, @@ -10436,7 +10436,7 @@ yyreduce: case 580: #line 6930 "fe/idl.ypp" { - if ((yyvsp[-3].alval) == 0) + if ((yyvsp[-3].alval) == nullptr) { ACE_NEW_RETURN ((yyvsp[-3].alval), FE_Utils::T_ARGLIST, @@ -10453,7 +10453,7 @@ yyreduce: case 581: #line 6943 "fe/idl.ypp" { - (yyval.alval) = 0; + (yyval.alval) = nullptr; } #line 10459 "fe/idl.tab.cpp" break; @@ -10470,14 +10470,14 @@ yyreduce: // arg list. AST_Expression *ex = (yyvsp[0].exval); UTL_ScopedName *sn = ex->n (); - AST_Decl *d = 0; + AST_Decl *d = nullptr; UTL_Scope *s = idl_global->scopes ().top_non_null (); - if (sn != 0) + if (sn != nullptr) { d = s->lookup_by_name (sn); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (sn); return 1; @@ -10512,7 +10512,7 @@ yyreduce: idl_global->gen ()->create_constant ( (yyvsp[0].exval)->ev ()->et, (yyvsp[0].exval), - 0); + nullptr); } } #line 10519 "fe/idl.tab.cpp" @@ -10521,7 +10521,7 @@ yyreduce: case 583: #line 7009 "fe/idl.ypp" { - (yyval.dcval) = 0; + (yyval.dcval) = nullptr; } #line 10527 "fe/idl.tab.cpp" break; @@ -10546,21 +10546,21 @@ yyreduce: #line 7024 "fe/idl.ypp" { UTL_Scope *s = idl_global->scopes ().top_non_null (); - AST_Connector *parent = 0; + AST_Connector *parent = nullptr; bool so_far_so_good = true; Identifier id ((yyvsp[-2].strval)); ACE::strdelete ((yyvsp[-2].strval)); - (yyvsp[-2].strval) = 0; + (yyvsp[-2].strval) = nullptr; - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); - if ((yyvsp[0].idlist) != 0) + if ((yyvsp[0].idlist) != nullptr) { AST_Decl *d = s->lookup_by_name ((yyvsp[0].idlist)); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error ((yyvsp[0].idlist)); so_far_so_good = false; @@ -10569,7 +10569,7 @@ yyreduce: parent = dynamic_cast<AST_Connector*> (d); - if (parent == 0) + if (parent == nullptr) { idl_global->err ()->error1 ( UTL_Error::EIDL_CONNECTOR_EXPECTED, @@ -10580,7 +10580,7 @@ yyreduce: (yyvsp[0].idlist)->destroy (); delete (yyvsp[0].idlist); - (yyvsp[0].idlist) = 0; + (yyvsp[0].idlist) = nullptr; } if (so_far_so_good) diff --git a/TAO/TAO_IDL/fe/idl.yy.cpp b/TAO/TAO_IDL/fe/idl.yy.cpp index bcb099c813a..4b0ff7a5174 100644 --- a/TAO/TAO_IDL/fe/idl.yy.cpp +++ b/TAO/TAO_IDL/fe/idl.yy.cpp @@ -506,7 +506,7 @@ struct yy_buffer_state /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = nullptr; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -528,7 +528,7 @@ static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = 0; +static char *yy_c_buf_p = nullptr; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ @@ -582,7 +582,7 @@ void yyfree ( void * ); /* Begin user sect3 */ typedef flex_uint8_t YY_CHAR; -FILE *yyin = 0, *yyout = 0; +FILE *yyin = nullptr, *yyout = nullptr; typedef int yy_state_type; @@ -1965,7 +1965,7 @@ YY_RULE_SETUP // regular expression is to handle EBCDIC, as well as ASCII. TAO_IDL_CPP_Keyword_Table cpp_key_tbl; - const TAO_IDL_CPP_Keyword_Entry *entry = 0; + const TAO_IDL_CPP_Keyword_Entry *entry = nullptr; if (!idl_global->preserve_cpp_keywords()) { // This check will ensure that escaped C++ keywords will be @@ -2273,7 +2273,7 @@ YY_RULE_SETUP if (next == '/') break; else - yyunput (c, 0); + yyunput (c, nullptr); } else if (c == '\n') { @@ -2523,7 +2523,7 @@ static int yy_get_next_buffer (void) } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = nullptr; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -2862,7 +2862,7 @@ static void yy_load_buffer_state (void) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) nullptr; if ( b->yy_is_our_buffer ) yyfree( (void *) b->yy_ch_buf ); @@ -2933,7 +2933,7 @@ static void yy_load_buffer_state (void) */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { - if (new_buffer == 0) + if (new_buffer == nullptr) return; yyensure_buffer_stack(); @@ -2967,7 +2967,7 @@ void yypop_buffer_state (void) return; yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = 0; + YY_CURRENT_BUFFER_LVALUE = nullptr; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); @@ -3037,7 +3037,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return nullptr; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) @@ -3046,7 +3046,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = nullptr; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -3222,10 +3222,10 @@ static int yy_init_globals (void) * This function is called from yylex_destroy(), so don't allocate here. */ - (yy_buffer_stack) = 0; + (yy_buffer_stack) = nullptr; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = 0; + (yy_c_buf_p) = nullptr; (yy_init) = 0; (yy_start) = 0; @@ -3234,8 +3234,8 @@ static int yy_init_globals (void) yyin = stdin; yyout = stdout; #else - yyin = 0; - yyout = 0; + yyin = nullptr; + yyout = nullptr; #endif /* For future reference: Set errno on error, since we are called by @@ -3251,13 +3251,13 @@ int yylex_destroy (void) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer( YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = 0; + YY_CURRENT_BUFFER_LVALUE = nullptr; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = 0; + (yy_buffer_stack) = nullptr; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ @@ -3330,7 +3330,7 @@ same_file (char *path1, char *path2) char *fp2 = ACE_OS::realpath (path2, fullpath2); return - (fp1 == 0 || fp2 == 0) + (fp1 == nullptr || fp2 == nullptr) ? false : FE_Utils::path_cmp (fullpath1,fullpath2) == 0; } @@ -3340,8 +3340,8 @@ static void idl_parse_line_and_file (char *buf) { char *r = buf; - char *h = 0; - UTL_String *nm = 0; + char *h = nullptr; + UTL_String *nm = nullptr; // Skip initial '#'. if (*r != '#') @@ -3394,7 +3394,7 @@ idl_parse_line_and_file (char *buf) } *r = 0; - UTL_String *tmp = 0; + UTL_String *tmp = nullptr; if (*h == '\0') { @@ -3539,13 +3539,13 @@ idl_store_pragma (char *buf) sp -= crunched; *sp = '\0'; - if (ACE_OS::strstr (buf + 8, "import") != 0) + if (ACE_OS::strstr (buf + 8, "import") != nullptr) { idl_global->set_import (true); return; } - if (ACE_OS::strstr (buf + 8, "include") != 0) + if (ACE_OS::strstr (buf + 8, "include") != nullptr) { idl_global->set_import (false); return; @@ -3555,14 +3555,14 @@ idl_store_pragma (char *buf) { char *new_prefix = idl_get_pragma_string (buf); - if (new_prefix != 0) + if (new_prefix != nullptr) { unsigned long depth = idl_global->scopes ().depth (); // We replace the prefix only if there is a prefix already // associated with this file, otherwise we add the prefix. char *ext_id = idl_global->filename ()->get_string (); - ACE_Hash_Map_Entry<char *, char *> *entry = 0; + ACE_Hash_Map_Entry<char *, char *> *entry = nullptr; int const status = idl_global->file_prefixes ().find (ext_id, entry); @@ -3570,7 +3570,7 @@ idl_store_pragma (char *buf) { if (ACE_OS::strcmp (entry->int_id_, "") != 0) { - char *trash = 0; + char *trash = nullptr; idl_global->pragma_prefixes ().pop (trash); delete [] trash; } @@ -3624,7 +3624,7 @@ idl_store_pragma (char *buf) char *number = ACE_OS::strchr (tmp, ' '); - if (number == 0) + if (number == nullptr) { number = ACE_OS::strchr (tmp, '\t'); } @@ -3634,7 +3634,7 @@ idl_store_pragma (char *buf) // Most likely this means there is only a version number // without an identifier to apply it to. - if (number == 0) + if (number == nullptr) { const char *msg = "no identifier or scoped name"; idl_global->err ()->version_syntax_error (msg); @@ -3663,7 +3663,7 @@ idl_store_pragma (char *buf) // do it here. AST_Decl *d = idl_find_node (tmp); - if (d == 0) + if (d == nullptr) { return; } @@ -3694,14 +3694,14 @@ idl_store_pragma (char *buf) AST_Decl *d = idl_find_node (work.c_str ()); - if (d == 0) + if (d == nullptr) { return; } char *new_id = idl_get_pragma_string (buf); - if (new_id != 0) + if (new_id != nullptr) { if (d->typeid_set ()) { @@ -4153,33 +4153,33 @@ idl_get_pragma_string (char *pragma) // Get pointers to each end of the substring between the quotes. const char *firstquote = ACE_OS::strchr (pragma, '"'); - if (firstquote == 0) + if (firstquote == nullptr) { idl_global->err ()->syntax_error ( IDL_GlobalData::PS_PragmaPrefixSyntax ); - return 0; + return nullptr; } const char *start = firstquote + 1; const char *end = ACE_OS::strchr (start, '"'); - if (end == 0) + if (end == nullptr) { idl_global->err ()->syntax_error ( IDL_GlobalData::PS_PragmaPrefixSyntax ); - return 0; + return nullptr; } int len = static_cast<int> (end - start); - char *retval = 0; + char *retval = nullptr; ACE_NEW_RETURN (retval, char[len + 1], - 0); + nullptr); ACE_OS::strncpy (retval, start, @@ -4201,7 +4201,7 @@ idl_valid_version (char *s) char *minor = ACE_OS::strchr (s, '.'); int i; - if (minor == 0) + if (minor == nullptr) { // No decimal point. return 0; @@ -4247,13 +4247,13 @@ static AST_Decl * idl_find_node (const char *s) { UTL_ScopedName * node = FE_Utils::string_to_scoped_name (s); - AST_Decl * d = 0; + AST_Decl * d = nullptr; - if (node != 0) + if (node != nullptr) { d = idl_global->scopes ().top_non_null ()->lookup_by_name (node); - if (d == 0) + if (d == nullptr) { idl_global->err ()->lookup_error (node); } diff --git a/TAO/TAO_IDL/narrow/narrow.cpp b/TAO/TAO_IDL/narrow/narrow.cpp index 08d367af5e5..c4e67c16404 100644 --- a/TAO/TAO_IDL/narrow/narrow.cpp +++ b/TAO/TAO_IDL/narrow/narrow.cpp @@ -86,9 +86,9 @@ trademarks or registered trademarks of Sun Microsystems, Inc. TAO_IDL_FE_Export AST_Decl * ScopeAsDecl (UTL_Scope *s) { - if (s == 0) + if (s == nullptr) { - return 0; + return nullptr; } switch (s->scope_node_type ()) @@ -130,7 +130,7 @@ ScopeAsDecl (UTL_Scope *s) case AST_Decl::NT_annotation_appl: return dynamic_cast<AST_Annotation_Appl*> (s); default: - return 0; + return nullptr; } } @@ -140,9 +140,9 @@ ScopeAsDecl (UTL_Scope *s) TAO_IDL_FE_Export UTL_Scope * DeclAsScope (AST_Decl *d) { - if (d == 0) + if (d == nullptr) { - return 0; + return nullptr; } switch (d->node_type ()) @@ -187,6 +187,6 @@ DeclAsScope (AST_Decl *d) case AST_Decl::NT_finder: return dynamic_cast<AST_Finder*> (d); default: - return 0; + return nullptr; } } diff --git a/TAO/TAO_IDL/tao_idl.cpp b/TAO/TAO_IDL/tao_idl.cpp index c8d9811e690..b8705084236 100644 --- a/TAO/TAO_IDL/tao_idl.cpp +++ b/TAO/TAO_IDL/tao_idl.cpp @@ -137,10 +137,10 @@ void DRV_refresh (void) { idl_global->set_err_count (0); - idl_global->set_filename (0); - idl_global->set_main_filename (0); - idl_global->set_real_filename (0); - idl_global->set_stripped_filename (0); + idl_global->set_filename (nullptr); + idl_global->set_main_filename (nullptr); + idl_global->set_real_filename (nullptr); + idl_global->set_stripped_filename (nullptr); idl_global->set_lineno (-1); idl_global->reset_flag_seen (); } @@ -154,11 +154,11 @@ DRV_cleanup (void) be_global->destroy (); delete be_global; - be_global = 0; + be_global = nullptr; idl_global->fini (); delete idl_global; - idl_global = 0; + idl_global = nullptr; for (DRV_file_index = 0; DRV_file_index < DRV_nfiles; @@ -193,7 +193,7 @@ DRV_drive (const char *s) { // Set the name of the IDL file we are parsing. This is useful to // the backend when it generates C++ headers and files. - UTL_String *utl_string = 0; + UTL_String *utl_string = nullptr; ACE_NEW (utl_string, UTL_String (s, true)); @@ -362,7 +362,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) AST_Generator *gen = be_util::generator_init (); - if (0 == gen) + if (nullptr == gen) { ACE_ERROR (( LM_ERROR, @@ -399,7 +399,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) // If there are no input files, and we are not using the // directory recursion option, there's no sense going any further. - if (0 == DRV_nfiles && 0 == idl_global->recursion_start ()) + if (0 == DRV_nfiles && nullptr == idl_global->recursion_start ()) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("IDL: No input files\n"))); @@ -407,7 +407,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) throw Bailout (); } - FILE *output_file = 0; + FILE *output_file = nullptr; if (idl_global->multi_file_input ()) { diff --git a/TAO/TAO_IDL/util/utl_decllist.cpp b/TAO/TAO_IDL/util/utl_decllist.cpp index 4e370719019..58d61decb40 100644 --- a/TAO/TAO_IDL/util/utl_decllist.cpp +++ b/TAO/TAO_IDL/util/utl_decllist.cpp @@ -96,11 +96,11 @@ UTL_DeclList::head (void) void UTL_DeclList::destroy (void) { - if (this->pd_car_data != 0) + if (this->pd_car_data != nullptr) { this->pd_car_data->destroy (); delete this->pd_car_data; - this->pd_car_data = 0; + this->pd_car_data = nullptr; } this->UTL_List::destroy (); @@ -133,9 +133,9 @@ UTL_DecllistActiveIterator::UTL_DecllistActiveIterator (UTL_DeclList *s) FE_Declarator * UTL_DecllistActiveIterator::item (void) { - if (source == 0) + if (source == nullptr) { - return 0; + return nullptr; } return ((UTL_DeclList *) source)->head (); diff --git a/TAO/TAO_IDL/util/utl_err.cpp b/TAO/TAO_IDL/util/utl_err.cpp index c9639fc9f6c..3a823ea960c 100644 --- a/TAO/TAO_IDL/util/utl_err.cpp +++ b/TAO/TAO_IDL/util/utl_err.cpp @@ -259,7 +259,7 @@ error_string (UTL_Error::ErrorCode c) * Get filename from node or from idl_global if node is null. */ static const char * -get_filename (AST_Decl *node = 0) +get_filename (AST_Decl *node = nullptr) { return node ? node->file_name ().c_str () : idl_global->filename ()->get_string (); @@ -269,7 +269,7 @@ get_filename (AST_Decl *node = 0) * Get line number from node or from idl_global if node is null. */ static long -get_lineno (AST_Decl *node = 0) +get_lineno (AST_Decl *node = nullptr) { return node ? node->line () : idl_global->lineno (); } @@ -293,7 +293,7 @@ idl_error_header (UTL_Error::ErrorCode c, long lineno, ACE_CString s) idl_global->set_err_count (idl_global->err_count () + 1); } static void -idl_error_header (UTL_Error::ErrorCode c, AST_Decl *node = 0) +idl_error_header (UTL_Error::ErrorCode c, AST_Decl *node = nullptr) { idl_error_header (c, get_lineno (node), get_filename (node)); } @@ -317,7 +317,7 @@ idl_warning_header (UTL_Error::ErrorCode c, long lineno, ACE_CString s) error_string (c))); } static void -idl_warning_header (UTL_Error::ErrorCode c, AST_Decl *node = 0) +idl_warning_header (UTL_Error::ErrorCode c, AST_Decl *node = nullptr) { idl_warning_header (c, get_lineno (node), get_filename (node)); } @@ -1096,7 +1096,7 @@ UTL_Error::incompatible_disc_error (AST_Decl *d, d->name ()->dump (*ACE_DEFAULT_LOG_STREAM); ACE_ERROR ((LM_ERROR, " does not contain ")); UTL_ScopedName *sn = e->n (); - (sn != 0 + (sn != nullptr ? sn->dump (*ACE_DEFAULT_LOG_STREAM) : e->dump (*ACE_DEFAULT_LOG_STREAM)); ACE_ERROR ((LM_ERROR, "\n")); @@ -1360,7 +1360,7 @@ void UTL_Error::not_a_type (AST_Decl *d) { idl_error_header (EIDL_NOT_A_TYPE); - if (d == 0 || d->name () == 0) + if (d == nullptr || d->name () == nullptr) { ACE_ERROR ((LM_ERROR, "unknown symbol")); diff --git a/TAO/TAO_IDL/util/utl_exceptlist.cpp b/TAO/TAO_IDL/util/utl_exceptlist.cpp index f7fbdaba704..1b9962ca14f 100644 --- a/TAO/TAO_IDL/util/utl_exceptlist.cpp +++ b/TAO/TAO_IDL/util/utl_exceptlist.cpp @@ -99,7 +99,7 @@ UTL_ExceptList::head (void) void UTL_ExceptList::destroy (void) { - if (this->tail () != 0) + if (this->tail () != nullptr) { this->tail ()->destroy (); } @@ -110,13 +110,13 @@ UTL_ExceptList::destroy (void) UTL_ExceptList * UTL_ExceptList::copy (void) { - UTL_ExceptList *retval = 0; + UTL_ExceptList *retval = nullptr; ACE_NEW_RETURN (retval, UTL_ExceptList (this->pd_car_data, - 0), - 0); + nullptr), + nullptr); - if (this->tail () != 0) + if (this->tail () != nullptr) { retval->nconc ((UTL_ExceptList *) this->tail ()->copy ()); } @@ -133,9 +133,9 @@ UTL_ExceptlistActiveIterator::UTL_ExceptlistActiveIterator (UTL_ExceptList *s) AST_Type * UTL_ExceptlistActiveIterator::item (void) { - if (source == 0) + if (source == nullptr) { - return 0; + return nullptr; } return ((UTL_ExceptList *) source)->head (); diff --git a/TAO/TAO_IDL/util/utl_exprlist.cpp b/TAO/TAO_IDL/util/utl_exprlist.cpp index 5e8bb062aa1..fb20a0d87cb 100644 --- a/TAO/TAO_IDL/util/utl_exprlist.cpp +++ b/TAO/TAO_IDL/util/utl_exprlist.cpp @@ -90,11 +90,11 @@ UTL_ExprList::head (void) void UTL_ExprList::destroy (void) { - if (this->pd_car_data != 0) + if (this->pd_car_data != nullptr) { this->pd_car_data->destroy (); delete this->pd_car_data; - this->pd_car_data = 0; + this->pd_car_data = nullptr; } this->UTL_List::destroy (); @@ -109,9 +109,9 @@ UTL_ExprlistActiveIterator::UTL_ExprlistActiveIterator (UTL_ExprList *s) AST_Expression * UTL_ExprlistActiveIterator::item (void) { - if (source == 0) + if (source == nullptr) { - return 0; + return nullptr; } return ((UTL_ExprList *) source)->head (); diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index 63e2931a6e3..68614a6ca25 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -91,7 +91,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #undef INCREMENT #define INCREMENT 64 -static long *pSeenOnce = 0; +static long *pSeenOnce = nullptr; #if defined (ACE_OPENVMS) #include <unixlib.h> @@ -122,35 +122,35 @@ IDL_GlobalData::IDL_GlobalData (void) ignore_files_ (false), ignore_lookup_errors_ (false), unknown_annotations_ (UNKNOWN_ANNOTATIONS_WARN_ONCE), - pd_root (0), - pd_gen (0), - pd_primary_key_base (0), - pd_err (0), + pd_root (nullptr), + pd_gen (nullptr), + pd_primary_key_base (nullptr), + pd_err (nullptr), pd_err_count (0), pd_lineno (0), - pd_filename (0), - pd_main_filename (0), - pd_real_filename (0), - pd_stripped_filename (0), + pd_filename (nullptr), + pd_main_filename (nullptr), + pd_real_filename (nullptr), + pd_stripped_filename (nullptr), pd_import (false), pd_in_main_file (false), - pd_prog_name (0), - pd_cpp_location (0), + pd_prog_name (nullptr), + pd_cpp_location (nullptr), pd_compile_flags (0), - pd_local_escapes (0), - pd_indent (0), - pd_include_file_names (0), + pd_local_escapes (nullptr), + pd_indent (nullptr), + pd_include_file_names (nullptr), pd_n_include_file_names (0), pd_n_alloced_file_names (0), - included_idl_files_ (0), + included_idl_files_ (nullptr), n_included_idl_files_ (0), n_allocated_idl_files_ (0), pd_parse_state (PS_NoState), - pd_idl_src_file (0), - tao_root_ (0), - gperf_path_ (0), - temp_dir_ (0), - ident_string_ (0), + pd_idl_src_file (nullptr), + tao_root_ (nullptr), + gperf_path_ (nullptr), + temp_dir_ (nullptr), + ident_string_ (nullptr), case_diff_error_ (true), nest_orb_ (false), idl_flags_ (""), @@ -160,14 +160,14 @@ IDL_GlobalData::IDL_GlobalData (void) ignore_idl3_ (false), dcps_support_zero_copy_read_ (false), dcps_gen_zero_copy_read_ (false), - recursion_start_ (0), + recursion_start_ (nullptr), multi_file_input_ (false), big_file_name_ ("PICML_IDL_file_bag"), - current_params_ (0), - alias_params_ (0), - for_new_holder_ (0), + current_params_ (nullptr), + alias_params_ (nullptr), + for_new_holder_ (nullptr), included_ami_receps_done_ (false), - corba_module_ (0), + corba_module_ (nullptr), anon_type_diagnostic_ (ANON_TYPE_ERROR), explicit_anon_type_diagnostic_ (false), in_typedef_ (false), @@ -181,7 +181,7 @@ IDL_GlobalData::IDL_GlobalData (void) // Form the absolute pathname. char* ace_root = ACE_OS::getenv ("ACE_ROOT"); - if (ace_root == 0) + if (ace_root == nullptr) // This may not cause any problem if -g option is used to specify // the correct path for the gperf program. Let us ignore this // error here. It will be caught when we check the existence of @@ -198,7 +198,7 @@ IDL_GlobalData::IDL_GlobalData (void) "%s", ace_gperf); #else - this->gperf_path_ = 0; + this->gperf_path_ = nullptr; #endif } else @@ -407,11 +407,11 @@ IDL_GlobalData::filename (void) void IDL_GlobalData::set_filename (UTL_String *s) { - if (this->pd_filename != 0) + if (this->pd_filename != nullptr) { this->pd_filename->destroy (); delete this->pd_filename; - this->pd_filename = 0; + this->pd_filename = nullptr; } this->pd_filename = s; @@ -427,11 +427,11 @@ IDL_GlobalData::main_filename (void) void IDL_GlobalData::set_main_filename (UTL_String *n) { - if (this->pd_main_filename != 0) + if (this->pd_main_filename != nullptr) { this->pd_main_filename->destroy (); delete this->pd_main_filename; - this->pd_main_filename = 0; + this->pd_main_filename = nullptr; } this->pd_main_filename = n; } @@ -446,11 +446,11 @@ IDL_GlobalData::real_filename (void) void IDL_GlobalData::set_real_filename (UTL_String *n) { - if (this->pd_real_filename != 0) + if (this->pd_real_filename != nullptr) { this->pd_real_filename->destroy (); delete this->pd_real_filename; - this->pd_real_filename = 0; + this->pd_real_filename = nullptr; } this->pd_real_filename = n; @@ -498,7 +498,7 @@ IDL_GlobalData::stripped_filename (void) void IDL_GlobalData::set_stripped_filename (UTL_String *nm) { - if (this->pd_stripped_filename != 0) + if (this->pd_stripped_filename != nullptr) { delete this->pd_stripped_filename; } @@ -564,7 +564,7 @@ IDL_GlobalData::local_escapes (void) void IDL_GlobalData::set_local_escapes (const char *e) { - if (this->pd_local_escapes != 0) + if (this->pd_local_escapes != nullptr) { delete [] this->pd_local_escapes; } @@ -590,7 +590,7 @@ long IDL_GlobalData::seen_include_file_before (char *n) { unsigned long i; - char *incl = 0; + char *incl = nullptr; char *tmp = n; for (i = 0; i < this->pd_n_include_file_names; ++i) @@ -784,7 +784,7 @@ IDL_GlobalData::temp_dir (const char *s) { // Delete the old pointer. delete [] this->temp_dir_; - this->temp_dir_ = 0; // In case the ACE_NEW fails below. + this->temp_dir_ = nullptr; // In case the ACE_NEW fails below. const size_t lengthSep = sizeof (ACE_DIRECTORY_SEPARATOR_STR_A) - 1u; const size_t lengthPath = ACE_OS::strlen (s); @@ -881,49 +881,49 @@ IDL_GlobalData::nest_orb (void) void IDL_GlobalData::destroy (void) { - if (this->pd_filename != 0) + if (this->pd_filename != nullptr) { this->pd_filename->destroy (); delete this->pd_filename; - this->pd_filename = 0; + this->pd_filename = nullptr; } - if (this->pd_main_filename != 0) + if (this->pd_main_filename != nullptr) { this->pd_main_filename->destroy (); delete this->pd_main_filename; - this->pd_main_filename = 0; + this->pd_main_filename = nullptr; } - if (this->pd_real_filename != 0) + if (this->pd_real_filename != nullptr) { this->pd_real_filename->destroy (); delete this->pd_real_filename; - this->pd_real_filename = 0; + this->pd_real_filename = nullptr; } - if (this->pd_stripped_filename != 0) + if (this->pd_stripped_filename != nullptr) { this->pd_stripped_filename->destroy (); delete this->pd_stripped_filename; - this->pd_stripped_filename = 0; + this->pd_stripped_filename = nullptr; } - if (this->pd_idl_src_file != 0) + if (this->pd_idl_src_file != nullptr) { this->pd_idl_src_file->destroy (); delete this->pd_idl_src_file; - this->pd_idl_src_file = 0; + this->pd_idl_src_file = nullptr; } size_t size = this->pragma_prefixes ().size (); - char *trash = 0; + char *trash = nullptr; for (size_t i = 0; i < size; ++i) { this->pragma_prefixes ().pop (trash); delete [] trash; - trash = 0; + trash = nullptr; } // Clean up each included file name - the array allocation itself @@ -932,7 +932,7 @@ IDL_GlobalData::destroy (void) { this->pd_include_file_names[j]->destroy (); delete this->pd_include_file_names[j]; - this->pd_include_file_names[j] = 0; + this->pd_include_file_names[j] = nullptr; } this->pd_n_include_file_names = 0; @@ -940,26 +940,26 @@ IDL_GlobalData::destroy (void) for (size_t k = 0; k < n_included_idl_files_; ++k) { ACE::strdelete (this->included_idl_files_[k]); - this->included_idl_files_[k] = 0; + this->included_idl_files_[k] = nullptr; } this->n_included_idl_files_ = 0; this->n_allocated_idl_files_ = 0; delete [] this->included_idl_files_; - this->included_idl_files_ = 0; + this->included_idl_files_ = nullptr; ACE::strdelete (this->recursion_start_); - this->recursion_start_ = 0; + this->recursion_start_ = nullptr; // Reset the member of the CORBA module containing the basic types // to point to itself, since all the other CORBA modules (if any) // will be destroyed. - if (this->corba_module_ != 0) + if (this->corba_module_ != nullptr) { this->corba_module_->reset_last_in_same_parent_scope (); } - if (0 != this->pd_root) + if (nullptr != this->pd_root) { this->pd_root->destroy (); } @@ -994,7 +994,7 @@ IDL_GlobalData::update_prefix (char *filename) { // If we are just starting up and processing the temporary filename, // there are no prefix issues to deal with yet. - if (this->pd_main_filename == 0 || this->pd_filename == 0) + if (this->pd_main_filename == nullptr || this->pd_filename == nullptr) { return; } @@ -1012,10 +1012,10 @@ IDL_GlobalData::update_prefix (char *filename) return; } - ACE_CString tmp ("", 0, false); + ACE_CString tmp ("", nullptr, false); char *main_filename = this->pd_main_filename->get_string (); - char *prefix = 0; + char *prefix = nullptr; int status = this->file_prefixes_.find (filename, prefix); if (status == 0) @@ -1055,7 +1055,7 @@ IDL_GlobalData::update_prefix (char *filename) // pop it. if (status == 0 && ACE_OS::strcmp (prefix, "") != 0) { - char *trash = 0; + char *trash = nullptr; this->pragma_prefixes_.pop (trash); delete [] trash; } @@ -1319,7 +1319,7 @@ IDL_GlobalData::check_gperf (void) { // If absolute path is not specified yet, let us call just // "gperf". Hopefully PATH is set up correctly to locate the gperf. - if (this->gperf_path_ == 0) + if (this->gperf_path_ == nullptr) { // If ACE_GPERF is defined then use that gperf program instead of "gperf." #if defined (ACE_GPERF) @@ -1422,33 +1422,33 @@ IDL_GlobalData::check_gperf (void) void IDL_GlobalData::fini (void) { - if (0 != this->pd_root) + if (nullptr != this->pd_root) { this->pd_root->fini (); delete this->pd_root; - this->pd_root = 0; + this->pd_root = nullptr; } delete this->pd_err; - this->pd_err = 0; + this->pd_err = nullptr; delete this->pd_gen; - this->pd_gen = 0; + this->pd_gen = nullptr; delete this->pd_indent; - this->pd_indent = 0; + this->pd_indent = nullptr; delete [] this->pd_local_escapes; - this->pd_local_escapes = 0; + this->pd_local_escapes = nullptr; delete [] this->tao_root_; - this->tao_root_ = 0; + this->tao_root_ = nullptr; delete [] this->gperf_path_; - this->gperf_path_ = 0; + this->gperf_path_ = nullptr; delete [] this->temp_dir_; - this->temp_dir_ = 0; + this->temp_dir_ = nullptr; delete [] this->ident_string_; - this->ident_string_ = 0; + this->ident_string_ = nullptr; delete [] this->pd_include_file_names; - this->pd_include_file_names = 0; + this->pd_include_file_names = nullptr; - Include_Path_Info *path_info = 0; + Include_Path_Info *path_info = nullptr; for (Unbounded_Paths_Queue_Iterator qiter (this->include_paths_); qiter.done () == 0; @@ -1458,7 +1458,7 @@ IDL_GlobalData::fini (void) ACE::strdelete (path_info->path_); } - char **path_tmp = 0; + char **path_tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *>riter ( this->rel_include_paths_ @@ -1561,7 +1561,7 @@ IDL_GlobalData::fini (void) } - ACE_Hash_Map_Entry<char *, char *> *entry = 0; + ACE_Hash_Map_Entry<char *, char *> *entry = nullptr; for (ACE_Hash_Map_Iterator<char *, char *, ACE_Null_Mutex> hiter ( this->file_prefixes_ @@ -1574,7 +1574,7 @@ IDL_GlobalData::fini (void) ACE::strdelete (entry->int_id_); } - DCPS_Type_Info_Map::ENTRY *dcps_entry = 0; + DCPS_Type_Info_Map::ENTRY *dcps_entry = nullptr; for (DCPS_Type_Info_Map::ITERATOR dcps_iter ( this->dcps_type_info_map_); @@ -1585,7 +1585,7 @@ IDL_GlobalData::fini (void) dcps_entry->int_id_->name_->destroy (); delete dcps_entry->int_id_->name_; - dcps_entry->int_id_->name_ = 0; + dcps_entry->int_id_->name_ = nullptr; delete dcps_entry->int_id_; dcps_entry->int_id_ = 0; @@ -1604,7 +1604,7 @@ IDL_GlobalData::primary_keys (void) void IDL_GlobalData::check_primary_keys (void) { - AST_ValueType *holder = 0; + AST_ValueType *holder = nullptr; while (!this->primary_keys_.is_empty ()) { @@ -1716,7 +1716,7 @@ IDL_GlobalData::set_dcps_sequence_type (const char* seq_type) bool IDL_GlobalData::dcps_sequence_type_defined (const char* seq_type) { - char **tmp = 0; + char **tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *>riter ( this->dcps_sequence_types_list_); @@ -1776,7 +1776,7 @@ bool IDL_GlobalData::add_dcps_data_key (const char* id, const char* key) { // Search the map for the type. - DCPS_Data_Type_Info* newinfo = 0; + DCPS_Data_Type_Info* newinfo = nullptr; if (this->dcps_type_info_map_.find (id, newinfo) == 0) { @@ -1814,7 +1814,7 @@ IDL_GlobalData::is_dcps_type (UTL_ScopedName* target) } // No joy. - return 0; + return nullptr; } AST_Module * @@ -1953,7 +1953,7 @@ namespace { public: explicit OldState (bool disable_output = false) - : old_filename_ (idl_global->filename () ? new UTL_String (idl_global->filename (), true) : 0), + : old_filename_ (idl_global->filename () ? new UTL_String (idl_global->filename (), true) : nullptr), // need a copy because IDL_GlobalData::set_filename() destroys previous value old_lineno_ (idl_global->lineno ()), old_idl_src_file_ (idl_global->idl_src_file ()), @@ -1964,7 +1964,7 @@ namespace idl_global->in_eval_ = true; idl_global->set_lineno (1); - idl_global->set_filename (0); + idl_global->set_filename (nullptr); // Name this pseudo-file "builtin-N" static char buffer[64]; @@ -1977,7 +1977,7 @@ namespace if (disable_output_) { - ACE_DEFAULT_LOG_STREAM->rdbuf (0); + ACE_DEFAULT_LOG_STREAM->rdbuf (nullptr); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR); ACE_LOG_MSG->clr_flags (ACE_LOG_MSG->flags ()); } diff --git a/TAO/TAO_IDL/util/utl_identifier.cpp b/TAO/TAO_IDL/util/utl_identifier.cpp index 9ee1561e12b..4c0458fddd4 100644 --- a/TAO/TAO_IDL/util/utl_identifier.cpp +++ b/TAO/TAO_IDL/util/utl_identifier.cpp @@ -73,20 +73,20 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ace/OS_NS_string.h" Identifier::Identifier (void) - : pv_string (0), + : pv_string (nullptr), escaped_ (false) { } Identifier::Identifier (const char *s) - : pv_string (0), + : pv_string (nullptr), escaped_ (false) { preprocess_and_replace_string (s); } Identifier::Identifier (const Identifier &other) - : pv_string (0), + : pv_string (nullptr), escaped_ (other.escaped ()) { *this = other; @@ -94,7 +94,7 @@ Identifier::Identifier (const Identifier &other) Identifier::~Identifier (void) { - if (this->pv_string != 0) + if (this->pv_string != nullptr) { ACE::strdelete (this->pv_string); } @@ -121,7 +121,7 @@ Identifier::replace_string (const char * s) { delete [] this->pv_string; } - this->pv_string = s ? ACE::strnew (s) : 0; + this->pv_string = s ? ACE::strnew (s) : nullptr; } void @@ -166,7 +166,7 @@ Identifier::preprocess_and_replace_string (const char * s) const TAO_IDL_CPP_Keyword_Entry *entry = cpp_key_tbl.lookup (str.c_str (), len); - if (entry != 0) + if (entry != nullptr) { shift = false; } @@ -208,10 +208,10 @@ Identifier::case_compare_quiet (Identifier *o) Identifier * Identifier::copy (void) { - Identifier *retval = 0; + Identifier *retval = nullptr; ACE_NEW_RETURN (retval, Identifier (this->pv_string), - 0); + nullptr); retval->escaped_ = this->escaped_; @@ -228,7 +228,7 @@ Identifier::escaped (void) const void Identifier::dump (ACE_OSTREAM_TYPE &o) { - if (this->pv_string == 0) + if (this->pv_string == nullptr) { return; } diff --git a/TAO/TAO_IDL/util/utl_idlist.cpp b/TAO/TAO_IDL/util/utl_idlist.cpp index c2445916e77..a5d46393c49 100644 --- a/TAO/TAO_IDL/util/utl_idlist.cpp +++ b/TAO/TAO_IDL/util/utl_idlist.cpp @@ -92,13 +92,13 @@ UTL_IdList::UTL_IdList (Identifier *s, UTL_IdList * UTL_IdList::copy (void) { - UTL_IdList *retval = 0; + UTL_IdList *retval = nullptr; ACE_NEW_RETURN (retval, UTL_IdList (this->head ()->copy (), - 0), - 0); + nullptr), + nullptr); - if (this->tail () != 0) + if (this->tail () != nullptr) { retval->nconc ((UTL_IdList *) this->tail ()->copy ()); } @@ -117,7 +117,7 @@ UTL_IdList::head (void) Identifier * UTL_IdList::last_component (void) { - if (this->tail () == 0) + if (this->tail () == nullptr) { return this->head (); } @@ -148,7 +148,7 @@ UTL_IdList::compare (UTL_IdList *other) { UTL_List *this_tail = this->tail (); - if (this_tail == 0) + if (this_tail == nullptr) { return 1; } @@ -160,7 +160,7 @@ UTL_IdList::compare (UTL_IdList *other) { UTL_List *other_tail = other->tail (); - if (other_tail == 0) + if (other_tail == nullptr) { return 1; } @@ -173,8 +173,8 @@ UTL_IdList::compare (UTL_IdList *other) return 1; } - Identifier *this_id = 0; - Identifier *other_id = 0; + Identifier *this_id = nullptr; + Identifier *other_id = nullptr; for (UTL_IdListActiveIterator this_iter (this), other_iter (other); !this_iter.is_done (); @@ -240,11 +240,11 @@ UTL_IdList::dump (ACE_OSTREAM_TYPE &o) void UTL_IdList::destroy (void) { - if (this->pd_car_data != 0) + if (this->pd_car_data != nullptr) { this->pd_car_data->destroy (); delete this->pd_car_data; - this->pd_car_data = 0; + this->pd_car_data = nullptr; } this->UTL_List::destroy (); @@ -264,9 +264,9 @@ UTL_IdListActiveIterator::UTL_IdListActiveIterator (UTL_IdList *s) Identifier * UTL_IdListActiveIterator::item (void) { - if (this->source == 0) + if (this->source == nullptr) { - return 0; + return nullptr; } return ((UTL_IdList *) source)->head (); diff --git a/TAO/TAO_IDL/util/utl_labellist.cpp b/TAO/TAO_IDL/util/utl_labellist.cpp index f00665cdf06..45c35bbe186 100644 --- a/TAO/TAO_IDL/util/utl_labellist.cpp +++ b/TAO/TAO_IDL/util/utl_labellist.cpp @@ -99,22 +99,22 @@ UTL_LabelList::copy (void) { AST_Expression *val = this->pd_car_data->label_val (); - AST_Expression *val_copy = 0; + AST_Expression *val_copy = nullptr; ACE_NEW_RETURN (val_copy, AST_Expression (val, val->ev ()->et), - 0); + nullptr); AST_UnionLabel *label_copy = idl_global->gen ()->create_union_label (this->pd_car_data->label_kind (), val_copy); - UTL_LabelList *retval = 0; + UTL_LabelList *retval = nullptr; ACE_NEW_RETURN (retval, UTL_LabelList (label_copy, - 0), - 0); + nullptr), + nullptr); - if (this->tail () != 0) + if (this->tail () != nullptr) { retval->nconc ((UTL_LabelList *) this->tail ()->copy ()); } @@ -127,7 +127,7 @@ UTL_LabelList::destroy (void) { this->pd_car_data->destroy (); delete this->pd_car_data; - this->pd_car_data = 0; + this->pd_car_data = nullptr; this->UTL_List::destroy (); } @@ -141,13 +141,13 @@ UTL_LabellistActiveIterator::UTL_LabellistActiveIterator (UTL_LabelList *s) AST_UnionLabel * UTL_LabellistActiveIterator::item (void) { - if (this->source == 0) + if (this->source == nullptr) { - return 0; + return nullptr; } UTL_LabelList *llist = dynamic_cast<UTL_LabelList *> (this->source); - return (llist != 0 ? llist->head () : 0); + return (llist != nullptr ? llist->head () : nullptr); } diff --git a/TAO/TAO_IDL/util/utl_list.cpp b/TAO/TAO_IDL/util/utl_list.cpp index 6e5a60e188f..be31370bc9d 100644 --- a/TAO/TAO_IDL/util/utl_list.cpp +++ b/TAO/TAO_IDL/util/utl_list.cpp @@ -86,7 +86,7 @@ UTL_List::~UTL_List (void) ACE_CDR::Long UTL_List::list_length (ACE_CDR::Long n) { - if (this->pd_cdr_data == 0) + if (this->pd_cdr_data == nullptr) { return n; } @@ -100,7 +100,7 @@ UTL_List::list_length (ACE_CDR::Long n) void UTL_List::nconc (UTL_List *l) { - if (this->pd_cdr_data == 0) + if (this->pd_cdr_data == nullptr) { this->pd_cdr_data = l; } @@ -114,19 +114,19 @@ UTL_List::nconc (UTL_List *l) UTL_List * UTL_List::copy (void) { - UTL_List *retval = 0; + UTL_List *retval = nullptr; - if (this->pd_cdr_data == 0) + if (this->pd_cdr_data == nullptr) { ACE_NEW_RETURN (retval, - UTL_List (0), - 0); + UTL_List (nullptr), + nullptr); } else { ACE_NEW_RETURN (retval, UTL_List (this->pd_cdr_data->copy ()), - 0); + nullptr); } return retval; @@ -158,11 +158,11 @@ UTL_List::length (void) void UTL_List::destroy (void) { - if (this->pd_cdr_data != 0) + if (this->pd_cdr_data != nullptr) { this->pd_cdr_data->destroy (); delete this->pd_cdr_data; - this->pd_cdr_data = 0; + this->pd_cdr_data = nullptr; } } @@ -177,14 +177,14 @@ UTL_ListActiveIterator::UTL_ListActiveIterator (UTL_List *s) bool UTL_ListActiveIterator::is_done (void) { - return (this->source == 0) ? true : false; + return (this->source == nullptr) ? true : false; } // Advance to next item. void UTL_ListActiveIterator::next (void) { - if (this->source != 0) + if (this->source != nullptr) { this->source = this->source->tail (); } diff --git a/TAO/TAO_IDL/util/utl_namelist.cpp b/TAO/TAO_IDL/util/utl_namelist.cpp index b41b655bbc8..b3b64779216 100644 --- a/TAO/TAO_IDL/util/utl_namelist.cpp +++ b/TAO/TAO_IDL/util/utl_namelist.cpp @@ -104,7 +104,7 @@ UTL_NameList::destroy (void) { this->pd_car_data->destroy (); delete this->pd_car_data; - this->pd_car_data = 0; + this->pd_car_data = nullptr; this->UTL_List::destroy (); } @@ -118,9 +118,9 @@ UTL_NamelistActiveIterator::UTL_NamelistActiveIterator (UTL_NameList *s) UTL_ScopedName * UTL_NamelistActiveIterator::item (void) { - if (source == 0) + if (source == nullptr) { - return 0; + return nullptr; } return ((UTL_NameList *) source)->head (); diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp index 4d2cfab6f9b..a59e788f469 100644 --- a/TAO/TAO_IDL/util/utl_scope.cpp +++ b/TAO/TAO_IDL/util/utl_scope.cpp @@ -122,16 +122,16 @@ trademarks or registered trademarks of Sun Microsystems, Inc. UTL_Scope::UTL_Scope (void) : pd_scope_node_type (AST_Decl::NT_module), - pd_decls (0), + pd_decls (nullptr), pd_decls_allocated (0), pd_decls_used (0), - pd_local_types (0), + pd_local_types (nullptr), pd_locals_allocated (0), pd_locals_used (0), - pd_referenced (0), + pd_referenced (nullptr), pd_referenced_allocated (0), pd_referenced_used (0), - pd_name_referenced (0), + pd_name_referenced (nullptr), pd_name_referenced_allocated (0), pd_name_referenced_used (0), has_prefix_ (0), @@ -141,16 +141,16 @@ UTL_Scope::UTL_Scope (void) UTL_Scope::UTL_Scope (AST_Decl::NodeType nt) : pd_scope_node_type (nt), - pd_decls (0), + pd_decls (nullptr), pd_decls_allocated (0), pd_decls_used (0), - pd_local_types (0), + pd_local_types (nullptr), pd_locals_allocated (0), pd_locals_used (0), - pd_referenced (0), + pd_referenced (nullptr), pd_referenced_allocated (0), pd_referenced_used (0), - pd_name_referenced (0), + pd_name_referenced (nullptr), pd_name_referenced_allocated (0), pd_name_referenced_used (0), has_prefix_ (0), @@ -197,17 +197,17 @@ UTL_Scope::destroy (void) } delete [] this->pd_decls; - this->pd_decls = 0; + this->pd_decls = nullptr; this->pd_decls_allocated = 0; this->pd_decls_used = 0; delete [] this->pd_local_types; - this->pd_local_types = 0; + this->pd_local_types = nullptr; this->pd_locals_allocated = 0; this->pd_locals_used = 0; delete [] this->pd_referenced; - this->pd_referenced = 0; + this->pd_referenced = nullptr; this->pd_referenced_allocated = 0; this->pd_referenced_used = 0; @@ -219,7 +219,7 @@ UTL_Scope::destroy (void) } delete [] this->pd_name_referenced; - this->pd_name_referenced = 0; + this->pd_name_referenced = nullptr; this->pd_name_referenced_allocated = 0; this->pd_name_referenced_used = 0; } @@ -234,13 +234,13 @@ UTL_Scope::lookup_for_add (AST_Decl *d) { if (!d) { - return 0; + return nullptr; } Identifier *id = d->local_name (); if (this->idl_keyword_clash (id)) { - return 0; + return nullptr; } return this->lookup_by_name_local (id, false); @@ -337,7 +337,7 @@ UTL_Scope::check_for_predef_seq (AST_Decl *d) return; } - AST_Type *bt = 0; + AST_Type *bt = nullptr; AST_Decl::NodeType nt = d->node_type (); // We are interested only in members, arguments and typedefs. @@ -480,7 +480,7 @@ UTL_Scope::fe_add_decl (AST_Decl *t) // Already defined and cannot be redefined? Or already used? AST_Decl *d = this->lookup_for_add (t); - if (d != 0) + if (d != nullptr) { if (!FE_Utils::can_be_redefined (d, t)) { @@ -488,7 +488,7 @@ UTL_Scope::fe_add_decl (AST_Decl *t) t, ScopeAsDecl (this), d); - return 0; + return nullptr; } // For convenience, AST_Template_Module_Inst inherits @@ -510,23 +510,23 @@ UTL_Scope::fe_add_decl (AST_Decl *t) t, ScopeAsDecl (this), d); - return 0; + return nullptr; } if (t->has_ancestor (d)) { idl_global->err ()->redefinition_in_scope (t, d); - return 0; + return nullptr; } } else if (this->inherited_op_attr_clash (t)) { - return 0; + return nullptr; } if (this->arg_specific_error (t)) { - return 0; + return nullptr; } this->smart_local_add (t); @@ -584,7 +584,7 @@ UTL_Scope::fe_add_full_struct_type (AST_Structure *t) t, ScopeAsDecl (this), predef); - return 0; + return nullptr; } if (referenced (predef, t->local_name ()) && !t->is_defined ()) @@ -593,7 +593,7 @@ UTL_Scope::fe_add_full_struct_type (AST_Structure *t) t, ScopeAsDecl (this), predef); - return 0; + return nullptr; } } @@ -642,7 +642,7 @@ UTL_Scope::fe_add_fwd_struct_type (AST_StructureFwd *t) t, ScopeAsDecl (this), d); - return 0; + return nullptr; } else if (this->referenced (d, t->local_name ())) { @@ -650,7 +650,7 @@ UTL_Scope::fe_add_fwd_struct_type (AST_StructureFwd *t) t, ScopeAsDecl (this), d); - return 0; + return nullptr; } } @@ -671,271 +671,271 @@ UTL_Scope::fe_add_fwd_struct_type (AST_StructureFwd *t) AST_PredefinedType * UTL_Scope::fe_add_predefined_type (AST_PredefinedType *) { - return 0; + return nullptr; } AST_Module * UTL_Scope::fe_add_module (AST_Module *) { - return 0; + return nullptr; } AST_Template_Module_Inst * UTL_Scope::fe_add_template_module_inst (AST_Template_Module_Inst *) { - return 0; + return nullptr; } AST_Template_Module_Ref * UTL_Scope::fe_add_template_module_ref (AST_Template_Module_Ref *) { - return 0; + return nullptr; } AST_Interface * UTL_Scope::fe_add_interface (AST_Interface *) { - return 0; + return nullptr; } AST_InterfaceFwd * UTL_Scope::fe_add_interface_fwd (AST_InterfaceFwd *) { - return 0; + return nullptr; } AST_ValueBox * UTL_Scope::fe_add_valuebox (AST_ValueBox *) { - return 0; + return nullptr; } AST_ValueType * UTL_Scope::fe_add_valuetype (AST_ValueType *) { - return 0; + return nullptr; } AST_ValueTypeFwd * UTL_Scope::fe_add_valuetype_fwd (AST_ValueTypeFwd *) { - return 0; + return nullptr; } AST_EventType * UTL_Scope::fe_add_eventtype (AST_EventType *) { - return 0; + return nullptr; } AST_EventTypeFwd * UTL_Scope::fe_add_eventtype_fwd (AST_EventTypeFwd *) { - return 0; + return nullptr; } AST_Component * UTL_Scope::fe_add_component (AST_Component *) { - return 0; + return nullptr; } AST_ComponentFwd * UTL_Scope::fe_add_component_fwd (AST_ComponentFwd *) { - return 0; + return nullptr; } AST_Home * UTL_Scope::fe_add_home (AST_Home *) { - return 0; + return nullptr; } AST_Exception * UTL_Scope::fe_add_exception (AST_Exception *) { - return 0; + return nullptr; } AST_Constant * UTL_Scope::fe_add_constant (AST_Constant *) { - return 0; + return nullptr; } UTL_StrList * UTL_Scope::fe_add_context (UTL_StrList *) { - return 0; + return nullptr; } UTL_NameList * UTL_Scope::fe_add_exceptions (UTL_NameList *) { - return 0; + return nullptr; } AST_Attribute * UTL_Scope::fe_add_attribute (AST_Attribute *) { - return 0; + return nullptr; } AST_Operation * UTL_Scope::fe_add_operation (AST_Operation *) { - return 0; + return nullptr; } AST_Argument * UTL_Scope::fe_add_argument (AST_Argument *) { - return 0; + return nullptr; } AST_Union * UTL_Scope::fe_add_union (AST_Union *) { - return 0; + return nullptr; } AST_UnionFwd * UTL_Scope::fe_add_union_fwd (AST_UnionFwd *) { - return 0; + return nullptr; } AST_UnionBranch * UTL_Scope::fe_add_union_branch (AST_UnionBranch *) { - return 0; + return nullptr; } AST_Structure * UTL_Scope::fe_add_structure (AST_Structure *) { - return 0; + return nullptr; } AST_StructureFwd * UTL_Scope::fe_add_structure_fwd (AST_StructureFwd *) { - return 0; + return nullptr; } AST_Field * UTL_Scope::fe_add_field (AST_Field *) { - return 0; + return nullptr; } AST_Enum * UTL_Scope::fe_add_enum (AST_Enum *) { - return 0; + return nullptr; } AST_EnumVal * UTL_Scope::fe_add_enum_val (AST_EnumVal *) { - return 0; + return nullptr; } AST_Typedef * UTL_Scope::fe_add_typedef (AST_Typedef *) { - return 0; + return nullptr; } AST_Sequence * UTL_Scope::fe_add_sequence (AST_Sequence *) { - return 0; + return nullptr; } AST_String * UTL_Scope::fe_add_string (AST_String *) { - return 0; + return nullptr; } AST_Array * UTL_Scope::fe_add_array (AST_Array *) { - return 0; + return nullptr; } AST_Native * UTL_Scope::fe_add_native (AST_Native *) { - return 0; + return nullptr; } AST_Factory * UTL_Scope::fe_add_factory (AST_Factory *) { - return 0; + return nullptr; } AST_Finder * UTL_Scope::fe_add_finder (AST_Finder *) { - return 0; + return nullptr; } AST_PortType * UTL_Scope::fe_add_porttype (AST_PortType *) { - return 0; + return nullptr; } AST_Provides * UTL_Scope::fe_add_provides (AST_Provides *) { - return 0; + return nullptr; } AST_Uses * UTL_Scope::fe_add_uses (AST_Uses *) { - return 0; + return nullptr; } AST_Publishes * UTL_Scope::fe_add_publishes (AST_Publishes *) { - return 0; + return nullptr; } AST_Emits * UTL_Scope::fe_add_emits (AST_Emits *) { - return 0; + return nullptr; } AST_Consumes * UTL_Scope::fe_add_consumes (AST_Consumes *) { - return 0; + return nullptr; } AST_Extended_Port * UTL_Scope::fe_add_extended_port (AST_Extended_Port *) { - return 0; + return nullptr; } AST_Mirror_Port * UTL_Scope::fe_add_mirror_port (AST_Mirror_Port *) { - return 0; + return nullptr; } AST_Connector * UTL_Scope::fe_add_connector (AST_Connector *) { - return 0; + return nullptr; } // Private lookup mechanism. @@ -946,10 +946,10 @@ UTL_Scope::lookup_pseudo (Identifier *e) { if (e->escaped ()) { - return 0; + return nullptr; } - bool *seen = 0; + bool *seen = nullptr; char *name_string = e->get_string (); UTL_Scope *start_scope = idl_global->corba_module (); @@ -977,7 +977,7 @@ UTL_Scope::lookup_pseudo (Identifier *e) } else { - return 0; + return nullptr; } for (UTL_ScopeActiveIterator i (start_scope, IK_decls); @@ -1003,7 +1003,7 @@ UTL_Scope::lookup_pseudo (Identifier *e) { AST_Decl *d = this->look_in_prev_mods_local (e); - if (d != 0) + if (d != nullptr) { // Generation of #includes for Typecode.h // checks this bit, so we set it for TCKind as well. @@ -1012,14 +1012,14 @@ UTL_Scope::lookup_pseudo (Identifier *e) } } - return 0; + return nullptr; } AST_Decl * UTL_Scope::look_in_prev_mods_local (Identifier *, bool /* ignore_fwd */) { - return 0; + return nullptr; } AST_Decl * @@ -1027,7 +1027,7 @@ UTL_Scope::special_lookup (UTL_ScopedName *, bool /* full_def_only */, AST_Decl *&/*final_parent_decl*/) { - return 0; + return nullptr; } // Lookup the node for a primitive (built-in) type. @@ -1043,7 +1043,7 @@ UTL_Scope::lookup_primitive_type (AST_Expression::ExprType et) /// for the ExprType. if (pdt == AST_PredefinedType::PT_pseudo) { - return 0; + return nullptr; } /// The only 'predefined type' not in the CORBA module. @@ -1085,7 +1085,7 @@ UTL_Scope::lookup_primitive_type (AST_Expression::ExprType et) } } - return 0; + return nullptr; } // Look through inherited list. Overridden in AST_Interface. @@ -1093,7 +1093,7 @@ AST_Decl * UTL_Scope::look_in_inherited (UTL_ScopedName *, bool ) { - return 0; + return nullptr; } // Look through supported interface list. Overridden where necessary. @@ -1101,7 +1101,7 @@ AST_Decl * UTL_Scope::look_in_supported (UTL_ScopedName *, bool) { - return 0; + return nullptr; } AST_Decl * @@ -1120,7 +1120,7 @@ UTL_Scope::lookup_by_name_local (Identifier *e, if (this->idl_keyword_clash (e)) { - return 0; + return nullptr; } bool in_corba = (ACE_OS::strcmp (e->get_string (), "CORBA") == 0); @@ -1133,11 +1133,11 @@ UTL_Scope::lookup_by_name_local (Identifier *e, { d = i.item ()->adjust_found (true, full_def_only); - if (d != 0) + if (d != nullptr) { Identifier *item_name = d->local_name (); - if (item_name != 0 + if (item_name != nullptr // Right now we populate the global scope with all the CORBA basic // types, so something like 'ULong' in an IDL file will find a // match, unless we skip over these items. This is a workaround until @@ -1192,7 +1192,7 @@ UTL_Scope::lookup_by_name_local (Identifier *e, } } - return 0; + return nullptr; } AST_Decl * @@ -1203,7 +1203,7 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e, // Empty name? Exit immediately. if (!e) { - return 0; + return nullptr; } UTL_Scope *work = this; @@ -1219,7 +1219,7 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e, UTL_List* tail = e->tail (); if (!tail) { - return 0; + return nullptr; } // Remove the preceeding "::" or "" from the scopename e = static_cast<UTL_ScopedName *> (tail); @@ -1229,21 +1229,21 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e, work = idl_global->root (); } - AST_Decl *first_found_final_parent_decl = 0; + AST_Decl *first_found_final_parent_decl = nullptr; const bool searching_module_path = (e->length () != 1); AST_Decl *d = searching_module_path ? work->lookup_by_name_r (e, full_def_only, first_found_final_parent_decl) : work->lookup_by_name_r (e, full_def_only); - if (d == 0) + if (d == nullptr) { // If all else fails, look though each outer scope. for (UTL_Scope *outer = ScopeAsDecl (work)->defined_in (); outer; outer = ScopeAsDecl (outer)->defined_in ()) { - AST_Decl *next_found_final_parent_decl= 0; + AST_Decl *next_found_final_parent_decl= nullptr; d = outer->lookup_by_name_r (e, full_def_only, next_found_final_parent_decl); - if (d != 0) + if (d != nullptr) { work = outer; if (first_found_final_parent_decl) @@ -1252,7 +1252,7 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e, // find this one because the "first_found_final_parent_decl" was found and // this one just found is hidden by it. idl_global->err ()->scope_masking_error (d, first_found_final_parent_decl); - d = 0; // Ignore this one; continue searching to report other ambiguous matches. + d = nullptr; // Ignore this one; continue searching to report other ambiguous matches. } else { @@ -1279,7 +1279,7 @@ AST_Decl * UTL_Scope::lookup_by_name_r (UTL_ScopedName *e, bool full_def_only) { - AST_Decl *ignored= 0; + AST_Decl *ignored= nullptr; return UTL_Scope::lookup_by_name_r (e, full_def_only, ignored); } @@ -1290,7 +1290,7 @@ UTL_Scope::lookup_by_name_r (UTL_ScopedName *e, { bool work_another_level; UTL_Scope *work = this; - final_parent_decl= (e->length () == 1) ? ScopeAsDecl (work) : 0; + final_parent_decl= (e->length () == 1) ? ScopeAsDecl (work) : nullptr; do { @@ -1306,7 +1306,7 @@ UTL_Scope::lookup_by_name_r (UTL_ScopedName *e, if (work->idl_keyword_clash (e->head ())) { - return 0; + return nullptr; } // Before proceeding to normal lookup, check if the name @@ -1361,7 +1361,7 @@ UTL_Scope::lookup_by_name_r (UTL_ScopedName *e, work = next; work_another_level = true; e = static_cast<UTL_ScopedName *> (e->tail ()); - final_parent_decl= (e->length () == 1) ? d : 0; + final_parent_decl= (e->length () == 1) ? d : nullptr; break; } @@ -1437,7 +1437,7 @@ UTL_Scope::add_to_referenced (AST_Decl *e, long oreferenced_allocated = this->pd_referenced_allocated; this->pd_referenced_allocated += INCREMENT; - AST_Decl **tmp = 0; + AST_Decl **tmp = nullptr; ACE_NEW (tmp, AST_Decl *[this->pd_referenced_allocated]); for (long i = 0; i < oreferenced_allocated; ++i) @@ -1495,7 +1495,7 @@ UTL_Scope::add_to_name_referenced (Identifier *id) long name_referenced_allocated = this->pd_name_referenced_allocated; this->pd_name_referenced_allocated += INCREMENT; - Identifier **name_tmp = 0; + Identifier **name_tmp = nullptr; ACE_NEW (name_tmp, Identifier *[this->pd_name_referenced_allocated]); for (long i = 0; i < name_referenced_allocated; ++i) @@ -1694,7 +1694,7 @@ UTL_Scope::add_to_local_types (AST_Decl *e) long olocals_allocated = this->pd_locals_allocated; this->pd_locals_allocated += INCREMENT; - AST_Decl **tmp = 0; + AST_Decl **tmp = nullptr; ACE_NEW (tmp, AST_Decl *[this->pd_locals_allocated]); for (long i = 0; i < olocals_allocated; ++i) { @@ -1814,7 +1814,7 @@ UTL_Scope::dump (ACE_OSTREAM_TYPE &o) { if (!idl_global->indent ()) { - UTL_Indenter *idnt = 0; + UTL_Indenter *idnt = nullptr; ACE_NEW (idnt, UTL_Indenter); idl_global->set_indent (idnt); } @@ -1884,25 +1884,25 @@ UTL_Scope::match_param (UTL_ScopedName *e) FE_Utils::T_PARAMLIST_INFO const *params = idl_global->current_params (); - if (params == 0) + if (params == nullptr) { - return 0; + return nullptr; } const char *name = e->first_component ()->get_string (); - FE_Utils::T_Param_Info *param = 0; + FE_Utils::T_Param_Info *param = nullptr; unsigned long index = 0; UTL_StrList *alias_params = const_cast<UTL_StrList *> (idl_global->for_new_holder ()); - if (alias_params == 0) + if (alias_params == nullptr) { alias_params = const_cast<UTL_StrList *> (idl_global->alias_params ()); } - UTL_String *alias_param = 0; + UTL_String *alias_param = nullptr; for (FE_Utils::T_PARAMLIST_INFO::CONST_ITERATOR i (*params); i.next (param); @@ -1913,7 +1913,7 @@ UTL_Scope::match_param (UTL_ScopedName *e) /// If we are parsing this template module as a /// reference, the param holder we create must have /// the name of the corresponding aliased param. - if (alias_params != 0) + if (alias_params != nullptr) { unsigned long slot = 0; @@ -1928,7 +1928,7 @@ UTL_Scope::match_param (UTL_ScopedName *e) } } - if (alias_param == 0) + if (alias_param == nullptr) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("UTL_Scope::match_param - ") @@ -1937,7 +1937,7 @@ UTL_Scope::match_param (UTL_ScopedName *e) } Identifier id (alias_param->get_string ()); - UTL_ScopedName sn (&id, 0); + UTL_ScopedName sn (&id, nullptr); return idl_global->gen ()->create_param_holder ( @@ -1954,7 +1954,7 @@ UTL_Scope::match_param (UTL_ScopedName *e) } } - return 0; + return nullptr; } bool @@ -2066,7 +2066,7 @@ UTL_Scope::is_global_name (Identifier *i) return false; } - ACE_CString cmp (i->get_string (), 0, false); + ACE_CString cmp (i->get_string (), nullptr, false); return (cmp == "" || cmp == "::"); } @@ -2081,7 +2081,7 @@ UTL_Scope::iter_lookup_by_name_local (AST_Decl *d, AST_Typedef *td = dynamic_cast<AST_Typedef*> (d); if (!td) { - return 0; + return nullptr; } d = td->base_type (); @@ -2089,17 +2089,17 @@ UTL_Scope::iter_lookup_by_name_local (AST_Decl *d, if (!d) { - return 0; + return nullptr; } // Try to convert the AST_Decl to a UTL_Scope. UTL_Scope *sc = DeclAsScope (d); if (!sc) { - return 0; + return nullptr; } - AST_Decl *result = 0; + AST_Decl *result = nullptr; if (0 < sc->nmembers ()) { // Look up the first component of the scoped name. @@ -2161,7 +2161,7 @@ UTL_ScopeActiveIterator::item (void) { if (this->is_done ()) { - return 0; + return nullptr; } if (stage == UTL_Scope::IK_decls) @@ -2174,7 +2174,7 @@ UTL_ScopeActiveIterator::item (void) return this->iter_source->pd_local_types[il]; } - return 0; + return nullptr; } // Is this iteration done? @@ -2230,19 +2230,19 @@ UTL_ScopeActiveIterator::iteration_stage (void) AST_Annotation_Decl * UTL_Scope::fe_add_annotation_decl (AST_Annotation_Decl * /*annotation_decl*/) { - return 0; + return nullptr; } AST_Annotation_Member * UTL_Scope::fe_add_annotation_member (AST_Annotation_Member * /*annotation_member*/) { - return 0; + return nullptr; } AST_Decl * UTL_Scope::lookup_by_name (const char *name) { - AST_Decl *node = 0; + AST_Decl *node = nullptr; UTL_ScopedName *scoped_name = FE_Utils::string_to_scoped_name (name); node = lookup_by_name (scoped_name); scoped_name->destroy (); diff --git a/TAO/TAO_IDL/util/utl_stack.cpp b/TAO/TAO_IDL/util/utl_stack.cpp index c2faa7df607..6e619354143 100644 --- a/TAO/TAO_IDL/util/utl_stack.cpp +++ b/TAO/TAO_IDL/util/utl_stack.cpp @@ -79,7 +79,7 @@ UTL_ScopeStack::UTL_ScopeStack (void) UTL_ScopeStack::~UTL_ScopeStack (void) { - if (this->pd_stack_data != 0) + if (this->pd_stack_data != nullptr) { delete [] this->pd_stack_data; } @@ -89,7 +89,7 @@ UTL_ScopeStack::~UTL_ScopeStack (void) UTL_ScopeStack * UTL_ScopeStack::push (UTL_Scope *el) { - UTL_Scope **tmp = 0; + UTL_Scope **tmp = nullptr; long ostack_data_nalloced; long i; @@ -101,7 +101,7 @@ UTL_ScopeStack::push (UTL_Scope *el) ACE_NEW_RETURN (tmp, UTL_Scope *[this->pd_stack_data_nalloced], - 0); + nullptr); for (i = 0; i < ostack_data_nalloced; ++i) { @@ -131,9 +131,9 @@ UTL_ScopeStack::pop (void) // If our top scope has a #pragma prefix associated with it, // it goes away with the scope. - if (current != 0 && current->has_prefix ()) + if (current != nullptr && current->has_prefix ()) { - char *trash = 0; + char *trash = nullptr; idl_global->pragma_prefixes ().pop (trash); delete [] trash; } @@ -147,7 +147,7 @@ UTL_ScopeStack::top (void) { if (this->pd_stack_top <= 0) { - return 0; + return nullptr; } return this->pd_stack_data[pd_stack_top - 1]; @@ -159,7 +159,7 @@ UTL_ScopeStack::bottom (void) { if (this->pd_stack_top == 0) { - return 0; + return nullptr; } return this->pd_stack_data[0]; @@ -187,7 +187,7 @@ UTL_ScopeStack::next_to_top (void) if (this->depth () < 2) { - return 0; + return nullptr; } tmp = top (); // Save top @@ -203,13 +203,13 @@ UTL_ScopeStack::top_non_null (void) { for (long i = this->pd_stack_top - 1; i >= 0; --i) { - if (this->pd_stack_data[i] != 0) + if (this->pd_stack_data[i] != nullptr) { return this->pd_stack_data[i]; } } - return 0; + return nullptr; } AST_Decl * @@ -225,7 +225,7 @@ UTL_ScopeStack::lookup_by_name ( if (node) return node; } } - return 0; + return nullptr; } UTL_ScopeStackActiveIterator::UTL_ScopeStackActiveIterator (UTL_ScopeStack &s) @@ -250,7 +250,7 @@ UTL_ScopeStackActiveIterator::item (void) return this->source.pd_stack_data[il]; } - return 0; + return nullptr; } // Is this iteration done? diff --git a/TAO/TAO_IDL/util/utl_string.cpp b/TAO/TAO_IDL/util/utl_string.cpp index 3e44e85e94a..dda927fc227 100644 --- a/TAO/TAO_IDL/util/utl_string.cpp +++ b/TAO/TAO_IDL/util/utl_string.cpp @@ -186,8 +186,8 @@ UTL_String::get_canonical_rep (ACE_CString &cstr) UTL_String::UTL_String (void) : copy_taken (false), - p_str (0), - c_str (0) + p_str (nullptr), + c_str (nullptr) { } @@ -195,7 +195,7 @@ UTL_String::UTL_String (const char *str, bool take_copy) : copy_taken (str ? take_copy : false), p_str (this->copy_taken ? ACE::strnew (str) : const_cast<char *>(str)), - c_str (0) + c_str (nullptr) { } @@ -203,7 +203,7 @@ UTL_String::UTL_String (UTL_String *s, bool force_copy) : copy_taken (force_copy ? true : s->copy_taken), p_str (this->copy_taken ? ACE::strnew (s->p_str) : const_cast<char *> (s->p_str)), - c_str (0) + c_str (nullptr) { } @@ -220,13 +220,13 @@ void UTL_String::destroy (void) { delete [] this->c_str; - this->c_str = 0; + this->c_str = nullptr; if (this->copy_taken) { ACE::strdelete (this->p_str); this->copy_taken = 0; } - this->p_str = 0; + this->p_str = nullptr; } // Compare two UTL_String *. diff --git a/TAO/TAO_IDL/util/utl_strlist.cpp b/TAO/TAO_IDL/util/utl_strlist.cpp index 1db9b62ab5c..48c62bd4245 100644 --- a/TAO/TAO_IDL/util/utl_strlist.cpp +++ b/TAO/TAO_IDL/util/utl_strlist.cpp @@ -108,7 +108,7 @@ UTL_StrList::set_head (UTL_String *s) UTL_String * UTL_StrList::last_component (void) { - if (this->tail () == 0) + if (this->tail () == nullptr) { return pd_car_data; } @@ -120,21 +120,21 @@ UTL_StrList::last_component (void) UTL_List * UTL_StrList::copy (void) { - UTL_List *retval = 0; + UTL_List *retval = nullptr; - if (this->tail () == 0) + if (this->tail () == nullptr) { ACE_NEW_RETURN (retval, UTL_StrList (head (), - 0), - 0); + nullptr), + nullptr); } else { ACE_NEW_RETURN (retval, UTL_StrList (head (), (UTL_StrList *) this->tail ()->copy ()), - 0); + nullptr); } return retval; @@ -143,14 +143,14 @@ UTL_StrList::copy (void) void UTL_StrList::destroy (void) { - UTL_String *str = 0; + UTL_String *str = nullptr; for (UTL_StrlistActiveIterator i (this); !i.is_done (); i.next ()) { str = i.item (); str->destroy (); delete str; - str = 0; + str = nullptr; } } @@ -158,7 +158,7 @@ UTL_StrList::destroy (void) void UTL_StrList::dump (ACE_OSTREAM_TYPE &o) { - char *s = 0; + char *s = nullptr; bool first = true; bool second = false; @@ -217,9 +217,9 @@ UTL_StrlistActiveIterator::UTL_StrlistActiveIterator (UTL_StrList *s) UTL_String * UTL_StrlistActiveIterator::item (void) { - if (source == 0) + if (source == nullptr) { - return 0; + return nullptr; } return ((UTL_StrList *) source)->head (); |