File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -569,15 +569,20 @@ void dbChip::destroy(dbChip* chip_)
569569{
570570 _dbChip* chip = (_dbChip*) chip_;
571571 // Destroy chip connections
572- dbSet<dbChipConn> chipConns = chip_->getChipConns ();
573- for (dbChipConn* chipConn : chipConns) {
572+ auto chip_conns = chip_->getChipConns ();
573+ auto chip_conns_itr = chip_conns.begin ();
574+ while (chip_conns_itr != chip_conns.end ()) {
575+ auto chipConn = *chip_conns_itr++;
574576 dbChipConn::destroy (chipConn);
575577 }
576578 // destroy chip insts
577- dbSet<dbChipInst> chipInsts = chip_->getChipInsts ();
578- for (dbChipInst* chipInst : chipInsts) {
579+ auto chip_insts = chip_->getChipInsts ();
580+ auto chip_insts_itr = chip_insts.begin ();
581+ while (chip_insts_itr != chip_insts.end ()) {
582+ auto chipInst = *chip_insts_itr++;
579583 dbChipInst::destroy (chipInst);
580584 }
585+ // TODO: destroy instances of the current chip
581586 // Destroy chip
582587 _dbDatabase* db = chip->getDatabase ();
583588 if (db->_chip == chip->getOID ()) {
You can’t perform that action at this time.
0 commit comments