summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/sbcomp.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 0b46da372913..bdddbc4e2ec6 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -25,6 +25,7 @@
#include <svtools/miscopt.hxx>
#include <rtl/character.hxx>
#include <memory>
+#include <o3tl/make_unique.hxx>
// This routine is defined here, so that the
// compiler can be loaded as a discrete segment.
@@ -41,7 +42,7 @@ bool SbModule::Compile()
SbModule* pOld = GetSbData()->pCompMod;
GetSbData()->pCompMod = this;
- std::unique_ptr<SbiParser> pParser(new SbiParser( static_cast<StarBASIC*>(GetParent()), this ));
+ auto pParser = o3tl::make_unique<SbiParser>( pBasic, this );
while( pParser->Parse() ) {}
if( !pParser->GetErrors() )
pParser->aGen.Save();