Skip to content

Commit

Permalink
reorder Extract
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearkatie committed Sep 23, 2024
1 parent 56c3194 commit f08d7c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/res_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ void ResTracker::Extract(ResTracker* removed) {
return;
}

if (res_->quantity() > eps_rsrc()) {
parent1_ = res_->state_id();
parent2_ = 0;
}

// removed parent must be set before the resource is recorded, otherwise
// removed ends up with parent1 of the other child (which is this resource
// after being bumped)
removed->parent1_ = res_->state_id();
removed->parent2_ = 0;
removed->tracked_ = tracked_;

if (res_->quantity() > eps_rsrc()) {
parent1_ = res_->state_id();
parent2_ = 0;
}

removed->Record();

if (res_->quantity() > eps_rsrc()) {
Record();
}
Expand Down

0 comments on commit f08d7c8

Please sign in to comment.