From ca150c49ee6743a366bae322624a955c0caf0558 Mon Sep 17 00:00:00 2001 From: Vissarion Fisikopoulos Date: Wed, 2 Nov 2022 08:40:58 +0200 Subject: [PATCH] Make some variables in math utilities const. --- include/boost/geometry/util/math.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/geometry/util/math.hpp b/include/boost/geometry/util/math.hpp index 5d87ebb9b..c88572ed5 100644 --- a/include/boost/geometry/util/math.hpp +++ b/include/boost/geometry/util/math.hpp @@ -861,14 +861,14 @@ inline void sin_cos_degrees(T const& x, // the argument to the range [-45, 45] before converting it to radians. T remainder = math::mod(x, T(360)); - T quotient = std::floor(remainder / T(90) + T(0.5)); + T const quotient = std::floor(remainder / T(90) + T(0.5)); remainder -= T(90) * quotient; // Convert to radians. remainder *= d2r(); - T s = sin(remainder); - T c = cos(remainder); + T const s = sin(remainder); + T const c = cos(remainder); switch (unsigned(quotient) & 3U) {