mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
AK: Add nodiscard
attribute to BinarySearch functions
This commit is contained in:
parent
ccbf240962
commit
84d9e537cd
Notes:
sideshowbarker
2024-07-17 09:45:23 +09:00
Author: https://github.com/ldm5180 Commit: https://github.com/SerenityOS/serenity/commit/84d9e537cd Pull-request: https://github.com/SerenityOS/serenity/pull/14395 Reviewed-by: https://github.com/linusg
@ -13,7 +13,7 @@ namespace AK {
|
|||||||
|
|
||||||
struct DefaultComparator {
|
struct DefaultComparator {
|
||||||
template<typename T, typename S>
|
template<typename T, typename S>
|
||||||
constexpr int operator()(T& lhs, S& rhs)
|
[[nodiscard]] constexpr int operator()(T& lhs, S& rhs)
|
||||||
{
|
{
|
||||||
if (lhs > rhs)
|
if (lhs > rhs)
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user