Changeset 203 in dev for trunk/jenga/src
- Timestamp:
- Jul 3, 2007, 3:49:18 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/src/smoothie/Class.cpp
r192 r203 6 6 7 7 8 CClass::CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name )9 : isReady( false )10 , Prototype( namespaceScopes, name )11 , importedNamespaces( importedNamespaces )12 , ConstructorMemberSubIndex( -1 )13 , DestructorMemberSubIndex( -1 )14 , classType( Class )15 , pobj_InheritsClass( NULL )16 , vtblNum( 0 )17 , iAlign( 0 )18 , vtbl_offset( -1 )19 , isCompilingConstructor( false )20 , isCompilingDestructor( false )21 , pobj_NextClass( NULL )22 {23 }24 8 CClass::~CClass(){ 25 9 // 動的メンバ … … 284 268 bool CClass::IsSubClass( const CClass *pClass ) const 285 269 { 286 pClass = pClass->pobj_InheritsClass; 287 while( pClass ){ 288 if( this == pClass ) return true; 289 pClass = pClass->pobj_InheritsClass; 270 if( !pClass->HasSuperClass() ) 271 { 272 return false; 273 } 274 275 const CClass *pTempClass = &pClass->GetSuperClass(); 276 while( pTempClass ){ 277 if( this == pTempClass ) return true; 278 pTempClass = &pTempClass->GetSuperClass(); 290 279 } 291 280 return false;
Note:
See TracChangeset
for help on using the changeset viewer.