From 1722ef9261b51c414b976a156baaf1e4d3ceea66 Mon Sep 17 00:00:00 2001 From: AtariDreams <83477269+AtariDreams@users.noreply.github.com> Date: Sat, 30 Sep 2023 21:51:27 -0400 Subject: [PATCH] k should be size_t (#1031) --- .../boost/math/special_functions/legendre_stieltjes.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/math/special_functions/legendre_stieltjes.hpp b/include/boost/math/special_functions/legendre_stieltjes.hpp index 2e9e559db7..44eafea2d5 100644 --- a/include/boost/math/special_functions/legendre_stieltjes.hpp +++ b/include/boost/math/special_functions/legendre_stieltjes.hpp @@ -156,7 +156,7 @@ class legendre_stieltjes std::vector stieltjes_zeros; std::vector legendre_zeros = legendre_p_zeros(m_m - 1); - int k; + size_t k; if (m_m & 1) { stieltjes_zeros.resize(legendre_zeros.size() + 1, std::numeric_limits::quiet_NaN()); @@ -169,14 +169,14 @@ class legendre_stieltjes k = 0; } - while (k < (int)stieltjes_zeros.size()) + while (k < stieltjes_zeros.size()) { Real lower_bound; Real upper_bound; if (m_m & 1) { lower_bound = legendre_zeros[k - 1]; - if (k == (int)legendre_zeros.size()) + if (k == legendre_zeros.size()) { upper_bound = 1; } @@ -188,7 +188,7 @@ class legendre_stieltjes else { lower_bound = legendre_zeros[k]; - if (k == (int)legendre_zeros.size() - 1) + if (k == legendre_zeros.size() - 1) { upper_bound = 1; }