mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 09:31:59 +00:00
Use std::vector<std::string> files_removed;
It turns out this field is not used.
This commit is contained in:
parent
50c6ed1dd3
commit
1aec53621f
10
src/query.cc
10
src/query.cc
@ -749,12 +749,6 @@ void QueryDatabase::RemoveUsrs(SymbolKind usr_kind,
|
||||
// and fully reloads from cache. This will address the memory leak above.
|
||||
|
||||
switch (usr_kind) {
|
||||
case SymbolKind::File: {
|
||||
// FIXME
|
||||
// for (const Usr& usr : to_remove)
|
||||
// files[usr_to_file[usr].id].def = nullopt;
|
||||
break;
|
||||
}
|
||||
case SymbolKind::Type: {
|
||||
for (const Usr& usr : to_remove)
|
||||
types[usr_to_type[usr].id].def = nullopt;
|
||||
@ -770,6 +764,7 @@ void QueryDatabase::RemoveUsrs(SymbolKind usr_kind,
|
||||
vars[usr_to_var[usr].id].def = nullopt;
|
||||
break;
|
||||
}
|
||||
case SymbolKind::File:
|
||||
case SymbolKind::Invalid:
|
||||
break;
|
||||
}
|
||||
@ -791,7 +786,8 @@ void QueryDatabase::ApplyIndexUpdate(IndexUpdate* update) {
|
||||
VerifyUnique(def.def_var_name); \
|
||||
}
|
||||
|
||||
RemoveUsrs(SymbolKind::File, update->files_removed);
|
||||
for (const std::string& filename : update->files_removed)
|
||||
files[usr_to_file[filename].id].def = nullopt;
|
||||
ImportOrUpdate(update->files_def_update);
|
||||
|
||||
RemoveUsrs(SymbolKind::Type, update->types_removed);
|
||||
|
@ -282,7 +282,7 @@ struct IndexUpdate {
|
||||
std::string ToString();
|
||||
|
||||
// File updates.
|
||||
std::vector<Usr> files_removed;
|
||||
std::vector<std::string> files_removed;
|
||||
std::vector<QueryFile::DefUpdate> files_def_update;
|
||||
|
||||
// Type updates.
|
||||
|
Loading…
Reference in New Issue
Block a user