diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-22 17:41:32 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-22 18:19:18 +0200 |
commit | 99327498541ed25304d5909d29ae2f126d855f23 (patch) | |
tree | 94a33b2378deea8102048a5cb192d18c3eb7c482 /helpcompiler/source | |
parent | b7f20ef33f5a32cc4726db3ff22056850426073e (diff) |
Use conventional std::vector idioms
Change-Id: I4d26372ea40e7890b76461a764435f8948466ae1
Diffstat (limited to 'helpcompiler/source')
-rw-r--r-- | helpcompiler/source/BasCodeTagger.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/helpcompiler/source/BasCodeTagger.cxx b/helpcompiler/source/BasCodeTagger.cxx index 6eaf063cc78c..6e698f504ce2 100644 --- a/helpcompiler/source/BasCodeTagger.cxx +++ b/helpcompiler/source/BasCodeTagger.cxx @@ -152,14 +152,14 @@ void BasicCodeTagger::tagParagraph( xmlNodePtr paragraph ) m_Highlighter.notifyChange ( 0, 0, &strLine, 1 ); std::vector<HighlightPortion> portions; m_Highlighter.getHighlightPortions( 0, strLine, portions ); - for ( size_t i=0; i<portions.size(); i++ ) + for (std::vector<HighlightPortion>::iterator i(portions.begin()); + i != portions.end(); ++i) { - HighlightPortion& r = portions[i]; - OString sToken(OUStringToOString(strLine.copy(r.nBegin, r.nEnd-r.nBegin), RTL_TEXTENCODING_UTF8)); + OString sToken(OUStringToOString(strLine.copy(i->nBegin, i->nEnd-i->nBegin), RTL_TEXTENCODING_UTF8)); xmlNodePtr text = xmlNewText((const xmlChar*)sToken.getStr()); - if ( r.tokenType != TT_WHITESPACE ) + if ( i->tokenType != TT_WHITESPACE ) { - xmlChar* typeStr = getTypeString( r.tokenType ); + xmlChar* typeStr = getTypeString( i->tokenType ); curNode = xmlNewTextChild( paragraph, 0, (xmlChar*)"item", 0 ); xmlNewProp( curNode, (xmlChar*)"type", typeStr ); xmlAddChild( curNode, text ); |