Skip to content

Commit

Permalink
Merge branch 'main' into compiler-warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Nibbelink <[email protected]>
  • Loading branch information
bennibbelink authored Sep 24, 2024
2 parents b08d6f3 + bde9307 commit 7b9bf6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Since last release
* Updated action versions to avoid node.js deprecation (#1802)
* Removed the module imports in `cyclus/__init__.py` and removed the need for multi-phase initialization of Cython modules (#1809)
* No longer use deprecated Numpy Cython api when Cython>=3 (#1811)
* ResTracker Extract gave the wrong parent_id to one of the child resources (#1806)


v1.6.0
====================
Expand Down
10 changes: 7 additions & 3 deletions src/res_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,19 @@ void ResTracker::Extract(ResTracker* removed) {
if (res_->quantity() > eps_rsrc()) {
parent1_ = res_->state_id();
parent2_ = 0;

Record();
}

// 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_;

removed->Record();

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

void ResTracker::Absorb(ResTracker* absorbed) {
Expand Down

0 comments on commit 7b9bf6f

Please sign in to comment.