[Libreoffice-commits] core.git: 2 commits - sot/qa sot/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 29 12:39:25 CET 2013
sot/qa/cppunit/data/fail/fdo70483-1.compound |binary
sot/source/sdstor/stgstrms.cxx | 5 ++---
2 files changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 203d3e63762bb269f9a111279d9e800f20adaf33
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 29 11:37:46 2013 +0000
Related: fdo#70483 add regression test
Change-Id: I390cb550e050dc49ab6adee4f7ec57ef6744e57f
diff --git a/sot/qa/cppunit/data/fail/fdo70483-1.compound b/sot/qa/cppunit/data/fail/fdo70483-1.compound
new file mode 100644
index 0000000..4f6e4f1
Binary files /dev/null and b/sot/qa/cppunit/data/fail/fdo70483-1.compound differ
commit 789507906d51f347b1785a3dc908dda6573b22e2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 29 11:37:22 2013 +0000
micro optimize this a bit
Change-Id: Ie7c36f95b9e594d6cda4c4371d51e79e6d387fd1
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index fd9d1d1..d4115e5 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;
}
More information about the Libreoffice-commits
mailing list