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

Function getSummaryData

lib/summaries.cpp:120–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static std::vector<std::string> getSummaryData(const std::string &line, const std::string &data)
121{
122 std::vector<std::string> ret;
123 const std::string::size_type start = line.find(" " + data + ":[");
124 if (start == std::string::npos)
125 return ret;
126 const std::string::size_type end = line.find(']', start);
127 if (end >= line.size())
128 return ret;
129
130 std::string::size_type pos1 = start + 3 + data.size();
131 while (pos1 < end) {
132 const std::string::size_type pos2 = line.find_first_of(",]",pos1);
133 ret.push_back(line.substr(pos1, pos2-pos1-1));
134 pos1 = pos2 + 1;
135 }
136
137 return ret;
138}
139
140static void removeFunctionCalls(const std::string& calledFunction,
141 std::map<std::string, std::vector<std::string>> &functionCalledBy,

Callers 1

loadReturnMethod · 0.85

Calls 3

findMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected