Ignore:
Timestamp:
Mar 21, 2008, 2:23:20 PM (17 years ago)
Author:
dai_9181
Message:

共変戻り値のオーバーロードをサポートした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp

    r431 r447  
    130130
    131131//自身の派生クラスかどうかを確認
    132 bool CClass::IsSubClass( const CClass *pClass ) const
    133 {
    134     if( !pClass->HasSuperClass() )
     132bool CClass::IsSubClass( const CClass *pSubClass ) const
     133{
     134    if( !pSubClass->HasSuperClass() )
    135135    {
    136136        return false;
    137137    }
    138138
    139     const CClass *pTempClass = &pClass->GetSuperClass();
     139    const CClass *pTempClass = &pSubClass->GetSuperClass();
    140140    while( pTempClass ){
    141141        if( this == pTempClass ) return true;
     
    146146
    147147//自身と等しいまたは派生クラスかどうかを確認
    148 bool CClass::IsEqualsOrSubClass( const CClass *pClass ) const
    149 {
    150     if( IsEquals( pClass ) ) return true;
    151     return IsSubClass( pClass );
     148bool CClass::IsEqualsOrSubClass( const CClass *pSubClass ) const
     149{
     150    if( IsEquals( pSubClass ) ) return true;
     151    return IsSubClass( pSubClass );
    152152}
    153153
Note: See TracChangeset for help on using the changeset viewer.