mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00: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…
Add table
Add a link
Reference in a new issue