From cd55278e3e14ee42bcb4cf26eba2b9cf6ef7022d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 21 Jun 2020 19:15:41 -0400 Subject: [PATCH] CMayaSpline: Silence unused variable warnings --- src/Core/CMayaSpline.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Core/CMayaSpline.cpp b/src/Core/CMayaSpline.cpp index c0316c4e..34cd58ee 100644 --- a/src/Core/CMayaSpline.cpp +++ b/src/Core/CMayaSpline.cpp @@ -310,13 +310,13 @@ void CMayaSpline::CalculateHermiteCoefficients(const std::vector& kCo const CVector2f& kTangentB = kControlPoints[2]; const CVector2f& kKnotB = kControlPoints[3]; - CVector2f Range = kKnotB - kKnotA; + [[maybe_unused]] const CVector2f Range = kKnotB - kKnotA; - CVector2f KnotAToTangentA = kTangentA - kKnotA; - float MulA = (KnotAToTangentA.X == 0 ? 5729578.f : KnotAToTangentA.Y / KnotAToTangentA.X); + const CVector2f KnotAToTangentA = kTangentA - kKnotA; + const float MulA = (KnotAToTangentA.X == 0 ? 5729578.f : KnotAToTangentA.Y / KnotAToTangentA.X); - CVector2f KnotBToTangentB = kKnotB - kTangentB; - float MulB = (KnotBToTangentB.X == 0 ? 5729578.f : KnotBToTangentB.Y / KnotBToTangentB.X); + const CVector2f KnotBToTangentB = kKnotB - kTangentB; + [[maybe_unused]] const float MulB = (KnotBToTangentB.X == 0 ? 5729578.f : KnotBToTangentB.Y / KnotBToTangentB.X); #if 0 // todo: better organization and better variable names