Kaydet (Commit) e53047ad authored tarafından Michael Stahl's avatar Michael Stahl

loop with erase(begin()) looks sort of inefficient

üst f36861d4
...@@ -72,7 +72,7 @@ struct SvXMLNumFmtEntry ...@@ -72,7 +72,7 @@ struct SvXMLNumFmtEntry
aName(rN), nKey(nK), bRemoveAfterUse(bR) {} aName(rN), nKey(nK), bRemoveAfterUse(bR) {}
}; };
class SvXMLNumFmtEntryArr : public boost::ptr_vector<SvXMLNumFmtEntry> {}; typedef ::boost::ptr_vector<SvXMLNumFmtEntry> SvXMLNumFmtEntryArr;
struct SvXMLEmbeddedElement struct SvXMLEmbeddedElement
{ {
......
...@@ -342,11 +342,10 @@ XMLTextColumnsContext::~XMLTextColumnsContext() ...@@ -342,11 +342,10 @@ XMLTextColumnsContext::~XMLTextColumnsContext()
{ {
if( pColumns ) if( pColumns )
{ {
while( !pColumns->empty() ) for (XMLTextColumnsArray_Impl::iterator it = pColumns->begin();
it != pColumns->end(); ++it)
{ {
XMLTextColumnContext_Impl *pColumn = *pColumns->begin(); (*it)->ReleaseRef();
pColumns->erase( pColumns->begin() );
pColumn->ReleaseRef();
} }
} }
if( pColumnSep ) if( pColumnSep )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment