From d6626b928b4637b43bfd774d7f745a9afb356f10 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 31 Jan 2026 23:29:19 -0600 Subject: [PATCH] fix: warning: use 'contains' to check for membership [readability-container-contains] --- gtk/DetailsDialog.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/DetailsDialog.cc b/gtk/DetailsDialog.cc index 7029202b3..323202300 100644 --- a/gtk/DetailsDialog.cc +++ b/gtk/DetailsDialog.cc @@ -1246,7 +1246,7 @@ void DetailsDialog::Impl::refreshPeerList(std::vector const& torren { auto const key = make_key(tor, peer); - if (hash.find(key) == hash.end()) + if (!hash.contains(key)) { auto const iter = store->append(); initPeerRow(iter, key, tr_torrentName(tor), peer); @@ -1314,7 +1314,7 @@ void DetailsDialog::Impl::refreshWebseedList(std::vector const& tor auto const* const url = tr_torrentWebseed(tor, j).url; auto const key = make_key(tor, url); - if (hash.find(key) == hash.end()) + if (!hash.contains(key)) { auto const iter = store->append(); (*iter)[webseed_cols.url] = url; @@ -1986,7 +1986,7 @@ void DetailsDialog::Impl::refreshTracker(std::vector const& torrent // build the key to find the row gstr.str({}); gstr << torrent_id << '\t' << tracker.tier << '\t' << tracker.announce; - if (hash.find(gstr.str()) == hash.end()) + if (!hash.contains(gstr.str())) { // if we didn't have that row, add it auto const iter = store->append();