mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Ref T308, performance optimized fromDatabaseJsonCaching
* maps for id/object * caching fromDatabaseJsonCaching * fixed CAircraftModel::fromDatabaseJson wrong prefix
This commit is contained in:
@@ -307,5 +307,16 @@ namespace BlackMisc
|
||||
if (vDesignator.length() < 4) { return this->containsDesignator(vDesignator); }
|
||||
return this->contains(&CAirlineIcaoCode::getVDesignator, vDesignator.toUpper());
|
||||
}
|
||||
|
||||
AirlineIcaoIdMap CAirlineIcaoCodeList::toIdMap() const
|
||||
{
|
||||
AirlineIcaoIdMap map;
|
||||
for (const CAirlineIcaoCode &code : *this)
|
||||
{
|
||||
if (!code.hasValidDbKey()) { continue; }
|
||||
map.insert(code.getDbKey(), code);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user