File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -34,17 +34,19 @@ void dbRegionGroupItr::reverse(dbObject* parent)
3434{
3535 // User Code Begin reverse
3636 _dbRegion* _parent = (_dbRegion*) parent;
37- uint id = _parent->groups_ ;
38- uint list = 0 ;
39-
40- while (id != 0 ) {
41- _dbGroup* _child = group_tbl_->getPtr (id);
42- uint n = _child->region_next_ ;
43- _child->region_next_ = list;
44- list = id;
45- id = n;
37+ uint curr_id = _parent->groups_ ;
38+ uint last_id;
39+
40+ while (curr_id != 0 ) {
41+ _dbGroup* _child = group_tbl_->getPtr (curr_id);
42+ uint next_id = _child->region_next_ ;
43+ _child->region_next_ = _child->region_prev_ ;
44+ _child->region_prev_ = next_id;
45+
46+ last_id = curr_id;
47+ curr_id = next_id;
4648 }
47- _parent->groups_ = list ;
49+ _parent->groups_ = last_id ;
4850 // User Code End reverse
4951}
5052
You can’t perform that action at this time.
0 commit comments