Skip to content

Commit

Permalink
AK: Add nodiscard attribute to BinarySearch functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm5180 authored and bgianfo committed Jul 4, 2022
1 parent ccbf240 commit 84d9e53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AK/BinarySearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace AK {

struct DefaultComparator {
template<typename T, typename S>
constexpr int operator()(T& lhs, S& rhs)
[[nodiscard]] constexpr int operator()(T& lhs, S& rhs)
{
if (lhs > rhs)
return 1;
Expand Down

0 comments on commit 84d9e53

Please sign in to comment.