summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2020-05-20 14:03:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-20 08:58:43 +0200
commit24ad718a94eee2103a5a5e995619a844b8670f24 (patch)
tree9517153fd18ddc965b4a4127d1415662862e0d4b
parent63d4e8aa10186b4ed0e3106c116ad25c5fb5ed6d (diff)
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@collabora.co.uk>
-rw-r--r--basic/source/classes/image.cxx4
-rw-r--r--basic/source/classes/propacc.cxx9
-rw-r--r--basic/source/classes/sbintern.cxx11
3 files changed, 3 insertions, 21 deletions
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: */