summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2016-05-07 19:44:28 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-08 12:02:37 +0000
commite97a8f339ac262b3ead1f0f7e71166587eb7bc3b (patch)
tree57215789dd346d5377d9be609126b11cdaa2ce6b /basic
parent6cd62368915466a2b2054cffb172fd368a6b329d (diff)
BASIC : Remove an useless static_cast and use make_unique
Change-Id: I32ec7e02ebf5a469db87bd2206d5fcd604b86795 Reviewed-on: https://gerrit.libreoffice.org/24720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
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();