diff --git a/nonthermal.cc b/nonthermal.cc index ed3d690dc..4b9d4115b 100644 --- a/nonthermal.cc +++ b/nonthermal.cc @@ -912,8 +912,8 @@ auto calculate_frac_heating(const int modelgridindex, const std::array(std::ceil(SF_EMIN / DELTA_E) * 10); - assert_always(nsteps > 0); + constexpr int nsteps = (static_cast(SF_EMIN / DELTA_E) + 1) * 10; + static_assert(nsteps > 0); const double delta_endash = SF_EMIN / nsteps; for (int j = 0; j < nsteps; j++) { const double endash = SF_EMIN * j / nsteps;