diff --git a/include/openmc/cell.h b/include/openmc/cell.h index 2dfe2d7f34..876ee9e50d 100644 --- a/include/openmc/cell.h +++ b/include/openmc/cell.h @@ -175,8 +175,7 @@ public: protected: //! Determine the path to this cell instance in the geometry hierarchy - vector - find_parent_cells(vector& parent_cells, int32_t instance) const; + vector find_parent_cells(int32_t instance) const; //! Inner function for retrieving contained cells void get_contained_cells_inner( diff --git a/src/cell.cpp b/src/cell.cpp index cfcb206994..6cea7fbdf1 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -1316,8 +1316,7 @@ struct ParentCellStack { visited_cells_; }; -vector -Cell::find_parent_cells(vector& parent_cells, int32_t instance) const +vector Cell::find_parent_cells(int32_t instance) const { ParentCellStack stack; // start with this cell's universe @@ -1399,7 +1398,7 @@ std::unordered_map> Cell::get_contained_cells(int32_t i if (this->type_ == Fill::MATERIAL) return contained_cells; // find the pathway through the geometry to this cell - vector parent_cells = this->find_parent_cells(parent_cells, instance); + vector parent_cells = this->find_parent_cells(instance); // if this cell is filled w/ a material, it contains no other cells if (type_ != Fill::MATERIAL) {