mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Remove unused method parameters
This commit is contained in:
@@ -52,14 +52,14 @@ namespace BlackMisc::Aviation
|
||||
}
|
||||
}
|
||||
|
||||
CAirport CAirportList::findFirstByIcao(const CAirportIcaoCode &icao, const CAirport &ifNotFound) const
|
||||
CAirport CAirportList::findFirstByIcao(const CAirportIcaoCode &icao) const
|
||||
{
|
||||
return this->findFirstByOrDefault(&CAirport::getIcao, icao, ifNotFound);
|
||||
return this->findFirstByOrDefault(&CAirport::getIcao, icao, CAirport());
|
||||
}
|
||||
|
||||
CAirport CAirportList::findFirstByNameOrLocation(const QString &nameOrLocation, const CAirport &ifNotFound) const
|
||||
CAirport CAirportList::findFirstByNameOrLocation(const QString &nameOrLocation) const
|
||||
{
|
||||
if (this->isEmpty() || nameOrLocation.isEmpty()) { return ifNotFound; }
|
||||
if (this->isEmpty() || nameOrLocation.isEmpty()) { return CAirport(); }
|
||||
CAirportList airports = this->findBy([&](const CAirport & airport)
|
||||
{
|
||||
return airport.matchesDescriptiveName(nameOrLocation);
|
||||
@@ -71,7 +71,7 @@ namespace BlackMisc::Aviation
|
||||
return airport.matchesLocation(nameOrLocation);
|
||||
});
|
||||
if (!airports.isEmpty()) { return airports.frontOrDefault(); }
|
||||
return ifNotFound;
|
||||
return CAirport();
|
||||
}
|
||||
|
||||
QStringList CAirportList::allIcaoCodes(bool sorted) const
|
||||
|
||||
@@ -45,11 +45,11 @@ namespace BlackMisc::Aviation
|
||||
//! Find 0..n airports by ICAO code
|
||||
CAirportList findByIcao(const CAirportIcaoCode &icao) const;
|
||||
|
||||
//! Find first station by callsign, if not return given value / default
|
||||
CAirport findFirstByIcao(const CAirportIcaoCode &icao, const CAirport &ifNotFound = CAirport()) const;
|
||||
//! Find first station by callsign, if not return default
|
||||
CAirport findFirstByIcao(const CAirportIcaoCode &icao) const;
|
||||
|
||||
//! Find first by name or location, if not return given value / default
|
||||
CAirport findFirstByNameOrLocation(const QString &nameOrLocation, const CAirport &ifNotFound = CAirport()) const;
|
||||
//! Find first by name or location, if not return default
|
||||
CAirport findFirstByNameOrLocation(const QString &nameOrLocation) const;
|
||||
|
||||
//! Containing an airport with given ICAO code?
|
||||
bool containsAirportWithIcaoCode(const CAirportIcaoCode &icao) const;
|
||||
|
||||
Reference in New Issue
Block a user