mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
AK: Make min/max behave like the STL for equivalent inputs (#2976)
min(a, b) now returns a if both are equivalent. max(a, b) now returns a if both are equivalent.
This commit is contained in:
parent
4b6036bc33
commit
9495eeb075
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue