summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-20 19:56:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-21 07:35:05 +0100
commit1c413e4b9ded15567763dd0be086f7e311ca4dbb (patch)
treea1593cb3ae5cf4d62c4fbbf332680c891b6eb2d1 /idlc
parentb3531d10e86a0e1750180422a664c98f69e38b66 (diff)
loplugin:subtlezeroinit: idlc
Change-Id: Ifec509c4d96a932cfe591b5ffa77027b7b372d52
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/astexpression.cxx16
-rw-r--r--idlc/source/idlcproduce.cxx2
-rw-r--r--idlc/source/parser.y8
3 files changed, 13 insertions, 13 deletions
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<AstExprValue> 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<AstExprValue> 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<AstExprValue> 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;
}