summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:29:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:31 +0100
commit5920dfe7deafbc673f4eaac321e8a2fdf477ca93 (patch)
treed1c14ce7a0bc0faefa01342c84c0523d60d28ebd /idl
parentc3f4909b992735f6a90b97b8019442a8acd12f95 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Ia302dcfd4b4801170cb15950f4d7f1ba0792e93e
Diffstat (limited to 'idl')
-rw-r--r--idl/source/objects/basobj.cxx2
-rw-r--r--idl/source/objects/types.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index a82d1210fba1..bde7d8a1dd03 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -192,7 +192,7 @@ SvMetaModule * SvMetaExtern::GetModule() const
const SvGlobalName & SvMetaExtern::GetUUId() const
{
if( aUUId == SvGlobalName() )
- GetModule()->FillNextName( &((SvMetaExtern *)this)->aUUId );
+ GetModule()->FillNextName( &const_cast<SvMetaExtern *>(this)->aUUId );
return aUUId;
}
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index cd4179559281..73bef4f5f3af 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -270,7 +270,7 @@ SvMetaType::~SvMetaType() {
SvMetaAttributeMemberList & SvMetaType::GetAttrList() const
{
if( !pAttrList )
- ((SvMetaType *)this)->pAttrList = new SvMetaAttributeMemberList();
+ const_cast<SvMetaType *>(this)->pAttrList = new SvMetaAttributeMemberList();
return *pAttrList;
}
@@ -293,7 +293,7 @@ SvMetaType * SvMetaType::GetBaseType() const
{
if( GetRef() && GetType() == TYPE_BASE )
return static_cast<SvMetaType *>(GetRef())->GetBaseType();
- return (SvMetaType *)this;
+ return const_cast<SvMetaType *>(this);
}
SvMetaType * SvMetaType::GetReturnType() const