1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +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:
Muhammad Zahalqa 2020-08-06 10:58:45 +03:00 committed by GitHub
parent 4b6036bc33
commit 9495eeb075
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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>