From 47c88c433d17948fab1d8e1d76121a72fe5938cb Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 7 Sep 2022 14:49:22 -0400 Subject: add upstream 11.24 --- wx+/graph.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'wx+/graph.cpp') diff --git a/wx+/graph.cpp b/wx+/graph.cpp index eb9256f4..f9094386 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.cpp @@ -232,7 +232,7 @@ void drawCornerText(wxDC& dc, const wxRect& graphArea, const wxString& txt, Grap //calculate intersection of polygon with half-plane template -void cutPoints(std::vector& curvePoints, std::vector& oobMarker, Function isInside, Function2 getIntersection, bool doPolygonCut) +void cutPoints(std::vector& curvePoints, std::vector& oobMarker, Function isInside, Function2 getIntersection, bool doPolygonCut) { assert(curvePoints.size() == oobMarker.size()); @@ -240,8 +240,8 @@ void cutPoints(std::vector& curvePoints, std::vector& oobMarke auto isMarkedOob = [&](size_t index) { return oobMarker[index] != 0; }; //test if point is start of an OOB line - std::vector curvePointsTmp; - std::vector oobMarkerTmp; + std::vector curvePointsTmp; + std::vector oobMarkerTmp; curvePointsTmp.reserve(curvePoints.size()); //allocating memory for these containers is one oobMarkerTmp .reserve(oobMarker .size()); //of the more expensive operations of Graph2D! @@ -308,13 +308,13 @@ private: const double y_; }; -void cutPointsOutsideX(std::vector& curvePoints, std::vector& oobMarker, double minX, double maxX, bool doPolygonCut) +void cutPointsOutsideX(std::vector& curvePoints, std::vector& oobMarker, double minX, double maxX, bool doPolygonCut) { cutPoints(curvePoints, oobMarker, [&](const CurvePoint& pt) { return pt.x >= minX; }, GetIntersectionX(minX), doPolygonCut); cutPoints(curvePoints, oobMarker, [&](const CurvePoint& pt) { return pt.x <= maxX; }, GetIntersectionX(maxX), doPolygonCut); } -void cutPointsOutsideY(std::vector& curvePoints, std::vector& oobMarker, double minY, double maxY, bool doPolygonCut) +void cutPointsOutsideY(std::vector& curvePoints, std::vector& oobMarker, double minY, double maxY, bool doPolygonCut) { cutPoints(curvePoints, oobMarker, [&](const CurvePoint& pt) { return pt.y >= minY; }, GetIntersectionY(minY), doPolygonCut); cutPoints(curvePoints, oobMarker, [&](const CurvePoint& pt) { return pt.y <= maxY; }, GetIntersectionY(maxY), doPolygonCut); @@ -615,8 +615,8 @@ void Graph2D::render(wxDC& dc) const double minY = attr_.minY ? *attr_.minY : std::numeric_limits::infinity(); //automatic: ensure values are initialized by first curve double maxY = attr_.maxY ? *attr_.maxY : -std::numeric_limits::infinity(); // - std::vector> curvePoints(curves_.size()); - std::vector> oobMarker (curves_.size()); //effectively a std::vector marking points that start an out-of-bounds line + std::vector> curvePoints(curves_.size()); + std::vector> oobMarker (curves_.size()); //effectively a std::vector marking points that start an out-of-bounds line for (size_t index = 0; index < curves_.size(); ++index) { -- cgit