From bd364504cc2b874b84e822bcb663b1c54847db05 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 10 Nov 2017 17:16:14 +0300 Subject: [PATCH] patch for incorrect compilation --- src/CurveCreator/CurveCreator_Section.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/CurveCreator/CurveCreator_Section.cxx b/src/CurveCreator/CurveCreator_Section.cxx index 0052bcbec..51f83fab6 100644 --- a/src/CurveCreator/CurveCreator_Section.cxx +++ b/src/CurveCreator/CurveCreator_Section.cxx @@ -36,13 +36,16 @@ Handle(TColgp_HArray1OfPnt) CurveCreator_Section::GetDifferentPoints( int theDim std::vector aTmpPoints; + CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin(); + CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end(); + + gp_Pnt aFirstPoint; + gp_Pnt aPoint; + if( myPoints.size() > 0 ) { - CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin(); - CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end(); - const gp_Pnt aFirstPoint( - *aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2)); - gp_Pnt aPoint = aFirstPoint; + aFirstPoint = gp_Pnt(*aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2)); + aPoint = aFirstPoint; aTmpPoints.push_back(aPoint); } -- 2.30.2