diff --git a/src/cell.cpp b/src/cell.cpp index 7753e83332..1dff5caf99 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -207,9 +207,9 @@ Universe::to_hdf5(hid_t universes_group) const } BoundingBox Universe::bounding_box() const { - BoundingBox bbox = {INFTY, -INFTY, INFTY, -INFTY, INFTY, -INFTY}; + BoundingBox bbox; if (cells_.size() == 0) { - bbox = {-INFTY, INFTY, -INFTY, -INFTY, INFTY}; + return {}; } else { for (const auto& cell : cells_) { auto& c = model::cells[cell]; diff --git a/src/surface.cpp b/src/surface.cpp index b53590e08c..45cd025bac 100644 --- a/src/surface.cpp +++ b/src/surface.cpp @@ -653,7 +653,7 @@ BoundingBox SurfaceXCylinder::bounding_box(bool pos_side) const { if (!pos_side) { return {-INFTY, INFTY, y0_ - radius_, y0_ + radius_, z0_ - radius_, z0_ + radius_}; } else { - return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY}; + return {}; } } //============================================================================== @@ -693,7 +693,7 @@ BoundingBox SurfaceYCylinder::bounding_box(bool pos_side) const { if (!pos_side) { return {x0_ - radius_, x0_ + radius_, -INFTY, INFTY, z0_ - radius_, z0_ + radius_}; } else { - return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY}; + return {}; } } @@ -734,7 +734,7 @@ BoundingBox SurfaceZCylinder::bounding_box(bool pos_side) const { if (!pos_side) { return {x0_ - radius_, x0_ + radius_, y0_ - radius_, y0_ + radius_, -INFTY, INFTY}; } else { - return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY}; + return {}; } } @@ -813,7 +813,7 @@ BoundingBox SurfaceSphere::bounding_box(bool pos_side) const { y0_ - radius_, y0_ + radius_, z0_ - radius_, z0_ + radius_}; } else { - return {-INFTY, INFTY, -INFTY, INFTY, -INFTY, INFTY}; + return {}; } }