Use 'contains' method

This commit is contained in:
Dr. Dystopia
2024-07-19 22:49:15 +02:00
parent 5af0ae25e6
commit 618b41a459
31 changed files with 46 additions and 52 deletions

View File

@ -659,7 +659,7 @@ void NetPlayDialog::UpdateGUI()
auto* name_item = new QTableWidgetItem(QString::fromStdString(p->name));
name_item->setToolTip(name_item->text());
const auto& status_info = player_status.count(p->game_status) ?
const auto& status_info = player_status.contains(p->game_status) ?
player_status.at(p->game_status) :
std::make_pair(QStringLiteral("?"), QStringLiteral("?"));
auto* status_item = new QTableWidgetItem(status_info.first);