diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
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 1f8d4590b74..160bf640597 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 @@ -18,7 +18,7 @@ be_visitor_array_cdr_op_cs::be_visitor_array_cdr_op_cs ( { } -be_visitor_array_cdr_op_cs::~be_visitor_array_cdr_op_cs (void) +be_visitor_array_cdr_op_cs::~be_visitor_array_cdr_op_cs () { } @@ -41,7 +41,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) } // Retrieve the base type. - be_type *bt = be_type::narrow_from_decl (node->base_type ()); + be_type *bt = dynamic_cast<be_type*> (node->base_type ()); if (!bt) { @@ -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) { @@ -140,7 +140,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) if (node->is_nested ()) { be_decl *parent = - be_scope::narrow_from_scope (node->defined_in ())->decl (); + dynamic_cast<be_scope*> (node->defined_in ())->decl (); ACE_OS::sprintf (fname, "%s::_%s", parent->full_name (), @@ -286,9 +286,9 @@ be_visitor_array_cdr_op_cs::visit_predefined_type ( // Grab the array node. be_array *array = - be_array::narrow_from_decl (this->ctx_->node ()); + 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; } @@ -553,10 +553,10 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) TAO_OutStream *os = this->ctx_->stream (); ACE_CDR::ULong i; be_array *node = - be_array::narrow_from_decl (this->ctx_->node ()); + 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,11 +633,11 @@ 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) { - str = be_string::narrow_from_decl (bt); + str = dynamic_cast<be_string*> (bt); if (!str) { ACE_ERROR_RETURN ((LM_ERROR, @@ -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)) { @@ -698,7 +698,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) // We need to separately handle this case of pseudo // objects because they have a _var type. be_predefined_type *pt = - be_predefined_type::narrow_from_decl (bt); + dynamic_cast<be_predefined_type*> (bt); if (!pt) { @@ -760,11 +760,11 @@ 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) { - str = be_string::narrow_from_decl (bt); + str = dynamic_cast<be_string*> (bt); if (!str) { ACE_ERROR_RETURN ((LM_ERROR, @@ -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)) { @@ -825,7 +825,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) // We need to separately handle this case of pseudo // objects because they have a _var type. be_predefined_type *pt = - be_predefined_type::narrow_from_decl (bt); + dynamic_cast<be_predefined_type*> (bt); if (!pt) { |