[Libreoffice-commits] core.git: tools/source ucb/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 28 11:29:17 UTC 2021
tools/source/generic/poly.cxx | 8 ++++----
ucb/source/cacher/cachedcontentresultset.cxx | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 3e0c39f9aeaa5c8791df94418ab8b4b78e005ac1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu May 27 15:55:18 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri May 28 13:28:31 2021 +0200
no need to allocate these on the heap
Change-Id: I0f477edb666ff2c6dc9def45ec68c4ce1a34634a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116289
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 210764086743..f0a0a7388b06 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -141,12 +141,12 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rRect, sal_uInt32 nHorzRound,
const Point aTR( aRect.Right() - nHorzRound, aRect.Top() + nVertRound );
const Point aBR( aRect.Right() - nHorzRound, aRect.Bottom() - nVertRound );
const Point aBL( aRect.Left() + nHorzRound, aRect.Bottom() - nVertRound );
- std::unique_ptr<tools::Polygon> pEllipsePoly( new tools::Polygon( Point(), nHorzRound, nVertRound ) );
- sal_uInt16 i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
+ tools::Polygon aEllipsePoly( Point(), nHorzRound, nVertRound );
+ sal_uInt16 i, nEnd, nSize4 = aEllipsePoly.GetSize() >> 2;
- ImplInitSize(pEllipsePoly->GetSize() + 1);
+ ImplInitSize(aEllipsePoly.GetSize() + 1);
- const Point* pSrcAry = pEllipsePoly->GetConstPointAry();
+ const Point* pSrcAry = aEllipsePoly.GetConstPointAry();
Point* pDstAry = mxPointAry.get();
for( i = 0, nEnd = nSize4; i < nEnd; i++ )
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 297453f1540c..9d1b8d8c7a0d 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -446,8 +446,8 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
if( nFetchDirection != -1 )
nDeleted++;
- std::unique_ptr<Sequence< Property > > pOrigProps(new Sequence<Property> ( *m_pProperties ));
- sal_Int32 nOrigProps = pOrigProps->getLength();
+ Sequence< Property > aOrigProps( *m_pProperties );
+ sal_Int32 nOrigProps = aOrigProps.getLength();
m_pProperties->realloc( nOrigProps + 2 - nDeleted );//note that nDeleted is <= 2
for( sal_Int32 n = 0, m = 0; n < nOrigProps; n++, m++ )
@@ -455,7 +455,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
if( n == nFetchSize || n == nFetchDirection )
m--;
else
- (*m_pProperties)[ m ] = (*pOrigProps)[ n ];
+ (*m_pProperties)[ m ] = aOrigProps[ n ];
}
{
Property& rMyProp = (*m_pProperties)[ nOrigProps - nDeleted ];
@@ -464,7 +464,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
rMyProp.Attributes = PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT;
if( nFetchSize != -1 )
- m_nFetchSizePropertyHandle = (*pOrigProps)[nFetchSize].Handle;
+ m_nFetchSizePropertyHandle = aOrigProps[nFetchSize].Handle;
else
m_nFetchSizePropertyHandle = impl_getRemainedHandle();
More information about the Libreoffice-commits
mailing list