[Libreoffice-commits] core.git: starmath/source

Takeshi Abe tabe at fixedpoint.jp
Thu Mar 24 11:54:16 UTC 2016


 starmath/source/unomodel.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 222c64df382ad05635a3bdbd05b761fb5bdc2c49
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Mar 23 17:03:51 2016 +0900

    starmath: nCount == aVector.size()
    
    Change-Id: I9ea654292718ebd9f1769ca8accf4e39def7f959
    Reviewed-on: https://gerrit.libreoffice.org/23460
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 1fa7fe4..28dd2e5 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();


More information about the Libreoffice-commits mailing list