From: Mikko Rasa Date: Fri, 6 Sep 2024 11:44:07 +0000 (+0300) Subject: Make any_equals take a const reference to the container X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=28174e0b081adc5f1524d9e2c6fa51cde1389cd2;p=libs%2Fcore.git Make any_equals take a const reference to the container --- diff --git a/source/core/algorithm.h b/source/core/algorithm.h index 43bbaee..e2a30bf 100644 --- a/source/core/algorithm.h +++ b/source/core/algorithm.h @@ -39,7 +39,7 @@ struct ValueMatch }; template -inline bool any_equals(Container &cont, const T &value) +inline bool any_equals(const Container &cont, const T &value) { return std::any_of(cont.begin(), cont.end(), ValueMatch{value}); }