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

Method updateSuppressionState

lib/suppressions.cpp:329–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329bool SuppressionList::updateSuppressionState(const SuppressionList::Suppression& suppression)
330{
331 std::lock_guard<std::mutex> lg(mSuppressionsSync);
332
333 // Check if suppression is already in list
334 auto foundSuppression = std::find_if(mSuppressions.begin(), mSuppressions.end(),
335 std::bind(&Suppression::isSameParameters, &suppression, std::placeholders::_1));
336 if (foundSuppression != mSuppressions.end()) {
337 if (suppression.checked)
338 foundSuppression->checked = true;
339 if (suppression.matched)
340 foundSuppression->matched = true;
341 return true;
342 }
343
344 return false;
345}
346
347void SuppressionList::ErrorMessage::setFileName(std::string s)
348{

Callers 2

handleReadMethod · 0.45
checkMethod · 0.45

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected