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

Function getSummaryFiles

lib/summaries.cpp:101–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100
101static std::vector<std::string> getSummaryFiles(const std::string &filename)
102{
103 std::vector<std::string> ret;
104 std::ifstream fin(filename);
105 if (!fin.is_open())
106 return ret;
107 std::string line;
108 while (std::getline(fin, line)) {
109 const std::string::size_type dotA = line.find(".a");
110 const std::string::size_type colon = line.find(':');
111 if (colon > line.size() || dotA > colon)
112 continue;
113 std::string f = line.substr(0,colon);
114 f[dotA + 1] = 's';
115 ret.push_back(std::move(f));
116 }
117 return ret;
118}
119
120static std::vector<std::string> getSummaryData(const std::string &line, const std::string &data)
121{

Callers 1

loadReturnMethod · 0.85

Calls 4

getlineFunction · 0.85
findMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected