Skip to content

Commit 7289474

Browse files
authored
some clang-tidy in test_sdc (#1784)
1 parent d16f2b5 commit 7289474

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

unit_test/test_sdc/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ void main_main ()
252252

253253
// print statistics
254254
std::cout << "min number of rhs calls: " << n_rhs_min << std::endl;
255-
std::cout << "avg number of rhs calls: " << n_rhs_sum / (n_cell*n_cell*n_cell) << std::endl;
255+
std::cout << "avg number of rhs calls: "
256+
<< static_cast<Real>(n_rhs_sum) / static_cast<Real>(n_cell*n_cell*n_cell) << std::endl;
256257
std::cout << "max number of rhs calls: " << n_rhs_max << std::endl;
257258

258259
}

unit_test/test_sdc/react_zones.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ bool do_react (const plot_t& p, const int i, const int j, const int k,
7676

7777
// zero out the advective terms
7878

79-
for (int n = 0; n < SVAR; n++) {
80-
burn_state.ydot_a[n] = 0.0;
79+
for (auto& e : burn_state.ydot_a) {
80+
e = 0.0;
8181
}
8282

8383

0 commit comments

Comments
 (0)