Ignore:
Timestamp:
06/22/09 22:42:54 (4 years ago)
Author:
mwajcht
Message:

Added some checking against NULLs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/f8-to-f1/conv_f8tof1.cpp

    r9 r11  
    697697        cout << "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" << endl; 
    698698#endif 
     699        //final check 
     700        for (map<string, Production*>::iterator prodIter = lsys->productions.begin(); 
     701                 prodIter != lsys->productions.end(); prodIter++) { 
     702                for (vector<SubProduction>::iterator subProdIter = prodIter->second->subproductions.begin(); 
     703                         subProdIter != prodIter->second->subproductions.end(); subProdIter++) { 
     704                        SubProduction subProduction = *subProdIter; 
     705                        for (vector<ActionStrP>::iterator actionIter = subProduction.actions.begin(); 
     706                                 actionIter != subProduction.actions.end(); actionIter++) { 
     707                                if ((*actionIter).action == NULL) { 
     708                                        subProduction.actions.erase(actionIter); 
     709                                } 
     710                        } 
     711                } 
     712        } 
    699713#if CONV_DEBUG > 0 
    700714        cout << "createLsystem() end" << endl; 
Note: See TracChangeset for help on using the changeset viewer.