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; }