mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 04:25:29 -04:00
Change declaration order of maps used for vectors
If the destructor of an object tries to remove an entry from the map, there's no guarantee it exists if the map has already been destroyed (because it was declared after the vector of objects), resulting in a segfault. By declaring the map first, we avoid this. Currently an issue for Nuclide, but potentially other classes in the future.
This commit is contained in:
parent
7c1371088d
commit
6992e53398
18 changed files with 22 additions and 22 deletions
|
|
@ -80,8 +80,8 @@ void PropertyData::set_overlap(size_t y, size_t x) {
|
|||
|
||||
namespace model {
|
||||
|
||||
std::vector<Plot> plots;
|
||||
std::unordered_map<int, int> plot_map;
|
||||
std::vector<Plot> plots;
|
||||
uint64_t plotter_seed = 1;
|
||||
|
||||
} // namespace model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue