mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
refactor: starts/ends_with changes for clang-tidy 20
This commit is contained in:
@@ -624,11 +624,11 @@ void BlockManager::CleanupBlockRevFiles() const
|
||||
const std::string path = fs::PathToString(it->path().filename());
|
||||
if (fs::is_regular_file(*it) &&
|
||||
path.length() == 12 &&
|
||||
path.substr(8,4) == ".dat")
|
||||
path.ends_with(".dat"))
|
||||
{
|
||||
if (path.substr(0, 3) == "blk") {
|
||||
if (path.starts_with("blk")) {
|
||||
mapBlockFiles[path.substr(3, 5)] = it->path();
|
||||
} else if (path.substr(0, 3) == "rev") {
|
||||
} else if (path.starts_with("rev")) {
|
||||
remove(it->path());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user