mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 03:15:32 +00:00
[Browser] use range-based 'for' instead regular 'for'
This commit is contained in:
parent
96212e96f4
commit
3f34d328b8
1 changed files with 7 additions and 7 deletions
|
@ -53,16 +53,16 @@ void ServerInfoDialog::refresh()
|
|||
|
||||
listRules->clear();
|
||||
const static vector<std::string> defaultRules {"gamemode", "maxPlayers", "name", "passw", "players", "version"};
|
||||
for (auto iter = sd.second.rules.begin();iter != sd.second.rules.end(); iter++)
|
||||
for (auto rule : sd.second.rules)
|
||||
{
|
||||
if(::find(defaultRules.begin(), defaultRules.end(), iter->first) != defaultRules.end())
|
||||
if(::find(defaultRules.begin(), defaultRules.end(), rule.first) != defaultRules.end())
|
||||
continue;
|
||||
QString rule = QString::fromStdString(iter->first) + " : ";
|
||||
if(iter->second.type == 's')
|
||||
rule += QString::fromStdString(iter->second.str);
|
||||
QString ruleStr = QString::fromStdString(rule.first) + " : ";
|
||||
if(rule.second.type == 's')
|
||||
ruleStr += QString::fromStdString(rule.second.str);
|
||||
else
|
||||
rule += QString::number(iter->second.val);
|
||||
listRules->addItem(rule);
|
||||
ruleStr += QString::number(rule.second.val);
|
||||
listRules->addItem(ruleStr);
|
||||
}
|
||||
|
||||
lblPlayers->setText(QString::number(sd.second.players.size()) + " / " + QString::number(sd.second.GetMaxPlayers()));
|
||||
|
|
Loading…
Reference in a new issue