Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some clang-tidy 19 fixes #1663

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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::uinit8_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
Loading