From 759d3a0d08723b8791b125df5da772f95d419fc0 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 29 Dec 2021 11:00:09 -0700 Subject: [PATCH] Reintroduce readability-simplify-boolean-expr check and fix. (#530) --- .clang-tidy | 2 +- amr-wind/utilities/io.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 9140de3e53..185d1f8c35 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -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,-readability-simplify-boolean-expr,-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,-modernize-loop-convert,-clang-analyzer-optin.cplusplus.VirtualCall' WarningsAsErrors: '' HeaderFilterRegex: '^((?!/amrex/Src/|/googletest/).)*$' AnalyzeTemporaryDtors: false diff --git a/amr-wind/utilities/io.cpp b/amr-wind/utilities/io.cpp index 6c8f0006ec..621bb9ee8c 100644 --- a/amr-wind/utilities/io.cpp +++ b/amr-wind/utilities/io.cpp @@ -131,7 +131,7 @@ void incflo::ReadCheckpointFile() } } - bool replicate = (rep == IntVect::TheUnitVector()) ? false : true; + bool replicate = (rep != IntVect::TheUnitVector()); if (replicate) { amrex::Print() << "replicating restart file: " << rep << std::endl;