clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made
static because the functions don’t use this.
This check also triggers readability-static-accessed-through
-instance check as we are trying to access a static member
function through an instance.
Change-Id: Ia0867db019db8e40e710bdd4025e030061f7a992
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/image_verify.hpp b/image_verify.hpp
index 0675eaa..14ff93a 100644
--- a/image_verify.hpp
+++ b/image_verify.hpp
@@ -182,15 +182,16 @@
* @param[in] - Hash function name
* @return true if signature verification was successful, false if not
*/
- bool verifyFile(const fs::path& file, const fs::path& signature,
- const fs::path& publicKey, const std::string& hashFunc);
+ static bool verifyFile(const fs::path& file, const fs::path& signature,
+ const fs::path& publicKey,
+ const std::string& hashFunc);
/**
* @brief Create RSA object from the public key
* @param[in] - publickey
* @param[out] - RSA Object.
*/
- inline EVP_PKEY_Ptr createPublicRSA(const fs::path& publicKey);
+ static inline EVP_PKEY_Ptr createPublicRSA(const fs::path& publicKey);
/**
* @brief Memory map the file
@@ -198,7 +199,7 @@
* @param[in] - file size
* @param[out] - Custom Mmap address
*/
- CustomMap mapFile(const fs::path& path, size_t size);
+ static CustomMap mapFile(const fs::path& path, size_t size);
/**
* @brief Verify the full file signature using public key and hash function