MCPcopy Create free account
hub / github.com/Kitware/CMake / countMaxConsecutiveEqualSigns

Function countMaxConsecutiveEqualSigns

Source/cmTestGenerator.cxx:59–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59std::size_t countMaxConsecutiveEqualSigns(std::string const& name)
60{
61 std::size_t max = 0;
62 auto startIt = find(name.begin(), name.end(), '=');
63 auto endIt = startIt;
64 for (; startIt != name.end(); startIt = find(endIt, name.end(), '=')) {
65 endIt =
66 find_if_not(startIt + 1, name.end(), [](char c) { return c == '='; });
67 max =
68 std::max(max, static_cast<std::size_t>(std::distance(startIt, endIt)));
69 }
70 return max;
71}
72
73} // End: anonymous namespace
74

Callers 3

GenerateOldStyleMethod · 0.85

Calls 3

findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…