MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / findAllAndRemove

Method findAllAndRemove

tests/cpu/UnitTestLogUtils.cpp:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88bool LogGuard::findAllAndRemove(const std::string & sPattern) const
89{
90 bool found = false;
91 std::regex pattern(sPattern);
92 std::smatch match;
93 while (std::regex_search(g_output, match, pattern))
94 {
95 found = true;
96 auto pos = std::next(g_output.begin(), match.position());
97 auto end = std::next(pos, match.length());
98 g_output.erase(pos, end);
99 }
100 return found;
101}
102
103void LogGuard::print()
104{

Callers 3

checkAndMuteWarningFunction · 0.80
checkAndMuteErrorFunction · 0.80

Calls 2

eraseMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected