diff options
-rw-r--r-- | rsc/source/tools/rscdef.cxx | 2 | ||||
-rw-r--r-- | rsc/source/tools/rsctree.cxx | 10 |
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; } |