From 1c413e4b9ded15567763dd0be086f7e311ca4dbb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 20 Feb 2017 19:56:20 +0100 Subject: loplugin:subtlezeroinit: idlc Change-Id: Ifec509c4d96a932cfe591b5ffa77027b7b372d52 --- idlc/source/astexpression.cxx | 16 ++++++++-------- idlc/source/idlcproduce.cxx | 2 +- idlc/source/parser.y | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'idlc') diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx index 65451a5f231f..bac987d942ea 100644 --- a/idlc/source/astexpression.cxx +++ b/idlc/source/astexpression.cxx @@ -49,7 +49,7 @@ AstExpression::AstExpression(sal_Int32 l) { fillDefinitionDetails(); - m_exprValue = new AstExprValue(); + m_exprValue = new AstExprValue; m_exprValue->et = ET_long; m_exprValue->u.lval = l; } @@ -63,7 +63,7 @@ AstExpression::AstExpression(sal_Int32 l, ExprType et) { fillDefinitionDetails(); - m_exprValue = new AstExprValue(); + m_exprValue = new AstExprValue; m_exprValue->et = et; m_exprValue->u.lval = l; } @@ -77,7 +77,7 @@ AstExpression::AstExpression(sal_Int64 h) { fillDefinitionDetails(); - m_exprValue = new AstExprValue(); + m_exprValue = new AstExprValue; m_exprValue->et = ET_hyper; m_exprValue->u.hval = h; } @@ -91,7 +91,7 @@ AstExpression::AstExpression(sal_uInt64 uh) { fillDefinitionDetails(); - m_exprValue = new AstExprValue(); + m_exprValue = new AstExprValue; m_exprValue->et = ET_uhyper; m_exprValue->u.uhval = uh; } @@ -105,7 +105,7 @@ AstExpression::AstExpression(double d) { fillDefinitionDetails(); - m_exprValue = new AstExprValue(); + m_exprValue = new AstExprValue; m_exprValue->et = ET_double; m_exprValue->u.dval = d; } @@ -847,7 +847,7 @@ std::unique_ptr AstExpression::eval_bin_op() if (!m_subExpr2->coerce(eType)) return nullptr; - std::unique_ptr< AstExprValue > retval(new AstExprValue()); + std::unique_ptr< AstExprValue > retval(new AstExprValue); retval->et = eType; switch (m_combOperator) @@ -893,7 +893,7 @@ std::unique_ptr AstExpression::eval_bit_op() if (!m_subExpr2->coerce(ET_long)) return nullptr; - std::unique_ptr< AstExprValue > retval(new AstExprValue()); + std::unique_ptr< AstExprValue > retval(new AstExprValue); retval->et = ET_long; switch (m_combOperator) @@ -930,7 +930,7 @@ std::unique_ptr AstExpression::eval_un_op() if (!m_subExpr1->coerce(ET_double)) return nullptr; - std::unique_ptr< AstExprValue > retval(new AstExprValue()); + std::unique_ptr< AstExprValue > retval(new AstExprValue); retval->et = ET_double; switch (m_combOperator) diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx index 67da2cdd3512..e66bc9229a43 100644 --- a/idlc/source/idlcproduce.cxx +++ b/idlc/source/idlcproduce.cxx @@ -83,7 +83,7 @@ static bool checkOutputPath(const OString& completeName) } else { if ( !pCreatedDirectories ) - pCreatedDirectories = new std::list< OString >(); + pCreatedDirectories = new std::list< OString >; pCreatedDirectories->push_front(buffer.getStr()); } } diff --git a/idlc/source/parser.y b/idlc/source/parser.y index c2c55d16c13b..bcaeea2bc0f2 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -2074,7 +2074,7 @@ at_least_one_declarator : $$ = $2; } else { - FeDeclList* pList = new FeDeclList(); + FeDeclList* pList = new FeDeclList; pList->push_back($1); $$ = pList; } @@ -2096,7 +2096,7 @@ declarators : $$ = $1; } else { - FeDeclList* pList = new FeDeclList(); + FeDeclList* pList = new FeDeclList; pList->push_back($4); $$ = pList; } @@ -2135,7 +2135,7 @@ at_least_one_scoped_name : $$ = $2; } else { - std::list< OString >* pScopedNames = new std::list< OString >(); + std::list< OString >* pScopedNames = new std::list< OString >; // coverity [copy_paste_error] pScopedNames->push_back(*$1); $$ = pScopedNames; @@ -2159,7 +2159,7 @@ scoped_names : $$ = $1; } else { - std::list< OString >* pNames = new std::list< OString >(); + std::list< OString >* pNames = new std::list< OString >; pNames->push_back(*$4); $$ = pNames; } -- cgit