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

@@ -85,7 +85,7 @@ KeyInfo InterpretKey(std::string key)
result.section = key.substr(0, option_index);
key.erase(0, option_index + 1);
}
if (key.substr(0, 2) == "no") {
if (key.starts_with("no")) {
key.erase(0, 2);
result.negated = true;
}
@@ -189,7 +189,7 @@ bool ArgsManager::ParseParameters(int argc, const char* const argv[], std::strin
// internet" warning, and clicks the Open button, macOS passes
// a unique process serial number (PSN) as -psn_... command-line
// argument, which we filter out.
if (key.substr(0, 5) == "-psn_") continue;
if (key.starts_with("-psn_")) continue;
#endif
if (key == "-") break; //bitcoin-tx using stdin