mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy modernize-min-max-use-initializer-list findings
This commit is contained in:
parent
2aa2e2c071
commit
46e67a749a
3 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ Checks: [-*,
|
||||||
|
|
||||||
modernize-loop-convert,
|
modernize-loop-convert,
|
||||||
modernize-make-unique,
|
modernize-make-unique,
|
||||||
|
modernize-min-max-use-initializer-list,
|
||||||
|
|
||||||
# Enable a very limited number of the cppcoreguidelines checkers.
|
# Enable a very limited number of the cppcoreguidelines checkers.
|
||||||
# See the notes for some of the rest of them below.
|
# See the notes for some of the rest of them below.
|
||||||
|
|
|
@ -134,7 +134,7 @@ Val* Discarder::BuildData(const u_char* data, int hdrlen, int len, int caplen) {
|
||||||
caplen -= hdrlen;
|
caplen -= hdrlen;
|
||||||
data += 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));
|
return new StringVal(new String(data, len, true));
|
||||||
}
|
}
|
||||||
|
|
|
@ -425,7 +425,7 @@ Substring::Vec* smith_waterman(const String* s1, const String* s2, SWParams& par
|
||||||
if ( current->swn_byte_assigned )
|
if ( current->swn_byte_assigned )
|
||||||
current->swn_score = score_tl;
|
current->swn_score = score_tl;
|
||||||
else
|
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
|
// Establish predecessor chain according to neighbor
|
||||||
// with best score.
|
// with best score.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue