Use ranges
C++20 brought us std::ranges for a lot of algorithms. Most of these
conversions were done using comby, similar to:
```
comby -verbose 'std::lower_bound(:[a].begin(),:[b].end(),:[c])' 'std::ranges::lower_bound(:[a], :[c])' $(git ls-files | grep "\.[hc]\(pp\)\?$") -in-place
```
Change-Id: I0c99c04e9368312555c08147d474ca93a5959e8d
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/redfish-core/lib/redfish_v1.hpp b/redfish-core/lib/redfish_v1.hpp
index a591763..bbda45b 100644
--- a/redfish-core/lib/redfish_v1.hpp
+++ b/redfish-core/lib/redfish_v1.hpp
@@ -11,6 +11,7 @@
#include <boost/url/format.hpp>
+#include <ranges>
#include <string>
namespace redfish
@@ -105,7 +106,7 @@
return;
}
- if (std::find(schemas.begin(), schemas.end(), schema) == schemas.end())
+ if (std::ranges::find(schemas, schema) == schemas.end())
{
messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema);
return;