From: Mikko Rasa Date: Sun, 26 Jan 2025 10:21:59 +0000 (+0200) Subject: Use vector and deque instead of list X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=8714c7d218d14ca8b4f80bf8e346e93c6dca8aa7;p=libs%2Fmath.git Use vector and deque instead of list --- diff --git a/source/geometry/loader.h b/source/geometry/loader.h index c3774b7..bcb5a90 100644 --- a/source/geometry/loader.h +++ b/source/geometry/loader.h @@ -1,7 +1,7 @@ #ifndef MSP_GEOMETRY_LOADER_H_ #define MSP_GEOMETRY_LOADER_H_ -#include +#include #include #include "extrudedshape.h" #include "halfspace.h" @@ -21,7 +21,7 @@ class DimensionIndependentLoader: public DataFile::Loader { protected: bool single = true; - std::list>> shapes; + std::vector>> shapes; DimensionIndependentLoader(bool = true); diff --git a/source/geometry/shape.h b/source/geometry/shape.h index bd90ba6..91d622b 100644 --- a/source/geometry/shape.h +++ b/source/geometry/shape.h @@ -1,7 +1,7 @@ #ifndef MSP_GEOMETRY_SHAPE_H_ #define MSP_GEOMETRY_SHAPE_H_ -#include +#include #include #include #include @@ -73,7 +73,7 @@ inline BoundingBox Shape::bisect_axis_aligned_bounding_box(unsigned throw std::invalid_argument("Shape::bisect_axis_aligned_bounding_box"); // Form the root cell from the loosest approximation of a bounding box. - std::list queue; + std::deque queue; queue.push_back(CoverageCell()); CoverageCell &root = queue.front(); root.level = 0;