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őrinc
2025-08-14 18:29:30 -07:00
parent 8bb9219b63
commit 039307554e
56 changed files with 163 additions and 163 deletions

View File

@@ -832,7 +832,7 @@ std::variant<ChainType, std::string> ArgsManager::GetChainArg() const
bool ArgsManager::UseDefaultSection(const std::string& arg) const
{
return m_network == ChainTypeToString(ChainType::MAIN) || m_network_only_args.count(arg) == 0;
return m_network == ChainTypeToString(ChainType::MAIN) || !m_network_only_args.contains(arg);
}
common::SettingsValue ArgsManager::GetSetting(const std::string& arg) const