Kaydet (Commit) 00dd50d1 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in CachedContentResultSet::CCRS_Cache

Change-Id: Idb2dd770ef39119f2a6ee6989bb983c3c77a1d68
Reviewed-on: https://gerrit.libreoffice.org/53235Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst d23b2066
......@@ -246,8 +246,7 @@ bool CachedContentResultSet::CCRS_Cache
void CachedContentResultSet::CCRS_Cache
::clearMappedReminder()
{
delete m_pMappedReminder;
m_pMappedReminder = nullptr;
m_pMappedReminder.reset();
}
Sequence< sal_Bool >* CachedContentResultSet::CCRS_Cache
......@@ -256,11 +255,10 @@ Sequence< sal_Bool >* CachedContentResultSet::CCRS_Cache
if( !m_pMappedReminder )
{
sal_Int32 nCount = m_pResult->Rows.getLength();
m_pMappedReminder = new Sequence< sal_Bool >( nCount );
for( ;nCount; nCount-- )
(*m_pMappedReminder)[nCount] = false;
m_pMappedReminder.reset(new Sequence< sal_Bool >( nCount ));
std::fill(m_pMappedReminder->begin(), m_pMappedReminder->end(), false);
}
return m_pMappedReminder;
return m_pMappedReminder.get();
}
const Any& CachedContentResultSet::CCRS_Cache
......
......@@ -56,7 +56,7 @@ class CachedContentResultSet
m_pResult;
css::uno::Reference< css::ucb::XContentIdentifierMapping >
m_xContentIdentifierMapping;
css::uno::Sequence< sal_Bool >* m_pMappedReminder;
std::unique_ptr<css::uno::Sequence< sal_Bool >> m_pMappedReminder;
private:
/// @throws css::sdbc::SQLException
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment