diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-13 14:56:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-14 08:28:31 +0200 |
commit | b0b0aef18fff981fa1f4a1539c150260cc526595 (patch) | |
tree | 5ca719fbb17aa857d132f2d97becfa0ac95b34c2 /sw/source/core/layout/laycache.cxx | |
parent | a4fb52ac0f48b10b72be330fe49d99a9a2471751 (diff) |
clang-tidy modernize-use-emplace in sw
Change-Id: I92fd035824f247dc61edfb18c54b960a7733fdf7
Reviewed-on: https://gerrit.libreoffice.org/42244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/laycache.cxx')
-rw-r--r-- | sw/source/core/layout/laycache.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 39cfc157aae7..21ab1ba8729e 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -132,7 +132,7 @@ bool SwLayCacheImpl::Read( SvStream& rStream ) sal_uInt16 nPgNum(0); aIo.GetStream().ReadUInt16( nPgNum ).ReadUInt32( nIndex ) .ReadInt32( nX ).ReadInt32( nY ).ReadInt32( nW ).ReadInt32( nH ); - m_FlyCache.push_back(SwFlyCache( nPgNum, nIndex, nX, nY, nW, nH )); + m_FlyCache.emplace_back( nPgNum, nIndex, nX, nY, nW, nH ); aIo.CloseRec(); break; } @@ -1045,7 +1045,7 @@ bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) sal_uInt32 nPos = pStream->Tell(); if( bWriteMode ) { - aRecords.push_back( RecTypeSize(cType, nPos) ); + aRecords.emplace_back(cType, nPos ); pStream->WriteUInt32( 0 ); } else @@ -1058,14 +1058,14 @@ bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) { OSL_ENSURE( nVal, "OpenRec: Record-Header is 0" ); OSL_ENSURE( cRecTyp == cType, "OpenRec: Wrong Record Type" ); - aRecords.push_back( RecTypeSize(0, pStream->Tell()) ); + aRecords.emplace_back(0, pStream->Tell() ); bRes = false; bError = true; } else { sal_uInt32 nSize = nVal >> 8; - aRecords.push_back( RecTypeSize(cRecTyp, nPos+nSize) ); + aRecords.emplace_back(cRecTyp, nPos+nSize ); } } return bRes; |