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

Method getSuppressionIndex

gui/projectfiledialog.cpp:965–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965int ProjectFileDialog::getSuppressionIndex(const QString &shortText) const
966{
967 const std::string s = shortText.toStdString();
968 auto it = std::find_if(mSuppressions.cbegin(), mSuppressions.cend(), [&](const SuppressionList::Suppression& sup) {
969 return suppressionAsText(sup) == s;
970 });
971 return it == mSuppressions.cend() ? -1 : static_cast<int>(std::distance(mSuppressions.cbegin(), it));
972}
973
974void ProjectFileDialog::browseMisraFile()
975{

Callers

nothing calls this directly

Calls 1

suppressionAsTextFunction · 0.85

Tested by

no test coverage detected