mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Use resize() operator in fission bank sorting function.
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
1c497e1759
commit
38dacc97e4
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ void sort_fission_bank()
|
|||
|
||||
// If there is not enough space, allocate a temporary vector and point to it
|
||||
if (simulation::fission_bank_length > simulation::fission_bank_max / 2) {
|
||||
sorted_bank_holder = std::vector<Particle::Bank>(simulation::fission_bank_length);
|
||||
sorted_bank_holder.resize(simulation::fission_bank_length);
|
||||
sorted_bank = sorted_bank_holder.data();
|
||||
} else { // otherwise, point sorted_bank to unused portion of the fission bank
|
||||
sorted_bank = &simulation::fission_bank[simulation::fission_bank_length];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue