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

Arnaud Versini arnaud.versini at gmail.com
Sun May 8 12:03:00 UTC 2016


 basic/source/comp/sbcomp.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e97a8f339ac262b3ead1f0f7e71166587eb7bc3b
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sat May 7 19:44:28 2016 +0200

    BASIC : Remove an useless static_cast and use make_unique
    
    Change-Id: I32ec7e02ebf5a469db87bd2206d5fcd604b86795
    Reviewed-on: https://gerrit.libreoffice.org/24720
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 0b46da3..bdddbc4 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();


More information about the Libreoffice-commits mailing list