summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:30:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:34 +0100
commite4fbe2582c4e042f50db3d5d86b717fe15721ab5 (patch)
tree1ffa58a82332ab3add4c5f149068e3c1f7479047 /rsc
parent93a364a8aee1fcf5c3f6185dfe067f06929ab4e7 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I9f8a64433177ba871fa020c0922a539c3e277bc2
Diffstat (limited to 'rsc')
-rw-r--r--rsc/source/tools/rscdef.cxx2
-rw-r--r--rsc/source/tools/rsctree.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 99bec484a792..7daa2f0ec531 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -548,7 +548,7 @@ bool RscFileTab::TestDef( sal_uLong lFileKey, size_t lPos,
if( lFileKey == pDefDec->GetFileKey() )
{
RscFile * pFile = GetFile( pDefDec->GetFileKey() );
- if( pFile && (lPos <= pFile->aDefLst.GetPos( (RscDefine *)pDefDec ))
+ if( pFile && (lPos <= pFile->aDefLst.GetPos( const_cast<RscDefine *>(pDefDec) ))
&& (lPos != ULONG_MAX ) )
{
return false;
diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx
index 9e5cf23cbdc6..98ae17595bf4 100644
--- a/rsc/source/tools/rsctree.cxx
+++ b/rsc/source/tools/rsctree.cxx
@@ -39,7 +39,7 @@ void BiNode::EnumNodes( Link aLink ) const
{
if( Left() )
Left()->EnumNodes( aLink );
- aLink.Call( (BiNode *)this );
+ aLink.Call( const_cast<BiNode *>(this) );
if( Right() )
Right()->EnumNodes( aLink );
}
@@ -185,7 +185,7 @@ NameNode* NameNode::SearchParent( const NameNode * pSearch ) const
if( Left() )
{
if( ((NameNode *)Left())->Compare( pSearch ) == EQUAL )
- return (NameNode *)this;
+ return const_cast<NameNode *>(this);
return ((NameNode *)Left())->SearchParent( pSearch );
}
}
@@ -194,7 +194,7 @@ NameNode* NameNode::SearchParent( const NameNode * pSearch ) const
if( Right() )
{
if( ((NameNode *)Right())->Compare( pSearch ) == EQUAL )
- return (NameNode *)this;
+ return const_cast<NameNode *>(this);
return ((NameNode *)Right())->SearchParent( pSearch );
}
}
@@ -219,7 +219,7 @@ NameNode* NameNode::Search( const NameNode * pSearch ) const
return ((NameNode *)Right())->Search( pSearch );
}
else
- return (NameNode *)this;
+ return const_cast<NameNode *>(this);
return NULL;
}
@@ -242,7 +242,7 @@ NameNode* NameNode::Search( const void * pSearch ) const
return ((NameNode *)Right())->Search( pSearch );
}
else
- return (NameNode *)this;
+ return const_cast<NameNode *>(this);
return NULL;
}