diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-24 10:45:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-25 09:55:53 +0200 |
commit | fbd79e4b2dfdcad415c9de589dd3e509d1fc0f56 (patch) | |
tree | 4ec5c80e26acb08ac3875e52f780ceee37171e89 | |
parent | 187f29dfc8f03565b277ee163186a46a0b8ef0c5 (diff) |
loplugin:useuniqueptr in SwFrameSidebarWinContainer
Change-Id: If802bc040f49f6a78068bbcf2b1247a98987be11
Reviewed-on: https://gerrit.libreoffice.org/57938
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/uibase/docvw/frmsidebarwincontainer.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/frmsidebarwincontainer.hxx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx index c1fb8f2618ad..6a363e697bf7 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx @@ -71,7 +71,7 @@ SwFrameSidebarWinContainer::SwFrameSidebarWinContainer() SwFrameSidebarWinContainer::~SwFrameSidebarWinContainer() { mpFrameSidebarWinContainer->clear(); - delete mpFrameSidebarWinContainer; + mpFrameSidebarWinContainer.reset(); } bool SwFrameSidebarWinContainer::insert( const SwFrame& rFrame, diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx index bfac1090cb12..ecab2380d319 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SW_SOURCE_UIBASE_DOCVW_FRMSIDEBARWINCONTAINER_HXX #include <sal/types.h> +#include <memory> #include <vector> class SwFrame; @@ -55,7 +56,7 @@ class SwFrameSidebarWinContainer std::vector< vcl::Window* >* pSidebarWins ); private: - FrameSidebarWinContainer* mpFrameSidebarWinContainer; + std::unique_ptr<FrameSidebarWinContainer> mpFrameSidebarWinContainer; }; } } // eof of namespace sw::sidebarwindows:: |