[Libreoffice-commits] core.git: sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Dec 14 06:25:46 UTC 2017
sw/source/uibase/utlui/initui.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 817a5da6bc6d7db92423933d09c696f7eb9633d9
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Dec 13 15:51:25 2017 +0200
DELETEZ->std::unique_ptr in FinitUI
Change-Id: I2a61a71f4ce4fa289c39011dcd30080775d80e54
Reviewed-on: https://gerrit.libreoffice.org/46399
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index 0c3cf1cfafca..bd5a30fb1a52 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -38,7 +38,7 @@
// Global Pointer
-static SwGlossaries* pGlossaries = nullptr;
+static std::unique_ptr<SwGlossaries> pGlossaries;
// Provides all needed paths. Is initialized by UI.
static SwGlossaryList* pGlossaryList = nullptr;
@@ -152,7 +152,7 @@ void FinitUI()
SwEditWin::FinitStaticData();
- DELETEZ(pGlossaries);
+ pGlossaries.reset();
delete SwFieldType::s_pFieldNames;
@@ -253,8 +253,8 @@ OUString ShellResource::GetPageDescName(sal_uInt16 nNo, PageNameMode eMode)
SwGlossaries* GetGlossaries()
{
if (!pGlossaries)
- pGlossaries = new SwGlossaries;
- return pGlossaries;
+ pGlossaries.reset( new SwGlossaries );
+ return pGlossaries.get();
}
bool HasGlossaryList()
More information about the Libreoffice-commits
mailing list