mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #290 using a CRange of iterator adaptors in implementating the tertiary predicate-based methods of the derived containers,
but preserving the return-by-copy for API stability
This commit is contained in:
@@ -56,9 +56,7 @@ namespace BlackMisc
|
||||
*/
|
||||
CAirport CAirportList::findFirstByIcao(const CAirportIcao &icao, const CAirport &ifNotFound) const
|
||||
{
|
||||
CAirportList airports = this->findByIcao(icao);
|
||||
if (!airports.isEmpty()) return airports[0];
|
||||
return ifNotFound;
|
||||
return this->findByIcao(icao).frontOrDefault(ifNotFound);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user