Replace foreach with ranged for loop

Change-Id: I6238651d0b6ea8b932195711d3da7442158d2456
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-10-06 20:00:31 +02:00
parent 28c507eccb
commit 70466ed811
4 changed files with 10 additions and 8 deletions

View File

@@ -56,10 +56,10 @@ void FossilJsExtension::parseArgOptions(const QStringList &args, QMap<QString, Q
{
options.clear();
foreach (const QString &arg, args) {
if (arg.isEmpty()) continue;
QStringList opt = arg.split('|', Qt::KeepEmptyParts);
for (const QString &arg : args) {
if (arg.isEmpty())
continue;
const QStringList opt = arg.split('|', Qt::KeepEmptyParts);
options.insert(opt[0], opt.size() > 1 ? opt[1] : QString());
}
}