mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
Fix lost index update.
This commit is contained in:
parent
2b493d80c2
commit
4a95eda9d7
@ -548,13 +548,10 @@ bool IndexMergeIndexUpdates() {
|
|||||||
IterationLoop loop;
|
IterationLoop loop;
|
||||||
while (loop.Next()) {
|
while (loop.Next()) {
|
||||||
optional<Index_OnIndexed> to_join = queue->on_indexed.TryPopBack();
|
optional<Index_OnIndexed> to_join = queue->on_indexed.TryPopBack();
|
||||||
if (!to_join) {
|
if (!to_join)
|
||||||
queue->on_indexed.PushFront(std::move(*root));
|
break;
|
||||||
return did_merge;
|
|
||||||
}
|
|
||||||
|
|
||||||
did_merge = true;
|
did_merge = true;
|
||||||
Timer time;
|
// Timer time;
|
||||||
root->update.Merge(std::move(to_join->update));
|
root->update.Merge(std::move(to_join->update));
|
||||||
// time.ResetAndPrint("Joined querydb updates for files: " +
|
// time.ResetAndPrint("Joined querydb updates for files: " +
|
||||||
// StringJoinMap(root->update.files_def_update,
|
// StringJoinMap(root->update.files_def_update,
|
||||||
@ -563,6 +560,7 @@ bool IndexMergeIndexUpdates() {
|
|||||||
//}));
|
//}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queue->on_indexed.PushFront(std::move(*root));
|
||||||
return did_merge;
|
return did_merge;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user