From 789507906d51f347b1785a3dc908dda6573b22e2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 29 Oct 2013 11:37:22 +0000 Subject: micro optimize this a bit Change-Id: Ie7c36f95b9e594d6cda4c4371d51e79e6d387fd1 --- sot/source/sdstor/stgstrms.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sot') 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; } -- cgit