@@ -1321,7 +1321,6 @@ vector<ParentCell> Cell::find_parent_cells(
13211321
13221322 // create a temporary particle
13231323 Particle dummy_particle {};
1324- dummy_particle.clear ();
13251324 dummy_particle.r () = r;
13261325 dummy_particle.u () = {0 ., 0 ., 1 .};
13271326
@@ -1331,15 +1330,15 @@ vector<ParentCell> Cell::find_parent_cells(
13311330vector<ParentCell> Cell::find_parent_cells (
13321331 int32_t instance, Particle& p) const {
13331332 // look up the particle's location
1334- openmc:: exhaustive_find_cell (p);
1333+ exhaustive_find_cell (p);
13351334 const auto & coords = p.coord ();
13361335
13371336 // build a parent cell stack from the particle coordinates
13381337 ParentCellStack stack;
13391338 bool cell_found = false ;
13401339 for (auto it = coords.begin (); it != coords.end (); it++) {
13411340 const auto & coord = *it;
1342- auto & cell = model::cells[coord.cell ];
1341+ const auto & cell = model::cells[coord.cell ];
13431342 // if the cell at this level matches the current cell, stop adding to the stack
13441343 if (coord.cell == model::cell_map[this ->id_ ]) {
13451344 cell_found = true ;
@@ -1469,10 +1468,8 @@ std::unordered_map<int32_t, vector<int32_t>> Cell::get_contained_cells(
14691468
14701469 // if a positional hint is provided, attempt to do a fast lookup
14711470 // of the parent cells
1472- if (hint)
1473- parent_cells = find_parent_cells (instance, *hint);
1474- else
1475- parent_cells = exhaustive_find_parent_cells (instance);
1471+ parent_cells = hint ? find_parent_cells (instance, *hint)
1472+ : exhaustive_find_parent_cells (instance);
14761473
14771474 // if this cell is filled w/ a material, it contains no other cells
14781475 if (type_ != Fill::MATERIAL) {
0 commit comments