sw/source/core/txtnode/fntcap.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit afb0dfc41ebb0a6a96ae31c122c7f97743dc7486 Author: Noel Grandin <[email protected]> AuthorDate: Thu Sep 13 11:05:14 2018 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Sep 14 10:59:26 2018 +0200 loplugin:useuniqueptr in SwSubFont::DoOnCapitals Change-Id: Ib5a02c71fa66f46a8e1072c5c0a263e1eb977692 Reviewed-on: https://gerrit.libreoffice.org/60454 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index 14a38f7846e7..12be40860253 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -537,8 +537,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100 ); nFontCacheId2 = nullptr; nIndex2 = 0; - SwFntAccess *pSmallFontAccess = new SwFntAccess( nFontCacheId2, nIndex2, &aFont, - rDo.GetInf().GetShell() ); + std::unique_ptr<SwFntAccess> pSmallFontAccess( new SwFntAccess( nFontCacheId2, nIndex2, &aFont, + rDo.GetInf().GetShell() )); SwFntObj *pSmallFont = pSmallFontAccess->Get(); rDo.Init( pBigFont, pSmallFont ); @@ -749,7 +749,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) pLastFont = pOldLast; pLastFont->SetDevFont( rDo.GetInf().GetShell(), rDo.GetOut() ); - delete pSmallFontAccess; + pSmallFontAccess.reset(); rDo.GetInf().SetText(oldText); rDo.GetInf().SetKanaDiff( nKana ); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
