mirror of
https://github.com/MaskRay/ccls.git
synced 2025-12-16 12:13:30 +00:00
Format sources
This commit is contained in:
parent
d31cc9f076
commit
80d1964394
@ -111,8 +111,8 @@ int FuzzyMatcher::match(std::string_view text, bool strict) {
|
|||||||
dp[0][j + 1][1] = kMinScore * 2;
|
dp[0][j + 1][1] = kMinScore * 2;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < int(pat.size()); i++) {
|
for (int i = 0; i < int(pat.size()); i++) {
|
||||||
int(*pre)[2] = dp[i & 1];
|
int (*pre)[2] = dp[i & 1];
|
||||||
int(*cur)[2] = dp[(i + 1) & 1];
|
int (*cur)[2] = dp[(i + 1) & 1];
|
||||||
cur[i][0] = cur[i][1] = kMinScore;
|
cur[i][0] = cur[i][1] = kMinScore;
|
||||||
for (int j = i; j < n; j++) {
|
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));
|
cur[j + 1][0] = std::max(cur[j][0] + missScore(j, false), cur[j][1] + missScore(j, true));
|
||||||
|
|||||||
@ -686,9 +686,7 @@ void mainLoop() {
|
|||||||
// If the "exit" notification has been received, clear all index requests
|
// If the "exit" notification has been received, clear all index requests
|
||||||
// to make indexers stop in time.
|
// to make indexers stop in time.
|
||||||
if (g_quit.load(std::memory_order_relaxed)) {
|
if (g_quit.load(std::memory_order_relaxed)) {
|
||||||
index_request->apply([&](std::deque<IndexRequest> &q) {
|
index_request->apply([&](std::deque<IndexRequest> &q) { q.clear(); });
|
||||||
q.clear();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool indexed = false;
|
bool indexed = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user