[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jul 25 07:56:16 UTC 2018


 sw/source/uibase/docvw/frmsidebarwincontainer.cxx |    2 +-
 sw/source/uibase/docvw/frmsidebarwincontainer.hxx |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit fbd79e4b2dfdcad415c9de589dd3e509d1fc0f56
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jul 24 10:45:17 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jul 25 09:55:53 2018 +0200

    loplugin:useuniqueptr in SwFrameSidebarWinContainer
    
    Change-Id: If802bc040f49f6a78068bbcf2b1247a98987be11
    Reviewed-on: https://gerrit.libreoffice.org/57938
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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::


More information about the Libreoffice-commits mailing list