mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-13 00:57:24 +02:00
refactor: unify container presence checks - find
The changes made here were: | From | To | |------------------------|------------------| | `m.find(k) == m.end()` | `!m.contains(k)` | | `m.find(k) != m.end()` | `m.contains(k)` |
This commit is contained in:
@@ -1172,7 +1172,7 @@ UniValue RPCResult::MatchesType(const UniValue& result) const
|
||||
std::map<std::string, UniValue> result_obj;
|
||||
result.getObjMap(result_obj);
|
||||
for (const auto& result_entry : result_obj) {
|
||||
if (doc_keys.find(result_entry.first) == doc_keys.end()) {
|
||||
if (!doc_keys.contains(result_entry.first)) {
|
||||
errors.pushKV(result_entry.first, "key returned that was not in doc");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user