mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02:00
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:
@@ -456,7 +456,7 @@ void DoCheck(std::string prv, std::string pub, const std::string& norm_pub, int
|
||||
// Test whether the observed key path is present in the 'paths' variable (which contains expected, unobserved paths),
|
||||
// and then remove it from that set.
|
||||
for (const auto& origin : script_provider.origins) {
|
||||
BOOST_CHECK_MESSAGE(paths.count(origin.second.second.path), "Unexpected key path: " + prv);
|
||||
BOOST_CHECK_MESSAGE(paths.contains(origin.second.second.path), "Unexpected key path: " + prv);
|
||||
left_paths.erase(origin.second.second.path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user