From 24ad718a94eee2103a5a5e995619a844b8670f24 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Wed, 20 May 2020 14:03:43 +0200 Subject: BASIC : don't initialize and destroy manually std::unique_ptr Change-Id: I97921d5a6f7e0f6dfc3100e4ea33ba79e5a135dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94573 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/image.cxx | 4 ---- basic/source/classes/propacc.cxx | 9 ++------- basic/source/classes/sbintern.cxx | 11 +---------- 3 files changed, 3 insertions(+), 21 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index e6e277647459..ec4901a549ff 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -31,9 +31,6 @@ SbiImage::SbiImage() { - pStrings = nullptr; - pCode = nullptr; - pLegacyPCode = nullptr; nFlags = SbiImageFlags::NONE; nStringSize= 0; nCodeSize = 0; @@ -49,7 +46,6 @@ SbiImage::SbiImage() SbiImage::~SbiImage() { - Clear(); } void SbiImage::Clear() diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx index 45d13ffbbb1d..e4765fa2249c 100644 --- a/basic/source/classes/propacc.cxx +++ b/basic/source/classes/propacc.cxx @@ -44,15 +44,10 @@ static bool SbCompare_UString_PropertyValue_Impl(PropertyValue const & lhs, cons } -SbPropertyValues::SbPropertyValues() -{ -} +SbPropertyValues::SbPropertyValues() = default; -SbPropertyValues::~SbPropertyValues() -{ - m_xInfo.clear(); -} +SbPropertyValues::~SbPropertyValues() = default; Reference< XPropertySetInfo > SbPropertyValues::getPropertySetInfo() { diff --git a/basic/source/classes/sbintern.cxx b/basic/source/classes/sbintern.cxx index aaf26ee2a34c..91c1c2a772ad 100644 --- a/basic/source/classes/sbintern.cxx +++ b/basic/source/classes/sbintern.cxx @@ -33,8 +33,6 @@ SbiGlobals* GetSbData() SbiGlobals::SbiGlobals() { pInst = nullptr; - pSbFac = nullptr; - pUnoFac = nullptr; pTypeFac = nullptr; pClassFac = nullptr; pOLEFac = nullptr; @@ -48,17 +46,10 @@ SbiGlobals::SbiGlobals() bCompilerError = false; bGlobalInitErr = false; bRunInit = false; - pTransliterationWrapper = nullptr; bBlockCompilerError = false; - pAppBasMgr = nullptr; pMSOMacroRuntimLib = nullptr; } -SbiGlobals::~SbiGlobals() -{ - pSbFac.reset(); - pUnoFac.reset(); - pTransliterationWrapper.reset(); -} +SbiGlobals::~SbiGlobals() = default; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit