Fix clang-tidy modernize-min-max-use-initializer-list findings

This commit is contained in:
Tim Wojtulewicz 2025-05-14 18:02:11 -07:00
parent 2aa2e2c071
commit 46e67a749a
3 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@ Checks: [-*,
modernize-loop-convert,
modernize-make-unique,
modernize-min-max-use-initializer-list,
# Enable a very limited number of the cppcoreguidelines checkers.
# See the notes for some of the rest of them below.

View file

@ -134,7 +134,7 @@ Val* Discarder::BuildData(const u_char* data, int hdrlen, int len, int caplen) {
caplen -= hdrlen;
data += hdrlen;
len = std::max(std::min(std::min(len, caplen), discarder_maxlen), 0);
len = std::max(std::min({len, caplen, discarder_maxlen}), 0);
return new StringVal(new String(data, len, true));
}

View file

@ -425,7 +425,7 @@ Substring::Vec* smith_waterman(const String* s1, const String* s2, SWParams& par
if ( current->swn_byte_assigned )
current->swn_score = score_tl;
else
current->swn_score = std::max(std::max(score_t, score_l), score_tl);
current->swn_score = std::max({score_t, score_l, score_tl});
// Establish predecessor chain according to neighbor
// with best score.