Skip to content

Commit

Permalink
some clang-tidy 19 fixes (#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Nov 25, 2024
1 parent 1ac4c12 commit 3ceedde
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Checks: >
-misc-include-cleaner,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
-misc-use-internal-linkage,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
Expand All @@ -29,12 +30,14 @@ Checks: >
-readability-avoid-const-params-in-decls,
-readability-braces-around-statements,
-readability-else-after-return,
-readability-enum-initial-value,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-math-missing-parentheses,
-readability-named-parameter,
-readability-simplify-boolean-expr,
mpi-*,
Expand Down
10 changes: 3 additions & 7 deletions integration/VODE/vode_dvhin.H
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,13 @@ void dvhin (BurnT& state, DvodeT& vstate, amrex::Real& H0, int& NITER, int& IER)

}

// Iteration done. Apply bounds, bias factor, and sign. Then exit.
// Iteration done. Apply bounds and bias factor. Then exit.
H0 = hnew * 0.5_rt;
if (H0 < HLB) {
H0 = HLB;
}
if (H0 > HUB) {
H0 = HUB;
}
H0 = std::clamp(H0, HLB, HUB);

}

// apply sign
H0 = std::copysign(H0, vstate.tout - vstate.t);
NITER = iter;
IER = 0;
Expand Down
2 changes: 1 addition & 1 deletion networks/aprox13/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace NSE_INDEX
#endif

namespace Rates {
enum NetworkRates {
enum NetworkRates: std::uint8_t {
He4_He4_He4_to_C12 = 1,
C12_He4_to_O16,
C12_C12_to_Ne20_He4,
Expand Down
2 changes: 1 addition & 1 deletion networks/aprox21/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace NSE_INDEX
#endif

namespace Rates {
enum NetworkRates {
enum NetworkRates : std::uint8_t {
H1_H1_to_He3 = 1,
H1_H1_H1_to_He3,
P_to_N,
Expand Down
2 changes: 1 addition & 1 deletion networks/iso7/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace NSE_INDEX
#endif

namespace Rates {
enum NetworkRates {
enum NetworkRates : std::uint8_t {
C12_He4_to_O16 = 1,
He4_He4_He4_to_C12,
C12_C12_to_Ne20_He4,
Expand Down
2 changes: 1 addition & 1 deletion networks/rprox/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace network

namespace Rates
{
enum NetworkRates
enum NetworkRates : std::uint8_t
{
He4_He4_He4_to_C12 = 1,
C12_H1_to_N13,
Expand Down

0 comments on commit 3ceedde

Please sign in to comment.