summaryrefslogtreecommitdiffstats
path: root/autodoc/source/display/idl/hfi_typetext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'autodoc/source/display/idl/hfi_typetext.cxx')
-rw-r--r--autodoc/source/display/idl/hfi_typetext.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/autodoc/source/display/idl/hfi_typetext.cxx b/autodoc/source/display/idl/hfi_typetext.cxx
index a100066f3195..03c4b263a436 100644
--- a/autodoc/source/display/idl/hfi_typetext.cxx
+++ b/autodoc/source/display/idl/hfi_typetext.cxx
@@ -543,23 +543,19 @@ int
HF_IdlTypeText::count_Sequences( const char * i_sFullType ) const
{
int ret = 0;
+ const char* pCount = i_sFullType;
- for ( const char * pCount = i_sFullType;
- *pCount != 0;
- )
+ while((pCount = strstr(pCount,"sequence")) != 0)
{
- pCount = strstr(pCount,"sequence");
- if (pCount != 0)
+
+ pCount += sizeof("sequence"); // = strlen(sequence) + 1 for '<'.
+ if ( *(pCount-1) == '\0' )
{
- pCount += sizeof("sequence"); // = strlen(sequence) + 1 for '<'.
- if ( *(pCount-1) == '\0' )
- {
- // SYNTAX_ERR
- return 0;
- }
- ++ret;
+ // SYNTAX_ERR
+ return 0;
}
- } // end for
+ ret += 1;
+ }
return ret;
}