diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-03-23 17:03:51 +0900 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-03-24 11:53:46 +0000 |
commit | 222c64df382ad05635a3bdbd05b761fb5bdc2c49 (patch) | |
tree | e6646e3e16924f4838d8aa6802ba4c49ee437cc0 /starmath | |
parent | 6aa836329d17bf0aca4aead6bb9c35a6783ec215 (diff) |
starmath: nCount == aVector.size()
Change-Id: I9ea654292718ebd9f1769ca8accf4e39def7f959
Reviewed-on: https://gerrit.libreoffice.org/23460
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/unomodel.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 1fa7fe436480..28dd2e558e7a 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -853,19 +853,15 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu vector < const SmSym * > aVector; const SymbolPtrVec_t aSymbols( rManager.GetSymbols() ); - size_t nCount = 0; for (size_t i = 0; i < aSymbols.size(); ++i) { const SmSym * pSymbol = aSymbols[ i ]; if (pSymbol && !pSymbol->IsPredefined() && (!bUsedSymbolsOnly || rUsedSymbols.find( pSymbol->GetName() ) != rUsedSymbols.end())) - { aVector.push_back ( pSymbol ); - nCount++; - } } - Sequence < SymbolDescriptor > aSequence ( nCount ); + Sequence < SymbolDescriptor > aSequence ( aVector.size() ); SymbolDescriptor * pDescriptor = aSequence.getArray(); vector < const SmSym * >::const_iterator aIter = aVector.begin(), aEnd = aVector.end(); |