Skip to content

Commit

Permalink
AK: Make min/max behave like the STL for equivalent inputs (SerenityO…
Browse files Browse the repository at this point in the history
…S#2976)

min(a, b) now returns a if both are equivalent.
max(a, b) now returns a if both are equivalent.
  • Loading branch information
tryfinally authored Aug 6, 2020
1 parent 4b6036b commit 9495eeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AK/StdLibExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace AK {
template<typename T>
inline constexpr T min(const T& a, const T& b)
{
return a < b ? a : b;
return b < a ? b : a;
}

template<typename T>
Expand Down

0 comments on commit 9495eeb

Please sign in to comment.