diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-03-25 22:25:26 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-03-25 22:25:26 +0300 |
commit | b01bf2991955ef267ce2be8e7a18eac984990de8 (patch) | |
tree | f34f5fe0ce9c786ddee196f5082e46090c0ccfcf /include/dbus_utility.hpp | |
parent | 6ea007a2faec52ad62680015d2a3f00371a1e351 (diff) | |
download | bmcweb-b01bf2991955ef267ce2be8e7a18eac984990de8.tar.xz |
Revert "bmcweb: Fix a bunch of warnings"
This reverts commit 6ea007a2faec52ad62680015d2a3f00371a1e351.
Reason for revert: Reports of bmcweb seg faults.
Change-Id: I408f1bb29c2f8e427a6621cdaac8c31b847ebf06
Diffstat (limited to 'include/dbus_utility.hpp')
-rw-r--r-- | include/dbus_utility.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp index 947bc86eaf..e45bb9ac50 100644 --- a/include/dbus_utility.hpp +++ b/include/dbus_utility.hpp @@ -48,8 +48,8 @@ inline bool getNthStringFromPath(const std::string& path, int index, 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 @@ inline bool getNthStringFromPath(const std::string& path, int index, { 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; } |