Changeset 409 in dev for trunk/abdev/BasicCompiler_Common/src/Class_Collect.cpp
- Timestamp:
- Mar 3, 2008, 6:33:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/Class_Collect.cpp
r402 r409 216 216 217 217 bool Classes::MemberVar_LoopRefCheck(const CClass &objClass){ 218 if( objClass.HasSuperClass() ) 219 { 220 // 基底クラスをチェック 221 if( MemberVar_LoopRefCheck( objClass.GetSuperClass() ) == false ) 222 { 223 return false; 224 } 225 } 226 218 227 bool result = true; 219 228 BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){ … … 483 492 iAlign=atoi(temporary); 484 493 494 if( dwClassType != ESC_TYPE ) 495 { 496 SetError(140,NULL,i); 497 } 498 485 499 if(!(iAlign==1||iAlign==2||iAlign==4||iAlign==8||iAlign==16)) 486 500 SetError(51,NULL,i); … … 490 504 i+=10; 491 505 i=JumpStringInPare(basbuf,i)+1; 506 507 if( dwClassType != ESC_CLASS ) 508 { 509 SetError(141,NULL,i); 510 } 492 511 } 493 512 … … 715 734 716 735 717 if(pobj_c->GetDynamicMembers() [pobj_c->GetDynamicMembers().size()-1]->GetType().IsStruct()){718 if( !pobj_c->GetDynamicMembers() [pobj_c->GetDynamicMembers().size()-1]->GetType().GetClass().IsReady() ){736 if(pobj_c->GetDynamicMembers().back()->GetType().IsStruct()){ 737 if( !pobj_c->GetDynamicMembers().back()->GetType().GetClass().IsReady() ){ 719 738 //参照先が読み取られていないとき 720 GetClass_recur(pobj_c->GetDynamicMembers() [pobj_c->GetDynamicMembers().size()-1]->GetType().GetClass().GetName().c_str());739 GetClass_recur(pobj_c->GetDynamicMembers().back()->GetType().GetClass().GetName().c_str()); 721 740 } 722 741 } 723 742 724 743 725 if(pobj_c->GetDynamicMembers() [pobj_c->GetDynamicMembers().size()-1]->GetType().IsStruct()){744 if(pobj_c->GetDynamicMembers().back()->GetType().IsStruct()){ 726 745 //循環参照のチェック 727 746 pobj_LoopRefCheck->add(pobj_c->GetName().c_str()); 728 if(!MemberVar_LoopRefCheck(pobj_c->GetDynamicMembers() [pobj_c->GetDynamicMembers().size()-1]->GetType().GetClass())){747 if(!MemberVar_LoopRefCheck(pobj_c->GetDynamicMembers().back()->GetType().GetClass())){ 729 748 //エラー回避 730 749 Type &type = const_cast<Type &>(pobj_c->GetDynamicMembers().back()->GetType());
Note:
See TracChangeset
for help on using the changeset viewer.