Replace boost string predicate functions with stdlib ones
Now that we're on C++20 we no longer need boost for starts_with() and
ends_with() tests.
Also remove the predicate.hpp #include from files that weren't actually
using anything from it.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id68a019d5108a4646eb9b5fd18af33d60617e048
diff --git a/src/PSUSensorMain.cpp b/src/PSUSensorMain.cpp
index 26cf7d1..e485598 100644
--- a/src/PSUSensorMain.cpp
+++ b/src/PSUSensorMain.cpp
@@ -17,7 +17,6 @@
#include <PSUEvent.hpp>
#include <PSUSensor.hpp>
#include <Utils.hpp>
-#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/container/flat_set.hpp>
@@ -477,7 +476,7 @@
auto it =
std::find_if(sensorsChanged->begin(), sensorsChanged->end(),
[psuNameStr](std::string& s) {
- return boost::ends_with(s, psuNameStr);
+ return s.ends_with(psuNameStr);
});
if (it == sensorsChanged->end())