From 71d5d8dbf54dace8a559e593a2bc6011b7261af5 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 25 Jan 2022 11:04:33 -0800 Subject: readability-static-accessed-through-instance We access std::string::npos through member variables in a couple places. Fix it. Signed-off-by: Ed Tanous Change-Id: I587f89e1580661aa311dfe4e06591ab38806e241 --- include/openbmc_dbus_rest.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/openbmc_dbus_rest.hpp') 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)), -- cgit v1.2.3