[Libreoffice-commits] core.git: basic/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 21 17:52:35 UTC 2018
basic/source/comp/exprtree.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit bd26a8efd5ae0054b9be880870df166299759a30
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Dec 21 11:22:24 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 21 18:52:05 2018 +0100
use unique_ptr in SbiExpression
Change-Id: I8b44215c438b749afce4ad056cab2c2ac66d4bda
Reviewed-on: https://gerrit.libreoffice.org/65534
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index a8bae29ebbe5..20d0691cd0c9 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -191,7 +191,7 @@ std::unique_ptr<SbiExprNode> SbiExpression::Term( const KeywordSymbolInfo* pKeyw
OUString aSym( (pKeywordSymbolInfo == nullptr) ? pParser->GetSym() : pKeywordSymbolInfo->m_aKeywordSymbol );
SbxDataType eType = (pKeywordSymbolInfo == nullptr) ? pParser->GetType() : pKeywordSymbolInfo->m_eSbxDataType;
SbiExprListPtr pPar;
- SbiExprListVector* pvMoreParLcl = nullptr;
+ std::unique_ptr<SbiExprListVector> pvMoreParLcl;
// are there parameters following?
SbiToken eNextTok = pParser->Peek();
// is it a known parameter?
@@ -224,7 +224,7 @@ std::unique_ptr<SbiExprNode> SbiExpression::Term( const KeywordSymbolInfo* pKeyw
{
if( pvMoreParLcl == nullptr )
{
- pvMoreParLcl = new SbiExprListVector;
+ pvMoreParLcl.reset(new SbiExprListVector);
}
SbiExprListPtr pAddPar = SbiExprList::ParseParameters( pParser );
bError = bError || !pAddPar->IsValid();
@@ -289,7 +289,7 @@ std::unique_ptr<SbiExprNode> SbiExpression::Term( const KeywordSymbolInfo* pKeyw
if( pConst )
{
pPar = nullptr;
- delete pvMoreParLcl;
+ pvMoreParLcl.reset();
if( pConst->GetType() == SbxSTRING )
{
return o3tl::make_unique<SbiExprNode>( pConst->GetString() );
@@ -353,7 +353,7 @@ std::unique_ptr<SbiExprNode> SbiExpression::Term( const KeywordSymbolInfo* pKeyw
pPar = SbiExprList::ParseParameters( pParser,false,false );
}
pNd->aVar.pPar = pPar.release();
- pNd->aVar.pvMorePar = pvMoreParLcl;
+ pNd->aVar.pvMorePar = pvMoreParLcl.release();
if( bObj )
{
// from 8.1.95: Object may also be of the type SbxVARIANT
More information about the Libreoffice-commits
mailing list