feat: add method to check indices size
This commit is contained in:
@@ -44,6 +44,11 @@ public:
|
||||
if(it2 != project_index.indices.end()) {
|
||||
auto path = project_index.path_pool.path(it2->second);
|
||||
it->second = index::MergedIndex::load(path);
|
||||
} else {
|
||||
std::println(stderr,
|
||||
"failed to load project index for path_id: {} {}",
|
||||
path_id,
|
||||
project_index.indices.size());
|
||||
}
|
||||
|
||||
return it->second;
|
||||
@@ -67,6 +72,14 @@ public:
|
||||
|
||||
/// TODO: Types ...
|
||||
|
||||
bool empty() const {
|
||||
return project_index.indices.empty();
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return project_index.indices.size();
|
||||
}
|
||||
|
||||
private:
|
||||
CompilationDatabase& database;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user