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

Function openHeaderDirect

externals/simplecpp/simplecpp.cpp:3056–3069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3054#endif
3055
3056static std::string openHeaderDirect(std::ifstream &f, const std::string &path)
3057{
3058#ifdef SIMPLECPP_WINDOWS
3059 if (nonExistingFilesCache.contains(path))
3060 return ""; // file is known not to exist, skip expensive file open call
3061#endif
3062 f.open(path.c_str());
3063 if (f.is_open())
3064 return path;
3065#ifdef SIMPLECPP_WINDOWS
3066 nonExistingFilesCache.add(path);
3067#endif
3068 return "";
3069}
3070
3071static std::string openHeader(std::ifstream &f, const simplecpp::DUI &dui, const std::string &sourcefile, const std::string &header, bool systemheader)
3072{

Callers 1

openHeaderFunction · 0.85

Calls 3

containsMethod · 0.45
openMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected