From f2d684fc24cd1dbc14138b4f41dc84a8c4d1968a Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Thu, 12 Aug 2021 21:18:10 -0700 Subject: [PATCH] AK: Annotate String.count as [[nodiscard]] --- AK/String.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/String.h b/AK/String.h index b7d1da910f..e213ec3ebb 100644 --- a/AK/String.h +++ b/AK/String.h @@ -284,7 +284,7 @@ public: } int replace(const String& needle, const String& replacement, bool all_occurrences = false); - size_t count(const String& needle) const; + [[nodiscard]] size_t count(const String& needle) const; [[nodiscard]] String reverse() const; template