diff options
author | Arnaud Versini <arnaud.versini@libreoffice.org> | 2023-09-19 16:17:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-09-20 08:07:30 +0200 |
commit | 08a2de20238e250d5ddf8cc43341a9f48ed9d759 (patch) | |
tree | 6242476f07bee1d874f7def866d13bcd1484dbcd /basic | |
parent | 35f43bfafa763b7e45188f155fab746c0aec8804 (diff) |
basic : remove useless allocation in BasicDLLImpl
Change-Id: I8e2628da08cb621087915dcfb4d55ddacfeaabc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157048
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/basrdll.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index ba94fd7b9d2b..853863b4fcfd 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -37,12 +37,11 @@ struct BasicDLLImpl : public SvRefBase bool bDebugMode; bool bBreakEnabled; - std::unique_ptr<SbxAppData> xSbxAppData; + SbxAppData aSbxAppData; BasicDLLImpl() : bDebugMode(false) , bBreakEnabled(true) - , xSbxAppData(new SbxAppData) { } static BasicDLLImpl* BASIC_DLL; @@ -69,7 +68,7 @@ BasicDLL::~BasicDLL() std::scoped_lock aGuard(BasicDLLImpl::getMutex()); const bool bLastRef = m_xImpl->GetRefCount() == 1; if (bLastRef) { - BasicDLLImpl::BASIC_DLL->xSbxAppData->m_aGlobErr.clear(); + BasicDLLImpl::BASIC_DLL->aSbxAppData.m_aGlobErr.clear(); } m_xImpl.clear(); // only reset BASIC_DLL after the object had been destroyed @@ -122,12 +121,12 @@ void BasicDLL::BasicBreak() SbxAppData& GetSbxData_Impl() { - return *BasicDLLImpl::BASIC_DLL->xSbxAppData; + return BasicDLLImpl::BASIC_DLL->aSbxAppData; } bool IsSbxData_Impl() { - return BasicDLLImpl::BASIC_DLL && BasicDLLImpl::BASIC_DLL->xSbxAppData; + return BasicDLLImpl::BASIC_DLL; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |