diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-08-30 16:27:33 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-08-30 16:27:33 +0200 |
commit | a1c52a0b18660376c3acb4221b7a7c88ace543a3 (patch) | |
tree | 1d852681932cd0f7629438368ebe907a2d0654dd /searchcore | |
parent | 1aaa001b5680225a4f92f3f52804a482b4a69338 (diff) |
Avoid continue statement.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/tests/proton/index/diskindexcleaner_test.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp b/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp index 1be97e3c981..c2ac107ad42 100644 --- a/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp +++ b/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp @@ -65,10 +65,9 @@ vector<string> readIndexes() { vector<string> indexes; std::filesystem::directory_iterator dir_scan(index_dir); for (auto entry : dir_scan) { - if (!entry.is_directory() || entry.path().filename().string().find("index.") != 0) { - continue; + if (entry.is_directory() && entry.path().filename().string().find("index.") == 0) { + indexes.push_back(entry.path().filename().string()); } - indexes.push_back(entry.path().filename().string()); } return indexes; } |