Skip to content

Commit

Permalink
Reintroduce modernize-loop-convert check and fix. (Exawind#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel authored Dec 29, 2021
1 parent 759d3a0 commit 35f2fb4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,corecppguidelines-*,modernize-*,readability-*,-readability-magic-numbers,-readability-identifier-naming,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,-readability-named-parameter,-readability-implicit-bool-conversion,-readability-isolate-declaration,-readability-braces-around-statements,-readability-inconsistent-declaration-parameter-name,-modernize-use-emplace,-readability-qualified-auto,-readability-static-accessed-through-instance,-readability-container-size-empty,-readability-make-member-function-const,-readability-uppercase-literal-suffix,-readability-convert-member-functions-to-static,-readability-redundant-member-init,-modernize-use-bool-literals,-readability-const-return-type,-readability-avoid-const-params-in-decls,-modernize-pass-by-value,-modernize-loop-convert,-clang-analyzer-optin.cplusplus.VirtualCall'
Checks: 'clang-diagnostic-*,clang-analyzer-*,corecppguidelines-*,modernize-*,readability-*,-readability-magic-numbers,-readability-identifier-naming,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,-readability-named-parameter,-readability-implicit-bool-conversion,-readability-isolate-declaration,-readability-braces-around-statements,-readability-inconsistent-declaration-parameter-name,-modernize-use-emplace,-readability-qualified-auto,-readability-static-accessed-through-instance,-readability-container-size-empty,-readability-make-member-function-const,-readability-uppercase-literal-suffix,-readability-convert-member-functions-to-static,-readability-redundant-member-init,-modernize-use-bool-literals,-readability-const-return-type,-readability-avoid-const-params-in-decls,-modernize-pass-by-value,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-core.NonNullParamChecker'
WarningsAsErrors: ''
HeaderFilterRegex: '^((?!/amrex/Src/|/googletest/).)*$'
AnalyzeTemporaryDtors: false
Expand Down
4 changes: 2 additions & 2 deletions amr-wind/core/SimTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace amr_wind {
void SimTime::parse_parameters()
{
// Initialize deltaT to negative values
for (int i = 0; i < max_time_states; ++i) {
m_dt[i] = -1.0;
for (double& i : m_dt) {
i = -1.0;
}

// Parse options in "time" namespace
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/physics/SyntheticTurbulence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void interp_perturb_vel(
wt.yr * wt.zr * t_grid.wvel[qidx[2]] +
wt.yl * wt.zr * t_grid.wvel[qidx[3]];

for (int i = 0; i < 4; ++i) qidx[i] += nynz;
for (int& i : qidx) i += nynz;

// Right quad (t = t+deltaT)
vel_r[0] = wt.yl * wt.zl * t_grid.uvel[qidx[0]] +
Expand Down

0 comments on commit 35f2fb4

Please sign in to comment.