clang-tidy: Add performance-faster-string-find check

https://clang.llvm.org/extra/clang-tidy/checks/performance/faster-string-find.html
This commit is contained in:
Hennadii Stepanov
2023-03-26 20:17:46 +01:00
parent 483fb8d216
commit 516b75f66e
4 changed files with 5 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ bool ParseHDKeypath(const std::string& keypath_str, std::vector<uint32_t>& keypa
}
// Finds whether it is hardened
uint32_t path = 0;
size_t pos = item.find("'");
size_t pos = item.find('\'');
if (pos != std::string::npos) {
// The hardened tick can only be in the last index of the string
if (pos != item.size() - 1) {