Revert "bmcweb: Fix a bunch of warnings"
This reverts commit 6ea007a2faec52ad62680015d2a3f00371a1e351.
Reason for revert: Reports of bmcweb seg faults.
Change-Id: I408f1bb29c2f8e427a6621cdaac8c31b847ebf06
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index 947bc86..e45bb9a 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -48,8 +48,8 @@
std::string& result)
{
int count = 0;
- std::string::const_iterator first = path.begin();
- std::string::const_iterator last = path.end();
+ auto first = path.begin();
+ auto last = path.end();
for (auto it = path.begin(); it < path.end(); it++)
{
// skip first character as it's either a leading slash or the first
@@ -80,8 +80,7 @@
{
first++;
}
- result = path.substr(static_cast<size_t>(first - path.begin()),
- static_cast<size_t>(last - first));
+ result = path.substr(first - path.begin(), last - first);
return true;
}