Kaydet (Commit) 167a2a0a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in TypeWriter::createBlop

Change-Id: Iafc9fdcaeb83d1a383ed60b3b610043d0325cde2
Reviewed-on: https://gerrit.libreoffice.org/62650
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst cdeb83ed
......@@ -728,7 +728,7 @@ void TypeWriter::createBlop()
CPInfo root(CP_TAG_INVALID, nullptr);
sal_uInt16 cpIndexThisName = 0;
sal_uInt16* cpIndexSuperNames = nullptr;
std::unique_ptr<sal_uInt16[]> cpIndexSuperNames;
sal_uInt16 cpIndexDoku = 0;
sal_uInt16 cpIndexFileName = 0;
CPInfo* pInfo = nullptr;
......@@ -755,7 +755,7 @@ void TypeWriter::createBlop()
{
blopSize += m_nSuperTypes * entrySize;
cpIndexSuperNames = new sal_uInt16[m_nSuperTypes];
cpIndexSuperNames.reset(new sal_uInt16[m_nSuperTypes]);
for (sal_uInt32 i=0; i < m_nSuperTypes; i++)
{
......@@ -1059,7 +1059,7 @@ void TypeWriter::createBlop()
{
pBuffer += writeUINT16(pBuffer, cpIndexSuperNames[i]);
}
delete[] cpIndexSuperNames;
cpIndexSuperNames.reset();
}
pBuffer += writeUINT16(pBuffer, cpCount);
......
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