diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-01 10:14:34 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-07 13:37:39 +0200 |
commit | a324e341ef8097d6d93731b592701d43bb5fb5d0 (patch) | |
tree | 97f68c73f22788cc7d3d6e5ae6411f073e647308 /src/buildtool/storage/garbage_collector.cpp | |
parent | 5eb83b81a26e9a321ff8d68506905eaa4f15acd7 (diff) | |
download | justbuild-a324e341ef8097d6d93731b592701d43bb5fb5d0.tar.gz |
Enable modernize-* checks.
Diffstat (limited to 'src/buildtool/storage/garbage_collector.cpp')
-rw-r--r-- | src/buildtool/storage/garbage_collector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/storage/garbage_collector.cpp b/src/buildtool/storage/garbage_collector.cpp index 817e5240..6f41dcd8 100644 --- a/src/buildtool/storage/garbage_collector.cpp +++ b/src/buildtool/storage/garbage_collector.cpp @@ -89,7 +89,8 @@ auto GarbageCollector::TriggerGarbageCollection( for (auto const& entry : std::filesystem::directory_iterator(storage_config.CacheRoot())) { - if (entry.path().filename().string().find(remove_me_prefix) == 0) { + if (entry.path().filename().string().starts_with( + remove_me_prefix)) { to_remove.emplace_back(entry.path()); } } @@ -120,7 +121,7 @@ auto GarbageCollector::TriggerGarbageCollection( std::vector<std::filesystem::path> left_over{}; for (auto const& entry : std::filesystem::directory_iterator(storage_config.CacheRoot())) { - if (entry.path().filename().string().find(kRemoveMe) == 0) { + if (entry.path().filename().string().starts_with(kRemoveMe)) { left_over.emplace_back(entry.path()); } } |