mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
Ref T308, performance optimized fromDatabaseJsonCaching
* maps for id/object * caching fromDatabaseJsonCaching * fixed CAircraftModel::fromDatabaseJson wrong prefix
This commit is contained in:
@@ -203,5 +203,17 @@ namespace BlackMisc
|
||||
}
|
||||
return CLivery();
|
||||
}
|
||||
|
||||
CLiveryList CLiveryList::fromDatabaseJsonCaching(const QJsonArray &array, const CAirlineIcaoCodeList &relatedAirlines)
|
||||
{
|
||||
AirlineIcaoIdMap airlineIcaos = relatedAirlines.toIdMap();
|
||||
|
||||
CLiveryList models;
|
||||
for (const QJsonValue &value : array)
|
||||
{
|
||||
models.push_back(CLivery::fromDatabaseJsonCaching(value.toObject(), airlineIcaos));
|
||||
}
|
||||
return models;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user