summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/util/utl_tmpl/utl_strlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/util/utl_tmpl/utl_strlist.cpp')
-rw-r--r--TAO/TAO_IDL/util/utl_tmpl/utl_strlist.cpp51
1 files changed, 31 insertions, 20 deletions
diff --git a/TAO/TAO_IDL/util/utl_tmpl/utl_strlist.cpp b/TAO/TAO_IDL/util/utl_tmpl/utl_strlist.cpp
index c9649d21b93..baeeb6b0f77 100644
--- a/TAO/TAO_IDL/util/utl_tmpl/utl_strlist.cpp
+++ b/TAO/TAO_IDL/util/utl_tmpl/utl_strlist.cpp
@@ -89,28 +89,39 @@ UTL_StrList::last_component()
// AST Dumping
void
-UTL_StrList::dump(ACE_OSTREAM_TYPE &o)
+UTL_StrList::dump (ACE_OSTREAM_TYPE &o)
{
- char *s;
- UTL_StrlistActiveIterator *i = new UTL_StrlistActiveIterator(this);
- long first = I_TRUE;
- long second = I_FALSE;
-
- while (!(i->is_done())) {
- if (!first)
- o << "::";
- else if (second)
- first = second = I_FALSE;
- s = i->item()->get_string();
- o << s;
- if (first) {
- if (strcmp(s, "::") != 0)
- first = I_FALSE;
- else
- second = I_TRUE;
+ char *s = 0;;
+ UTL_StrlistActiveIterator *i = new UTL_StrlistActiveIterator (this);
+ long first = I_TRUE;
+ long second = I_FALSE;
+
+ for (UTL_StrlistActiveIterator (this); !i.is_done(); i.next ())
+ {
+ if (!first)
+ {
+ o << "::";
+ }
+ else if (second)
+ {
+ first = second = I_FALSE;
+ }
+
+ s = i.item ()->get_string ();
+ o << s;
+
+ if (first)
+ {
+ if (ACE_OS::strcmp (s, "::") != 0)
+ {
+ first = I_FALSE;
+ }
+ else
+ {
+ second = I_TRUE;
+ }
+ }
}
- i->next();
- }
}
/*