MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / fileIndex

Method fileIndex

externals/simplecpp/simplecpp.cpp:1493–1501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1491}
1492
1493unsigned int simplecpp::TokenList::fileIndex(const std::string &filename)
1494{
1495 for (unsigned int i = 0; i < files.size(); ++i) {
1496 if (files[i] == filename)
1497 return i;
1498 }
1499 files.emplace_back(filename);
1500 return files.size() - 1U;
1501}
1502
1503const std::string& simplecpp::TokenList::file(const Location& loc) const
1504{

Callers 15

addtokenMethod · 0.80
copyTokensMethod · 0.80
insertTokensMethod · 0.80
createTokensMethod · 0.80
getOrigFileMethod · 0.80
tokenlist.cppFile · 0.80
isSafeMethod · 0.80
dumpMethod · 0.80
addNamespaceMethod · 0.80
expandTemplateMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected