From 84d9e537cdb7f00361071c36e4203ea5f0164f7a Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sun, 26 Jun 2022 10:20:38 -0600 Subject: [PATCH] AK: Add `nodiscard` attribute to BinarySearch functions --- AK/BinarySearch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/BinarySearch.h b/AK/BinarySearch.h index b8defdacb4..f5e8f666cf 100644 --- a/AK/BinarySearch.h +++ b/AK/BinarySearch.h @@ -13,7 +13,7 @@ namespace AK { struct DefaultComparator { template - constexpr int operator()(T& lhs, S& rhs) + [[nodiscard]] constexpr int operator()(T& lhs, S& rhs) { if (lhs > rhs) return 1;