Format sources

This commit is contained in:
zs 2025-11-30 18:44:21 +08:00
parent d31cc9f076
commit 80d1964394
2 changed files with 3 additions and 5 deletions

View File

@ -111,8 +111,8 @@ int FuzzyMatcher::match(std::string_view text, bool strict) {
dp[0][j + 1][1] = kMinScore * 2;
}
for (int i = 0; i < int(pat.size()); i++) {
int(*pre)[2] = dp[i & 1];
int(*cur)[2] = dp[(i + 1) & 1];
int (*pre)[2] = dp[i & 1];
int (*cur)[2] = dp[(i + 1) & 1];
cur[i][0] = cur[i][1] = kMinScore;
for (int j = i; j < n; j++) {
cur[j + 1][0] = std::max(cur[j][0] + missScore(j, false), cur[j][1] + missScore(j, true));

View File

@ -686,9 +686,7 @@ void mainLoop() {
// If the "exit" notification has been received, clear all index requests
// to make indexers stop in time.
if (g_quit.load(std::memory_order_relaxed)) {
index_request->apply([&](std::deque<IndexRequest> &q) {
q.clear();
});
index_request->apply([&](std::deque<IndexRequest> &q) { q.clear(); });
}
bool indexed = false;