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 @@ -35,17 +35,19 @@ void dbRegionGroupItr::reverse(dbObject* parent)
3535{
3636 // User Code Begin reverse
3737 _dbRegion* _parent = (_dbRegion*) parent;
38- uint32_t id = _parent->groups_ ;
39- uint32_t list = 0 ;
40-
41- while (id != 0 ) {
42- _dbGroup* _child = group_tbl_->getPtr (id);
43- uint32_t n = _child->region_next_ ;
44- _child->region_next_ = list;
45- list = id;
46- id = n;
38+ uint32_t curr_id = _parent->groups_ ;
39+ uint32_t last_id = 0 ;
40+
41+ while (curr_id != 0 ) {
42+ _dbGroup* _child = group_tbl_->getPtr (curr_id);
43+ uint32_t next_id = _child->region_next_ ;
44+ _child->region_next_ = _child->region_prev_ ;
45+ _child->region_prev_ = next_id;
46+
47+ last_id = curr_id;
48+ curr_id = next_id;
4749 }
48- _parent->groups_ = list ;
50+ _parent->groups_ = last_id ;
4951 // User Code End reverse
5052}
5153
You can’t perform that action at this time.
0 commit comments