From df254f2c0b2ca4a5ceeb040849c51030b8438ead Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Mon, 1 Apr 2024 13:25:46 -0700 Subject: Remove redundant static modifier "inline static void func()" Doesn't make sense when put in a header file. Find all instances, and make them inline like we do everywhere else. Tested: Code compiles. Change-Id: I7da5821b1e372941680f82939627af39fdc2a4eb Signed-off-by: Ed Tanous --- redfish-core/lib/log_services.hpp | 25 +++++++++++-------------- redfish-core/lib/update_service.hpp | 7 ++++--- 2 files changed, 15 insertions(+), 17 deletions(-) (limited to 'redfish-core') diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp index 609ff2c11c..6ea165d799 100644 --- a/redfish-core/lib/log_services.hpp +++ b/redfish-core/lib/log_services.hpp @@ -123,9 +123,8 @@ inline std::string getDumpPath(std::string_view dumpType) return dbusDumpPath; } -inline static int getJournalMetadata(sd_journal* journal, - std::string_view field, - std::string_view& contents) +inline int getJournalMetadata(sd_journal* journal, std::string_view field, + std::string_view& contents) { const char* data = nullptr; size_t length = 0; @@ -145,9 +144,8 @@ inline static int getJournalMetadata(sd_journal* journal, return ret; } -inline static int getJournalMetadata(sd_journal* journal, - std::string_view field, const int& base, - long int& contents) +inline int getJournalMetadata(sd_journal* journal, std::string_view field, + const int& base, long int& contents) { int ret = 0; std::string_view metadata; @@ -161,8 +159,7 @@ inline static int getJournalMetadata(sd_journal* journal, return ret; } -inline static bool getEntryTimestamp(sd_journal* journal, - std::string& entryTimestamp) +inline bool getEntryTimestamp(sd_journal* journal, std::string& entryTimestamp) { int ret = 0; uint64_t timestamp = 0; @@ -176,8 +173,8 @@ inline static bool getEntryTimestamp(sd_journal* journal, return true; } -inline static bool getUniqueEntryID(sd_journal* journal, std::string& entryID, - const bool firstEntry = true) +inline bool getUniqueEntryID(sd_journal* journal, std::string& entryID, + const bool firstEntry = true) { int ret = 0; static sd_id128_t prevBootID{}; @@ -269,7 +266,7 @@ static bool getUniqueEntryID(const std::string& logEntry, std::string& entryID, } // Entry is formed like "BootID_timestamp" or "BootID_timestamp_index" -inline static bool +inline bool getTimestampFromID(const std::shared_ptr& asyncResp, std::string_view entryIDStrView, sd_id128_t& bootID, uint64_t& timestamp, uint64_t& index) @@ -1228,7 +1225,7 @@ inline void clearDump(const std::shared_ptr& asyncResp, "xyz.openbmc_project.Collection.DeleteAll", "DeleteAll"); } -inline static void +inline void parseCrashdumpParameters(const dbus::utility::DBusPropertiesMap& params, std::string& filename, std::string& timestamp, std::string& logfile) @@ -3923,8 +3920,8 @@ inline void requestRoutesPostCodesClear(App& app) * * @return bool true if the parsing is successful, false the parsing fails */ -inline static bool parsePostCode(const std::string& postCodeID, - uint64_t& currentValue, uint16_t& index) +inline bool parsePostCode(const std::string& postCodeID, uint64_t& currentValue, + uint16_t& index) { std::vector split; bmcweb::split(split, postCodeID, '-'); diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp index fa2dc9e101..9ef8311984 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp @@ -55,14 +55,15 @@ static bool fwUpdateInProgress = false; // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) static std::unique_ptr fwAvailableTimer; -inline static void cleanUp() +inline void cleanUp() { fwUpdateInProgress = false; fwUpdateMatcher = nullptr; fwUpdateErrorMatcher = nullptr; } -inline static void activateImage(const std::string& objPath, - const std::string& service) + +inline void activateImage(const std::string& objPath, + const std::string& service) { BMCWEB_LOG_DEBUG("Activate image for {} {}", objPath, service); sdbusplus::asio::setProperty( -- cgit v1.2.3