summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/util/utl_scope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/util/utl_scope.cpp')
-rw-r--r--TAO/TAO_IDL/util/utl_scope.cpp57
1 files changed, 25 insertions, 32 deletions
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp
index a2f803bc25c..be8084d2f44 100644
--- a/TAO/TAO_IDL/util/utl_scope.cpp
+++ b/TAO/TAO_IDL/util/utl_scope.cpp
@@ -822,49 +822,42 @@ UTL_Scope::look_in_inherited(UTL_ScopedName *e, idl_bool treat_as_ref)
* Look up a String * in local scope only
*/
AST_Decl *
-UTL_Scope::lookup_by_name_local (Identifier *e,
+UTL_Scope::lookup_by_name_local(Identifier *e,
idl_bool,
long index)
{
- UTL_ScopeActiveIterator *i =
- new UTL_ScopeActiveIterator (this,
- UTL_Scope::IK_both);
+ UTL_ScopeActiveIterator *i = new UTL_ScopeActiveIterator(this,
+ UTL_Scope::IK_both);
AST_Decl *d;
AST_InterfaceFwd *fwd;
/*
* Iterate over this scope
*/
- while (!(i->is_done ()))
- {
- d = i->item ();
- if (d->local_name () != NULL && d->local_name ()->case_compare (e))
- {
- if (index == 0)
- {
- delete i;
- /*
- * Special case for forward declared interfaces.
- * Look through the forward declaration and retrieve
- * the full definition.
- */
- if (d->node_type () == AST_Decl::NT_interface_fwd)
- {
- fwd = AST_InterfaceFwd::narrow_from_decl (d);
- if (fwd == NULL)
- d = NULL;
- else
- d = fwd->full_definition ();
- }
- return d;
- }
- else
- {
- index--;
- }
+ while (!(i->is_done())) {
+ d = i->item();
+ if (d->local_name() != NULL && d->local_name()->compare(e)) {
+ if (index == 0) {
+ delete i;
+ /*
+ * Special case for forward declared interfaces. Look through the
+ * forward declaration and retrieve the full definition
+ */
+ if (d->node_type() == AST_Decl::NT_interface_fwd) {
+ fwd = AST_InterfaceFwd::narrow_from_decl(d);
+ if (fwd == NULL)
+ d = NULL;
+ else
+ d = fwd->full_definition();
}
- i->next ();
+ return d;
+ }
+ else {
+ index--;
+ }
}
+ i->next();
+ }
delete i;
/*
* OK, not found, return NULL