summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/fe/fe_component_header.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/fe/fe_component_header.cpp')
-rw-r--r--TAO/TAO_IDL/fe/fe_component_header.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/TAO/TAO_IDL/fe/fe_component_header.cpp b/TAO/TAO_IDL/fe/fe_component_header.cpp
index 0fc0f6e1355..f7a8a4f2795 100644
--- a/TAO/TAO_IDL/fe/fe_component_header.cpp
+++ b/TAO/TAO_IDL/fe/fe_component_header.cpp
@@ -20,42 +20,42 @@ 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);
}
-FE_ComponentHeader::~FE_ComponentHeader (void)
+FE_ComponentHeader::~FE_ComponentHeader ()
{
}
AST_Component *
-FE_ComponentHeader::base_component (void) const
+FE_ComponentHeader::base_component () const
{
return this->base_component_;
}
AST_Type **
-FE_ComponentHeader::supports (void) const
+FE_ComponentHeader::supports () const
{
return this->inherits_;
}
long
-FE_ComponentHeader::n_supports (void) const
+FE_ComponentHeader::n_supports () const
{
return this->n_inherits_;
}
AST_Interface **
-FE_ComponentHeader::supports_flat (void) const
+FE_ComponentHeader::supports_flat () const
{
return this->inherits_flat_;
}
long
-FE_ComponentHeader::n_supports_flat (void) const
+FE_ComponentHeader::n_supports_flat () const
{
return this->n_inherits_flat_;
}
@@ -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);
@@ -85,12 +85,12 @@ FE_ComponentHeader::compile_inheritance (UTL_ScopedName *base_component)
if (d->node_type () == AST_Decl::NT_typedef)
{
- d = AST_Typedef::narrow_from_decl (d)->primitive_base_type ();
+ d = dynamic_cast<AST_Typedef*> (d)->primitive_base_type ();
}
- this->base_component_ = AST_Component::narrow_from_decl (d);
+ 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,20 +142,20 @@ 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);
if (sad->node_type () == AST_Decl::NT_module)
{
- AST_Module *m = AST_Module::narrow_from_decl (sad);
+ AST_Module *m = dynamic_cast<AST_Module*> (sad);
d = m->look_in_prev_mods_local (item->last_component ());
}
}
// Not found?
- if (d == 0)
+ if (d == nullptr)
{
idl_global->err ()->lookup_error (item);
@@ -167,15 +167,15 @@ FE_ComponentHeader::compile_supports (UTL_NameList *supports)
// Remove typedefs, if any.
if (d->node_type () == AST_Decl::NT_typedef)
{
- d = AST_Typedef::narrow_from_decl (d)->primitive_base_type ();
+ d = dynamic_cast<AST_Typedef*> (d)->primitive_base_type ();
}
AST_Decl::NodeType nt = d->node_type ();
- t = AST_Type::narrow_from_decl (d);
+ t = dynamic_cast<AST_Type*> (d);
if (nt == AST_Decl::NT_interface)
{
- iface = AST_Interface::narrow_from_decl (d);
+ iface = dynamic_cast<AST_Interface*> (d);
// Undefined interface?
if (!iface->is_defined ())
@@ -200,7 +200,7 @@ FE_ComponentHeader::compile_supports (UTL_NameList *supports)
else if (nt == AST_Decl::NT_param_holder)
{
AST_Param_Holder *ph =
- AST_Param_Holder::narrow_from_decl (d);
+ dynamic_cast<AST_Param_Holder*> (d);
nt = ph->info ()->type_;