MCPcopy Create free account
hub / github.com/MaskRay/ccls / getFileId

Method getFileId

src/query.cc:385–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385int DB::getFileId(const std::string &path) {
386 auto it = name2file_id.try_emplace(lowerPathIfInsensitive(path));
387 if (it.second) {
388 int id = files.size();
389 it.first->second = files.emplace_back().id = id;
390 }
391 return it.first->second;
392}
393
394int DB::update(QueryFile::DefUpdate &&u) {
395 int file_id = getFileId(u.first.path);

Callers

nothing calls this directly

Calls 2

lowerPathIfInsensitiveFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected