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/include/image_upload.hpp b/include/image_upload.hpp
index 521ff65..2e3e689 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -10,6 +10,7 @@
#include <cstdio>
#include <fstream>
#include <memory>
+#include <ranges>
namespace crow
{
@@ -66,9 +67,8 @@
dbus::utility::DBusInteracesMap interfaces;
m.read(path, interfaces);
- if (std::find_if(interfaces.begin(), interfaces.end(),
- [](const auto& i) {
- return i.first == "xyz.openbmc_project.Software.Version";
+ if (std::ranges::find_if(interfaces, [](const auto& i) {
+ return i.first == "xyz.openbmc_project.Software.Version";
}) != interfaces.end())
{
timeout.cancel();