mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
erase needs an iterator, so feed it model::tallies.begin()+index
This commit is contained in:
parent
8887023b22
commit
99027fdd15
1 changed files with 3 additions and 3 deletions
|
|
@ -1277,9 +1277,9 @@ extern "C" size_t tallies_size()
|
|||
extern "C" void openmc_remove_tally_from_tallies(int32_t id)
|
||||
{
|
||||
// query map for index corersponding to the given id
|
||||
int index = model::tally_map[id];
|
||||
// delete the tally
|
||||
model::tallies.erase(index);
|
||||
int32_t index = model::tally_map[id];
|
||||
// delete the tally via iterator pointing to correct position
|
||||
model::tallies.erase(model::tallies.begin() + index);
|
||||
}
|
||||
|
||||
} // namespace openmc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue