mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
@@ -52,7 +52,7 @@ namespace BlackSim
|
||||
QStringList titles = this->getTitles(true);
|
||||
QStringList ambiguousTitles;
|
||||
QString last;
|
||||
foreach(QString title, titles)
|
||||
for (const QString &title : titles)
|
||||
{
|
||||
if (title.isEmpty()) { continue; }
|
||||
if (title.compare(last, Qt::CaseInsensitive) == 0)
|
||||
@@ -116,7 +116,7 @@ namespace BlackSim
|
||||
// Dirs last is crucial,since I will break recursion on "aircraft.cfg" level
|
||||
QFileInfoList files = dir.entryInfoList(QDir::Files | QDir::AllDirs, QDir::DirsLast);
|
||||
|
||||
foreach(QFileInfo file, files)
|
||||
for (const QFileInfo &file : files)
|
||||
{
|
||||
if (m_cancelRead) { return -1; }
|
||||
if (file.isDir())
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackSim
|
||||
if (!dir.exists()) return;
|
||||
QStringList nameFilters({"*.vmr"});
|
||||
QFileInfoList entries = dir.entryInfoList(nameFilters, QDir::Files | QDir::Readable);
|
||||
foreach(QFileInfo file, entries)
|
||||
for (const QFileInfo &file : entries)
|
||||
{
|
||||
this->addFilename(file.absoluteFilePath());
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace BlackSim
|
||||
bool success = true;
|
||||
this->m_loadedFiles = 0;
|
||||
this->m_fileListWithProblems.clear();
|
||||
foreach(QString fn, this->m_fileList)
|
||||
for (const QString &fn : this->m_fileList)
|
||||
{
|
||||
this->m_loadedFiles++;
|
||||
bool s = this->loadFile(fn);
|
||||
@@ -108,8 +108,8 @@ namespace BlackSim
|
||||
if (modelName.contains("//"))
|
||||
{
|
||||
// multiple models
|
||||
QStringList models = modelName.split("//");
|
||||
foreach(QString model, models)
|
||||
const QStringList models = modelName.split("//");
|
||||
for (const QString &model : models)
|
||||
{
|
||||
if (model.isEmpty()) { continue; }
|
||||
CAircraftMapping mapping("vpilot", folder, typeCode, airlineCode, model);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace BlackSim
|
||||
{
|
||||
if (modelNames.isEmpty() || this->m_mappings.isEmpty()) { return this->m_mappings.size(); }
|
||||
CAircraftMappingList newList;
|
||||
foreach(CAircraftMapping mapping, this->m_mappings)
|
||||
for (const CAircraftMapping &mapping : this->m_mappings)
|
||||
{
|
||||
QString modelString = mapping.getModel().getModelString();
|
||||
if (modelString.isEmpty()) { continue; }
|
||||
|
||||
Reference in New Issue
Block a user