mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +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
Notes:
sideshowbarker
2024-07-19 04:14:57 +09:00
Author: https://github.com/tryfinally Commit: https://github.com/SerenityOS/serenity/commit/9495eeb0759 Pull-request: https://github.com/SerenityOS/serenity/pull/2976 Reviewed-by: https://github.com/awesomekling
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