feat: add method to check indices size

This commit is contained in:
Myriad-Dreamin
2026-01-26 17:34:57 +08:00
parent 6640c05d66
commit 39d3648fdd

View File

@@ -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;