mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
[skip ci] erasing the tally from the tallies vector calls the destructor, which already handles removing this tally from the map
This commit is contained in:
parent
d1775181e9
commit
d69a6ec647
1 changed files with 1 additions and 1 deletions
|
|
@ -1281,8 +1281,8 @@ extern "C" int openmc_remove_tally(int32_t index)
|
|||
}
|
||||
// grab tally so it's ID can be obtained to remove the (ID,index) pair from tally_map
|
||||
auto& tally = model::tallies[index];
|
||||
model::tally_map.erase(tally->id_);
|
||||
// delete the tally via iterator pointing to correct position
|
||||
// this calls the Tally destructor, removing the tally from the map as well
|
||||
model::tallies.erase(model::tallies.begin() + index);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue