diff options
author | Ed Tanous <edtanous@google.com> | 2022-01-25 22:04:33 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-02-15 04:13:25 +0300 |
commit | 71d5d8dbf54dace8a559e593a2bc6011b7261af5 (patch) | |
tree | 2aac5ddb2a5761c62df9e01d1fe92db929a556f8 /include/openbmc_dbus_rest.hpp | |
parent | e662eae819f545ef07193f216b42e161b7ff7a46 (diff) | |
download | bmcweb-71d5d8dbf54dace8a559e593a2bc6011b7261af5.tar.xz |
readability-static-accessed-through-instance
We access std::string::npos through member variables in a couple places.
Fix it.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I587f89e1580661aa311dfe4e06591ab38806e241
Diffstat (limited to 'include/openbmc_dbus_rest.hpp')
-rw-r--r-- | include/openbmc_dbus_rest.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp index b457935e84..cb5d727a25 100644 --- a/include/openbmc_dbus_rest.hpp +++ b/include/openbmc_dbus_rest.hpp @@ -2049,7 +2049,7 @@ inline void handleDBusUrl(const crow::Request& req, std::string destProperty; const char* attrSeperator = "/attr/"; size_t attrPosition = objectPath.find(attrSeperator); - if (attrPosition != objectPath.npos) + if (attrPosition != std::string::npos) { destProperty = objectPath.substr(attrPosition + strlen(attrSeperator), objectPath.length()); @@ -2060,7 +2060,7 @@ inline void handleDBusUrl(const crow::Request& req, { constexpr const char* actionSeperator = "/action/"; size_t actionPosition = objectPath.find(actionSeperator); - if (actionPosition != objectPath.npos) + if (actionPosition != std::string::npos) { std::string postProperty = objectPath.substr((actionPosition + strlen(actionSeperator)), |