Use .contains() instead of .find() or .count()

This commit is contained in:
Tim Wojtulewicz 2025-07-23 16:34:44 -07:00
parent d20550f553
commit b592b6c998
68 changed files with 201 additions and 207 deletions

View file

@ -373,7 +373,7 @@ bool Manager::RemoveFile(const string& file_id) {
return true;
}
bool Manager::IsIgnored(const string& file_id) { return ignored.find(file_id) != ignored.end(); }
bool Manager::IsIgnored(const string& file_id) { return ignored.contains(file_id); }
string Manager::GetFileID(const zeek::Tag& tag, Connection* c, bool is_orig) {
current_file_id.clear();

View file

@ -246,7 +246,7 @@ RecordValPtr X509::ParseCertificate(X509Val* cert_val, file_analysis::File* f) {
X509_STORE* X509::GetRootStore(TableVal* root_certs) {
// If this certificate store was built previously, just reuse the old one.
if ( x509_stores.count(root_certs) > 0 )
if ( x509_stores.contains(root_certs) )
return x509_stores[root_certs];
X509_STORE* ctx = X509_STORE_new();