summaryrefslogtreecommitdiff
path: root/idlc/source/astenum.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-28 08:58:48 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-09-07 02:42:30 -0500
commited75aa271956824c89b7c9df2c06e4ad09a74734 (patch)
tree432c17088789736364b2932b9085e5b17a8cc71a /idlc/source/astenum.cxx
parent5ca2d1e26513095670b3fd2dce6a464a415cab89 (diff)
create clang plugin to warn about C-style casts
We don't like C-style casts in our nice C++ code Change-Id: I94e7ec90de9275cd6e20c4146d4f3a74bed93c9d Reviewed-on: https://gerrit.libreoffice.org/10367 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'idlc/source/astenum.cxx')
-rw-r--r--idlc/source/astenum.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx
index 13bd8774f651..a0df33199ec5 100644
--- a/idlc/source/astenum.cxx
+++ b/idlc/source/astenum.cxx
@@ -45,7 +45,7 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr)
while ( iter != end)
{
pDecl = *iter;
- pConst = (AstConstant*)pDecl;
+ pConst = static_cast<AstConstant*>(pDecl);
if (pConst->getConstValue()->compare(pExpr))
return pConst;
@@ -88,7 +88,7 @@ bool AstEnum::dump(RegistryKey& rKey)
{
pDecl = *iter;
if ( pDecl->getNodeType() == NT_enum_val )
- ((AstConstant*)pDecl)->dumpBlob(aBlob, index++, false);
+ static_cast<AstConstant*>(pDecl)->dumpBlob(aBlob, index++, false);
++iter;
}