From d1527301b0e4d2fa4c4095be3aa750d69153ff10 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Wed, 17 Oct 2012 22:13:15 +0200 Subject: [PATCH] Use current type for BT_CLOSED enum doesn't really make a difference code-wise, but removes one compiler warning. --- idlib/geometry/Surface_SweptSpline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idlib/geometry/Surface_SweptSpline.cpp b/idlib/geometry/Surface_SweptSpline.cpp index 1132aa6..96552b8 100644 --- a/idlib/geometry/Surface_SweptSpline.cpp +++ b/idlib/geometry/Surface_SweptSpline.cpp @@ -159,7 +159,7 @@ void idSurface_SweptSpline::Tessellate( const int splineSubdivisions, const int // calculate the points and first derivatives for the swept spline totalTime = sweptSpline->GetTime( sweptSpline->GetNumValues() - 1 ) - sweptSpline->GetTime( 0 ) + sweptSpline->GetCloseTime(); - sweptSplineDiv = sweptSpline->GetBoundaryType() == idCurve_Spline::BT_CLOSED ? sweptSplineSubdivisions : sweptSplineSubdivisions - 1; + sweptSplineDiv = sweptSpline->GetBoundaryType() == idCurve_Spline::BT_CLOSED ? sweptSplineSubdivisions : sweptSplineSubdivisions - 1; baseOffset = (splineSubdivisions-1) * sweptSplineSubdivisions; for ( i = 0; i < sweptSplineSubdivisions; i++ ) { t = totalTime * i / sweptSplineDiv; @@ -172,7 +172,7 @@ void idSurface_SweptSpline::Tessellate( const int splineSubdivisions, const int // sweep the spline totalTime = spline->GetTime( spline->GetNumValues() - 1 ) - spline->GetTime( 0 ) + spline->GetCloseTime(); - splineDiv = spline->GetBoundaryType() == idCurve_Spline::BT_CLOSED ? splineSubdivisions : splineSubdivisions - 1; + splineDiv = spline->GetBoundaryType() == idCurve_Spline::BT_CLOSED ? splineSubdivisions : splineSubdivisions - 1; splineMat.Identity(); for ( i = 0; i < splineSubdivisions; i++ ) { t = totalTime * i / splineDiv;