diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-29 11:37:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-29 11:38:31 +0000 |
commit | 789507906d51f347b1785a3dc908dda6573b22e2 (patch) | |
tree | 762c863e972b92c8cd01bae4a4abb7776fb16f4d /sot | |
parent | ec70e1cb8c162cd1d8adcd459aefbae44cdcd2f8 (diff) |
micro optimize this a bit
Change-Id: Ie7c36f95b9e594d6cda4c4371d51e79e6d387fd1
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgstrms.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx index fd9d1d1a513f..d4115e5e4724 100644 --- a/sot/source/sdstor/stgstrms.cxx +++ b/sot/source/sdstor/stgstrms.cxx @@ -352,10 +352,9 @@ void StgStrm::scanBuildPageChainCache(sal_Int32 *pOptionalCalcSize) m_aPagesCache.push_back(nBgn); nBgn = pFat->GetNextPage( nBgn ); - if( nUsedPageNumbers.find(nBgn) != nUsedPageNumbers.end() ) + //returned second is false if it already exists + if (!nUsedPageNumbers.insert(nBgn).second) bError = true; - else - nUsedPageNumbers.insert(nBgn); nOptSize += nPageSize; } |