diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-27 15:55:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-28 13:28:31 +0200 |
commit | 3e0c39f9aeaa5c8791df94418ab8b4b78e005ac1 (patch) | |
tree | 95688550e260ca9a3f0841d8c5e403e9954433d1 /ucb | |
parent | 6eb3d37fdc75537aa94144eef97493ec6192792f (diff) |
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@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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(); |