summaryrefslogtreecommitdiff
path: root/ucb/source/cacher/cachedcontentresultset.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-19 09:09:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-20 06:56:32 +0000
commit84defbc556c17aa58851fd14f8af0deaa3cc6e05 (patch)
tree8eb1b3dceea8ca8b6d2e62b3c20c8d121deb8a9e /ucb/source/cacher/cachedcontentresultset.cxx
parent3bb8bdb93f1546f64ff3f183d6162c41a03856bf (diff)
new loplugin: useuniqueptr: ucb..ucbhelper
Change-Id: Ib19ca3225b96d1bfec8a43bb762e16597f33b690 Reviewed-on: https://gerrit.libreoffice.org/33297 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/cacher/cachedcontentresultset.cxx')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx23
1 files changed, 5 insertions, 18 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index e1ab4c173063..e08edb397bc5 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -129,17 +129,12 @@ CachedContentResultSet::CCRS_Cache::CCRS_Cache(
CachedContentResultSet::CCRS_Cache::~CCRS_Cache()
{
- delete m_pResult;
}
void SAL_CALL CachedContentResultSet::CCRS_Cache
::clear()
{
- if( m_pResult )
- {
- delete m_pResult;
- m_pResult = nullptr;
- }
+ m_pResult.reset();
clearMappedReminder();
}
@@ -147,7 +142,7 @@ void SAL_CALL CachedContentResultSet::CCRS_Cache
::loadData( const FetchResult& rResult )
{
clear();
- m_pResult = new FetchResult( rResult );
+ m_pResult.reset( new FetchResult( rResult ) );
}
bool SAL_CALL CachedContentResultSet::CCRS_Cache
@@ -378,7 +373,7 @@ class CCRS_PropertySetInfo :
friend class CachedContentResultSet;
//my Properties
- Sequence< css::beans::Property >*
+ std::unique_ptr<Sequence< css::beans::Property >>
m_pProperties;
long m_nFetchSizePropertyHandle;
@@ -402,8 +397,6 @@ public:
explicit CCRS_PropertySetInfo( Reference<
XPropertySetInfo > const & xPropertySetInfoOrigin );
- virtual ~CCRS_PropertySetInfo() override;
-
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
throw( css::uno::RuntimeException, std::exception ) override;
@@ -453,12 +446,12 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
if( xInfo.is() )
{
Sequence<Property> aProps = xInfo->getProperties();
- m_pProperties = new Sequence<Property> ( aProps );
+ m_pProperties.reset( new Sequence<Property> ( aProps ) );
}
else
{
OSL_FAIL( "The received XPropertySetInfo doesn't contain required properties" );
- m_pProperties = new Sequence<Property>;
+ m_pProperties.reset( new Sequence<Property> );
}
//ensure, that we haven't got the Properties 'FetchSize' and 'Direction' twice:
@@ -510,12 +503,6 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
}
}
-CCRS_PropertySetInfo::~CCRS_PropertySetInfo()
-{
- delete m_pProperties;
-}
-
-
// XInterface methods.
void SAL_CALL CCRS_PropertySetInfo::acquire()