diff options
Diffstat (limited to 'TAO/TAO_IDL/ast/ast_valuetype.cpp')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_valuetype.cpp | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/TAO/TAO_IDL/ast/ast_valuetype.cpp b/TAO/TAO_IDL/ast/ast_valuetype.cpp index 019e9aa38e9..5bce86c9f98 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) { @@ -77,7 +77,7 @@ AST_ValueType::AST_ValueType (UTL_ScopedName *n, } } -AST_ValueType::~AST_ValueType (void) +AST_ValueType::~AST_ValueType () { } @@ -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 ()); @@ -204,43 +204,43 @@ AST_ValueType::redefine (AST_Interface *from) } AST_Type ** -AST_ValueType::supports (void) const +AST_ValueType::supports () const { return this->pd_supports; } long -AST_ValueType::n_supports (void) const +AST_ValueType::n_supports () const { return this->pd_n_supports; } AST_Type * -AST_ValueType::inherits_concrete (void) const +AST_ValueType::inherits_concrete () const { return this->pd_inherits_concrete; } AST_Type * -AST_ValueType::supports_concrete (void) const +AST_ValueType::supports_concrete () const { return this->pd_supports_concrete; } bool -AST_ValueType::truncatable (void) const +AST_ValueType::truncatable () const { return this->pd_truncatable; } bool -AST_ValueType::custom (void) const +AST_ValueType::custom () const { return this->pd_custom; } bool -AST_ValueType::will_have_factory (void) +AST_ValueType::will_have_factory () { return false; } @@ -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); } @@ -335,7 +335,7 @@ AST_ValueType::special_lookup (UTL_ScopedName *e, } bool -AST_ValueType::legal_for_primary_key (void) const +AST_ValueType::legal_for_primary_key () const { AST_ValueType *pk_base = this->lookup_primary_key_base (); @@ -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; } @@ -395,12 +395,12 @@ AST_ValueType::legal_for_primary_key (void) const } void -AST_ValueType::destroy (void) +AST_ValueType::destroy () { 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; } @@ -516,14 +516,14 @@ AST_ValueType::derived_from_primary_key_base (const AST_ValueType *node, } AST_ValueType * -AST_ValueType::lookup_primary_key_base (void) const +AST_ValueType::lookup_primary_key_base () 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); @@ -552,7 +552,3 @@ AST_ValueType::lookup_primary_key_base (void) const return retval; } - -IMPL_NARROW_FROM_DECL(AST_ValueType) -IMPL_NARROW_FROM_SCOPE(AST_ValueType) - |