refactor: unify container presence checks - trivial counts

The changes made here were:

| From              | To               |
|-------------------|------------------|
| `m.count(k)`      | `m.contains(k)`  |
| `!m.count(k)`     | `!m.contains(k)` |
| `m.count(k) == 0` | `!m.contains(k)` |
| `m.count(k) != 0` | `m.contains(k)`  |
| `m.count(k) > 0`  | `m.contains(k)`  |

The commit contains the trivial, mechanical refactors where it doesn't matter if the container can have multiple elements or not

Co-authored-by: Jan B <608446+janb84@users.noreply.github.com>
This commit is contained in:
LőrincandJan B committed 2025-12-03 13:36:58 +01:00
1 parent 8bb9219b63
commit 039307554e
56 files changed
+163 -163

No files matched your search

+1 -1
View File
@@ -2917,7 +2917,7 @@ void TxGraphImpl::SanityCheck() const
// Check the sequence number.
assert(cluster.m_sequence < m_next_sequence_counter);
assert(sequences.count(cluster.m_sequence) == 0);
assert(!sequences.contains(cluster.m_sequence));
sequences.insert(cluster.m_sequence);
// Remember we saw this Cluster (only if it is non-empty; empty Clusters aren't
// expected to be referenced by the Entry vector).