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

Arnaud Versini (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 20 06:59:19 UTC 2020


 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(-)

New commits:
commit 24ad718a94eee2103a5a5e995619a844b8670f24
Author:     Arnaud Versini <arnaud.versini at gmail.com>
AuthorDate: Wed May 20 14:03:43 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jun 20 08:58:43 2020 +0200

    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 <noel.grandin at collabora.co.uk>

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


More information about the Libreoffice-commits mailing list