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

loplugin:useuniqueptr in SwXTextSearch

Change-Id: I30fcea4f03b29dfcd434f4544d5c52dc7ca9d4a9
Reviewed-on: https://gerrit.libreoffice.org/57422
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 802afa88
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <memory>
class SfxItemPropertySet; class SfxItemPropertySet;
class SwSearchProperties_Impl; class SwSearchProperties_Impl;
...@@ -45,8 +46,8 @@ class SwXTextSearch : public cppu::WeakImplHelper ...@@ -45,8 +46,8 @@ class SwXTextSearch : public cppu::WeakImplHelper
OUString m_sSearchText; OUString m_sSearchText;
OUString m_sReplaceText; OUString m_sReplaceText;
SwSearchProperties_Impl* m_pSearchProperties; std::unique_ptr<SwSearchProperties_Impl> m_pSearchProperties;
SwSearchProperties_Impl* m_pReplaceProperties; std::unique_ptr<SwSearchProperties_Impl> m_pReplaceProperties;
const SfxItemPropertySet* m_pPropSet; const SfxItemPropertySet* m_pPropSet;
bool m_bAll : 1; bool m_bAll : 1;
......
...@@ -488,8 +488,8 @@ SwXTextSearch::SwXTextSearch() : ...@@ -488,8 +488,8 @@ SwXTextSearch::SwXTextSearch() :
SwXTextSearch::~SwXTextSearch() SwXTextSearch::~SwXTextSearch()
{ {
delete m_pSearchProperties; m_pSearchProperties.reset();
delete m_pReplaceProperties; m_pReplaceProperties.reset();
} }
namespace namespace
......
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