Remove some boost includes
The less we rely on boost, and more on std algorithms, the less people
have to look up, and the more likely that our code will deduplicate.
Replace all uses of boost::algorithms with std alternatives.
Tested: Redfish Service Validator passes.
Change-Id: I8a26f39b5709adc444b4178e92f5f3c7b988b05b
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 38add8b..c61132f 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -743,7 +743,7 @@
std::replace(escaped.begin(), escaped.end(), ' ', '_');
escaped = "/" + escaped;
auto it = std::ranges::find_if(managedObj, [&escaped](const auto& obj) {
- if (boost::algorithm::ends_with(obj.first.str, escaped))
+ if (obj.first.str.ends_with(escaped))
{
BMCWEB_LOG_DEBUG("Matched {}", obj.first.str);
return true;
@@ -1492,8 +1492,7 @@
auto pathItr = std::ranges::find_if(
managedObj, [&dbusObjName](const auto& obj) {
- return boost::algorithm::ends_with(obj.first.str,
- "/" + dbusObjName);
+ return obj.first.parent_path() == dbusObjName;
});
dbus::utility::DBusPropertiesMap output;
@@ -1621,7 +1620,7 @@
bool foundChassis = false;
for (const auto& obj : managedObj)
{
- if (boost::algorithm::ends_with(obj.first.str, chassis))
+ if (obj.first.parent_path() == chassis)
{
chassis = obj.first.str;
foundChassis = true;