Skip to content

Commit

Permalink
Fix clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 4, 2024
1 parent 0185024 commit a434b42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ratecoeff.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ constexpr auto simpson_integrator(auto &params, double a, double b, int sampleco
weight = 4.;
}

const double x = a + deltax * i;
const double x = a + (deltax * i);

integral += weight * func_integrand(x, &params) * deltax;
}
Expand All @@ -79,7 +79,7 @@ auto integrator(auto params, double a, double b, double epsabs, double epsrel, i
double *abserr) {
if constexpr (USE_SIMPSON_INTEGRATOR) {
// need an odd number for Simpson rule
const int samplecount = std::max(1, static_cast<int>((b / a) / globals::NPHIXSNUINCREMENT)) * 4 + 1;
const int samplecount = (std::max(1, static_cast<int>((b / a) / globals::NPHIXSNUINCREMENT)) * 4) + 1;

*result = simpson_integrator<func_integrand>(params, a, b, samplecount);
*abserr = 0.;
Expand Down
2 changes: 1 addition & 1 deletion rpkt.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void MPI_Bcast_binned_opacities(int modelgridindex, int root_node_id);
assert_testmodeonly(ion < get_nions(element) - 1);
const int groundcontindex = globals::elements[element].ions[ion].groundcontindex;
assert_always(groundcontindex >= 0);
return nonemptymgi * globals::nbfcontinua_ground + groundcontindex;
return (nonemptymgi * globals::nbfcontinua_ground) + groundcontindex;
}

inline auto keep_this_cont(int element, const int ion, const int level, const int modelgridindex,
Expand Down

0 comments on commit a434b42

Please sign in to comment.