2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-26 04:42:22 +00:00

Explicit conversions from floating point type to size_t

This commit is contained in:
Matt Borland
2022-07-03 20:01:24 -07:00
parent 77f7851c12
commit 69557c0d1a

View File

@@ -154,8 +154,8 @@ public:
using std::floor;
using std::ceil;
Real x = (t-m_t0)*m_inv_h;
size_t j_min = ceil(x - Real(1)/Real(2));
size_t j_max = ceil(x + Real(5)/Real(2));
auto j_min = static_cast<size_t>(ceil(x - Real(1)/Real(2)));
auto j_max = static_cast<size_t>(ceil(x + Real(5)/Real(2)));
if (j_max >= m_alpha.size()) {
j_max = m_alpha.size() - 1;
}
@@ -180,8 +180,8 @@ public:
using std::floor;
using std::ceil;
Real x = (t-m_t0)*m_inv_h;
size_t j_min = ceil(x - Real(1)/Real(2));
size_t j_max = ceil(x + Real(5)/Real(2));
auto j_min = static_cast<size_t>(ceil(x - Real(1)/Real(2)));
auto j_max = static_cast<size_t>(ceil(x + Real(5)/Real(2)));
if (j_max >= m_alpha.size()) {
j_max = m_alpha.size() - 1;
}