refactor: starts/ends_with changes for clang-tidy 20

This commit is contained in:
fanquake
2025-03-18 08:04:23 +08:00
parent 96a5cd8000
commit 2b85d31bcc
11 changed files with 16 additions and 16 deletions

View File

@@ -83,7 +83,7 @@ CScript ParseScript(const std::string& s)
}
result << num.value();
} else if (w.substr(0, 2) == "0x" && w.size() > 2 && IsHex(std::string(w.begin() + 2, w.end()))) {
} else if (w.starts_with("0x") && w.size() > 2 && IsHex(std::string(w.begin() + 2, w.end()))) {
// Raw hex data, inserted NOT pushed onto stack:
std::vector<unsigned char> raw = ParseHex(std::string(w.begin() + 2, w.end()));
result.insert(result.end(), raw.begin(), raw.end());