MCPcopy Create free account
hub / github.com/KDAB/codebrowser / projectForFile

Method projectForFile

generator/projectmanager.cpp:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42ProjectInfo* ProjectManager::projectForFile(llvm::StringRef filename)
43{
44 unsigned int match_length = 0;
45 ProjectInfo *result = nullptr;
46
47 for (auto &it : projects) {
48 const std::string &source_path = it.source_path;
49 if (source_path.size() < match_length)
50 continue;
51 if (filename.startswith(source_path)) {
52 result = &it;
53 match_length = source_path.size();
54 }
55 }
56 return result;
57}
58
59bool ProjectManager::shouldProcess(llvm::StringRef filename, ProjectInfo* project)
60{

Callers 3

htmlNameForFileMethod · 0.80
pathToMethod · 0.80
mainFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected