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_util.hpp b/redfish-core/lib/redfish_util.hpp
index fad410d..4806cb4 100644
--- a/redfish-core/lib/redfish_util.hpp
+++ b/redfish-core/lib/redfish_util.hpp
@@ -25,6 +25,7 @@
#include <array>
#include <charconv>
+#include <ranges>
#include <string_view>
namespace redfish
@@ -166,8 +167,8 @@
// Some protocols may have multiple services associated with
// them (for example IPMI). Look to see if we've already added
// an entry for the current protocol.
- auto find = std::find_if(
- socketData.begin(), socketData.end(),
+ auto find = std::ranges::find_if(
+ socketData,
[&kv](const std::tuple<std::string, std::string, bool>& i) {
return std::get<1>(i) == kv.first;
});