From 85d71244eb8caf55aab8094b587dfee7fa1e97b2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 13 Jul 2017 11:47:27 +0200 Subject: loplugin:oncevar: empty strings: basic Change-Id: I4edf130e526c4004aa8913e6aafdcd1e2f4ac1ef --- basic/source/comp/exprtree.cxx | 6 ++---- basic/source/comp/parser.cxx | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'basic/source/comp') diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 3039046f39bd..085476bb794a 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -606,8 +606,7 @@ SbiExprNode* SbiExpression::Unary() pParser->Next(); SbiExprNode* pObjNode = Operand( true/*bUsedForTypeOf*/ ); pParser->TestToken( IS ); - OUString aDummy; - SbiSymDef* pTypeDef = new SbiSymDef( aDummy ); + SbiSymDef* pTypeDef = new SbiSymDef( OUString() ); pParser->TypeDecl( *pTypeDef, true ); pNd = new SbiExprNode( pObjNode, pTypeDef->GetTypeId() ); break; @@ -615,8 +614,7 @@ SbiExprNode* SbiExpression::Unary() case NEW: { pParser->Next(); - OUString aStr; - SbiSymDef* pTypeDef = new SbiSymDef( aStr ); + SbiSymDef* pTypeDef = new SbiSymDef( OUString() ); pParser->TypeDecl( *pTypeDef, true ); pNd = new SbiExprNode( pTypeDef->GetTypeId() ); break; diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 0347e0eccd62..d4a33465c122 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -590,8 +590,7 @@ void SbiParser::Set() if( eTok == NEW ) { Next(); - OUString aStr; - SbiSymDef* pTypeDef = new SbiSymDef( aStr ); + SbiSymDef* pTypeDef = new SbiSymDef( OUString() ); TypeDecl( *pTypeDef, true ); aLvalue.Gen(); -- cgit