Kaydet (Commit) e4fbe258 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

const_cast: convert some C-style casts and remove some redundant ones

Change-Id: I9f8a64433177ba871fa020c0922a539c3e277bc2
üst 93a364a8
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment