From 25f43ea0a1cc3a9304d0676d50149b5103d1688a Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 13 Sep 2021 02:16:10 +0430 Subject: [PATCH] AK: Make Span::operator==() comply with the ISO C++ idea of operator== This should: - Accept const& on both sides - Not involve implicit conversions on either side otherwise the argument order would be deemed significant, and trip this warning. --- AK/Span.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Span.h b/AK/Span.h index a02bfb6f9b4..017f8947bfa 100644 --- a/AK/Span.h +++ b/AK/Span.h @@ -218,7 +218,7 @@ public: return *this; } - constexpr bool operator==(Span other) const + constexpr bool operator==(Span const& other) const { if (size() != other.size()) return false;