mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
Ref T562, fix 2-letter aircraft ICAO codes
* added constexpr for aircraft ICAO min/max length * use ICAO designator in FP if there is no "getCombinedPrefixIcaoSuffix"
This commit is contained in:
committed by
Mat Sutcliffe
parent
e31fa91052
commit
a4dc89a295
@@ -672,7 +672,7 @@ namespace BlackMisc
|
||||
|
||||
bool CAircraftIcaoCode::isValidDesignator(const QString &designator)
|
||||
{
|
||||
if (designator.length() < 2 || designator.length() > 5) { return false; }
|
||||
if (designator.length() < DesignatorMinLength || designator.length() > DesignatorMaxLength) { return false; }
|
||||
if (!designator[0].isUpper()) { return false; }
|
||||
return !containsChar(designator, [](QChar c) { return !c.isUpper() && !c.isDigit(); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user